From 08982183ff054f41b9524f7bc3fa581eb2a3f49a Mon Sep 17 00:00:00 2001
From: Edward Hennessy <[EMAIL PROTECTED]>
Date: Thu, 31 Jul 2008 22:23:57 -0700
Subject: [PATCH] Added new toolbar buttons.
Added the following new toolbar buttons. Created icons where required.
- Add arc (Created icon)
- Add box (Created icon)
- Add circle (Created icon)
- Add line (Created icon)
- Add pin (Created icon)
- Down hierarchy schematic (Created icon)
- Down hierarchy symbol (Created icon)
- Up hierarchy (Created icon)
- Zoom in
- Zoom out
---
gschem/bitmap/Makefile.am | 5 +-
gschem/bitmap/README | 9 +
gschem/bitmap/gschem-arc.svg | 75 ++++++++
gschem/bitmap/gschem-box.svg | 69 +++++++
gschem/bitmap/gschem-circle.svg | 72 ++++++++
gschem/bitmap/gschem-down-schematic.svg | 83 +++++++++
gschem/bitmap/gschem-down-symbol.svg | 96 ++++++++++
gschem/bitmap/gschem-line.svg | 66 +++++++
gschem/bitmap/gschem-pin.svg | 89 +++++++++
gschem/bitmap/gschem-up.svg | 76 ++++++++
gschem/include/prototype.h | 10 +
gschem/include/x_icons.h | 19 ++-
gschem/src/i_callbacks.c | 10 +
gschem/src/x_icons.c | 18 ++-
gschem/src/x_window.c | 300 +++++++++++++++++++++----------
15 files changed, 891 insertions(+), 106 deletions(-)
create mode 100644 gschem/bitmap/gschem-arc.svg
create mode 100644 gschem/bitmap/gschem-box.svg
create mode 100644 gschem/bitmap/gschem-circle.svg
create mode 100644 gschem/bitmap/gschem-down-schematic.svg
create mode 100644 gschem/bitmap/gschem-down-symbol.svg
create mode 100644 gschem/bitmap/gschem-line.svg
create mode 100644 gschem/bitmap/gschem-pin.svg
create mode 100644 gschem/bitmap/gschem-up.svg
diff --git a/gschem/bitmap/Makefile.am b/gschem/bitmap/Makefile.am
index 994fcb2..1935016 100644
--- a/gschem/bitmap/Makefile.am
+++ b/gschem/bitmap/Makefile.am
@@ -20,7 +20,10 @@ bitmapdata_DATA = gschem-bus.xpm gschem-comp.xpm
gschem-net.xpm \
gschem-alignment_bottomright.png \
gschem-alignment_topcenter.png \
gschem-alignment_middlecenter.png \
- gschem-alignment_topleft.png
+ gschem-alignment_topleft.png \
+ gschem-arc.svg gschem-box.svg gschem-circle.svg \
+ gschem-line.svg gschem-pin.svg gschem-up.svg \
+ gschem-down-schematic.svg gschem-down-symbol.svg
diff --git a/gschem/bitmap/README b/gschem/bitmap/README
index 2d13f59..f01d9d3 100644
--- a/gschem/bitmap/README
+++ b/gschem/bitmap/README
@@ -27,6 +27,15 @@ gschem-left2right.png Created by Tomaz Solc, GPL
gschem-right2left.png Created by Tomaz Solc, GPL
gschem-diagonal.png Created by Tomaz Solc, GPL
+gschem-arc.svg Created by Edward Hennessy, GPL
+gschem-box.svg Created by Edward Hennessy, GPL
+gschem-circle.svg Created by Edward Hennessy, GPL
+gschem-line.svg Created by Edward Hennessy, GPL
+gschem-pin.svg Created by Edward Hennessy, GPL
+gschem-down-schematic.svg Created by Edward Hennessy, GPL
+gschem-down-symbol.svg Created by Edward Hennessy, GPL
+gschem-up.svg Created by Edward Hennessy, GPL
+
This icon come from the GNOME project, and is released under the
Gnu General Public License, meaning that you can use them in free
software projects free of charge.
diff --git a/gschem/bitmap/gschem-arc.svg b/gschem/bitmap/gschem-arc.svg
new file mode 100644
index 0000000..203b41b
--- /dev/null
+++ b/gschem/bitmap/gschem-arc.svg
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="64px"
+ height="64px"
+ id="svg3199"
+ sodipodi:version="0.32"
+ inkscape:version="0.46"
+ sodipodi:docname="gschem-arc.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape">
+ <defs
+ id="defs3201">
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 32 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="64 : 32 : 1"
+ inkscape:persp3d-origin="32 : 21.333333 : 1"
+ id="perspective3207" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="7.765625"
+ inkscape:cx="32"
+ inkscape:cy="32"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ inkscape:document-units="px"
+ inkscape:grid-bbox="true"
+ inkscape:window-width="1279"
+ inkscape:window-height="725"
+ inkscape:window-x="1"
+ inkscape:window-y="49" />
+ <metadata
+ id="metadata3204">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ id="layer1"
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer">
+ <path
+ sodipodi:type="arc"
+
style="opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:1.99999678;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="path4480"
+ sodipodi:cx="33.609657"
+ sodipodi:cy="35.47686"
+ sodipodi:rx="14.036218"
+ sodipodi:ry="12.040241"
+ d="M 47.645875,35.47686 A 14.036218,12.040241 0 1 1 33.609658,23.436619"
+ transform="matrix(1.8523509,0,0,2.1594252,-30.256878,-44.609624)"
+ sodipodi:start="0"
+ sodipodi:end="4.712389"
+ sodipodi:open="true" />
+ </g>
+</svg>
diff --git a/gschem/bitmap/gschem-box.svg b/gschem/bitmap/gschem-box.svg
new file mode 100644
index 0000000..ab8b2f0
--- /dev/null
+++ b/gschem/bitmap/gschem-box.svg
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="64px"
+ height="64px"
+ id="svg3199"
+ sodipodi:version="0.32"
+ inkscape:version="0.46"
+ sodipodi:docname="gschem-box.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape">
+ <defs
+ id="defs3201">
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 32 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="64 : 32 : 1"
+ inkscape:persp3d-origin="32 : 21.333333 : 1"
+ id="perspective3207" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="7.765625"
+ inkscape:cx="32"
+ inkscape:cy="32"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ inkscape:document-units="px"
+ inkscape:grid-bbox="true"
+ inkscape:window-width="1279"
+ inkscape:window-height="725"
+ inkscape:window-x="1"
+ inkscape:window-y="49" />
+ <metadata
+ id="metadata3204">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ id="layer1"
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer">
+ <rect
+
style="opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:3.99999976;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4432"
+ width="52"
+ height="44"
+ x="6"
+ y="10" />
+ </g>
+</svg>
diff --git a/gschem/bitmap/gschem-circle.svg b/gschem/bitmap/gschem-circle.svg
new file mode 100644
index 0000000..46bc40f
--- /dev/null
+++ b/gschem/bitmap/gschem-circle.svg
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="64px"
+ height="64px"
+ id="svg3199"
+ sodipodi:version="0.32"
+ inkscape:version="0.46"
+ sodipodi:docname="gschem-circle.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape">
+ <defs
+ id="defs3201">
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 32 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="64 : 32 : 1"
+ inkscape:persp3d-origin="32 : 21.333333 : 1"
+ id="perspective3207" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="7.765625"
+ inkscape:cx="32"
+ inkscape:cy="32"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ inkscape:document-units="px"
+ inkscape:grid-bbox="true"
+ inkscape:window-width="1279"
+ inkscape:window-height="725"
+ inkscape:window-x="1"
+ inkscape:window-y="49" />
+ <metadata
+ id="metadata3204">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ id="layer1"
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer">
+ <path
+ sodipodi:type="arc"
+
style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:2.80397773;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="path3209"
+ sodipodi:cx="48.090908"
+ sodipodi:cy="48.909092"
+ sodipodi:rx="18.454546"
+ sodipodi:ry="18"
+ d="M 66.545454,48.909092 A 18.454546,18 0 1 1 29.636362,48.909092 A
18.454546,18 0 1 1 66.545454,48.909092 z"
+ transform="matrix(1.408867,0,0,1.4444444,-35.753692,-38.646467)" />
+ </g>
+</svg>
diff --git a/gschem/bitmap/gschem-down-schematic.svg
b/gschem/bitmap/gschem-down-schematic.svg
new file mode 100644
index 0000000..21ce843
--- /dev/null
+++ b/gschem/bitmap/gschem-down-schematic.svg
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="64px"
+ height="64px"
+ id="svg3199"
+ sodipodi:version="0.32"
+ inkscape:version="0.46"
+ sodipodi:docname="gschem-down-schematic.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape">
+ <defs
+ id="defs3201">
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 32 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="64 : 32 : 1"
+ inkscape:persp3d-origin="32 : 21.333333 : 1"
+ id="perspective3207" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="7.765625"
+ inkscape:cx="9.2072435"
+ inkscape:cy="32"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ inkscape:document-units="px"
+ inkscape:grid-bbox="true"
+ inkscape:window-width="1279"
+ inkscape:window-height="725"
+ inkscape:window-x="1"
+ inkscape:window-y="49">
+ <inkscape:grid
+ type="xygrid"
+ id="grid4541"
+ visible="true"
+ enabled="true"
+ spacingx="4px"
+ spacingy="4px"
+ empspacing="1" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata3204">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ id="layer1"
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer">
+ <path
+
style="fill:#0000ff;fill-opacity:1;fill-rule:evenodd;stroke:#000080;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 32,58 L 58,30 L 42,30 L 42,6 L 22,6 L 22,30 L 6,30 L 32,58 z"
+ id="path4511"
+ sodipodi:nodetypes="cccccccc" />
+ <rect
+
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:4;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4700"
+ width="28.000002"
+ height="15.999999"
+ x="34"
+ y="34" />
+ </g>
+</svg>
diff --git a/gschem/bitmap/gschem-down-symbol.svg
b/gschem/bitmap/gschem-down-symbol.svg
new file mode 100644
index 0000000..d087e55
--- /dev/null
+++ b/gschem/bitmap/gschem-down-symbol.svg
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="64px"
+ height="64px"
+ id="svg3199"
+ sodipodi:version="0.32"
+ inkscape:version="0.46"
+ sodipodi:docname="gschem-down-symbol.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape">
+ <defs
+ id="defs3201">
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 32 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="64 : 32 : 1"
+ inkscape:persp3d-origin="32 : 21.333333 : 1"
+ id="perspective3207" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="7.765625"
+ inkscape:cx="20.22886"
+ inkscape:cy="32"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ inkscape:document-units="px"
+ inkscape:grid-bbox="true"
+ inkscape:window-width="1279"
+ inkscape:window-height="725"
+ inkscape:window-x="1"
+ inkscape:window-y="49">
+ <inkscape:grid
+ type="xygrid"
+ id="grid4541"
+ visible="true"
+ enabled="true"
+ spacingx="4px"
+ spacingy="4px"
+ empspacing="1" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata3204">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ id="layer1"
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer">
+ <path
+
style="fill:#0000ff;fill-opacity:1;fill-rule:evenodd;stroke:#000080;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 32,58 L 58,30 L 42,30 L 42,6 L 22,6 L 22,30 L 6,30 L 32,58 z"
+ id="path4511"
+ sodipodi:nodetypes="cccccccc" />
+ <path
+
style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 34,33.999783 L 34,49.999783 L 46,49.999783 C 48.362426,50.026283
54.051293,47.622736 54,41.999783 C 53.945267,35.999783 48.876743,34.095648
46,33.999783 L 34,33.999783 z"
+ id="path3642"
+ sodipodi:nodetypes="cccscc" />
+ <path
+
style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 26,37.999783 C 30.89336,37.999783 34,37.999783 34,37.999783"
+ id="path4414"
+ sodipodi:nodetypes="cc" />
+ <path
+
style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 26,45.999783 C 30.893359,45.999783 33.999999,45.999783
33.999999,45.999783"
+ id="path4416"
+ sodipodi:nodetypes="cc" />
+ <path
+
style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:3.99999976000000013;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 54,41.999783 C 58.893359,41.999783 61.999999,41.999783
61.999999,41.999783"
+ id="path4418"
+ sodipodi:nodetypes="cc" />
+ </g>
+</svg>
diff --git a/gschem/bitmap/gschem-line.svg b/gschem/bitmap/gschem-line.svg
new file mode 100644
index 0000000..ea78d20
--- /dev/null
+++ b/gschem/bitmap/gschem-line.svg
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="64px"
+ height="64px"
+ id="svg3199"
+ sodipodi:version="0.32"
+ inkscape:version="0.46"
+ sodipodi:docname="gschem-line.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape">
+ <defs
+ id="defs3201">
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 32 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="64 : 32 : 1"
+ inkscape:persp3d-origin="32 : 21.333333 : 1"
+ id="perspective3207" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="7.765625"
+ inkscape:cx="32"
+ inkscape:cy="32"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ inkscape:document-units="px"
+ inkscape:grid-bbox="true"
+ inkscape:window-width="1279"
+ inkscape:window-height="725"
+ inkscape:window-x="1"
+ inkscape:window-y="49" />
+ <metadata
+ id="metadata3204">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ id="layer1"
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer">
+ <path
+
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 6.0000001,53.999999 L 58.000001,9.9999998"
+ id="path4454" />
+ </g>
+</svg>
diff --git a/gschem/bitmap/gschem-pin.svg b/gschem/bitmap/gschem-pin.svg
new file mode 100644
index 0000000..6ab78d9
--- /dev/null
+++ b/gschem/bitmap/gschem-pin.svg
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="64px"
+ height="64px"
+ id="svg3199"
+ sodipodi:version="0.32"
+ inkscape:version="0.46"
+ sodipodi:docname="gschem-pin.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape">
+ <defs
+ id="defs3201">
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 32 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="64 : 32 : 1"
+ inkscape:persp3d-origin="32 : 21.333333 : 1"
+ id="perspective3207" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="7.765625"
+ inkscape:cx="32"
+ inkscape:cy="32"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ inkscape:document-units="px"
+ inkscape:grid-bbox="true"
+ inkscape:window-width="1279"
+ inkscape:window-height="725"
+ inkscape:window-x="1"
+ inkscape:window-y="49">
+ <inkscape:grid
+ type="xygrid"
+ id="grid4541"
+ visible="true"
+ enabled="true"
+ spacingx="4px"
+ spacingy="4px"
+ empspacing="1" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata3204">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ id="layer1"
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer">
+ <path
+
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 9.9999999,29.937621 L 53.999999,30.062377"
+ id="path4603" />
+ <path
+ sodipodi:type="arc"
+
style="opacity:1;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:4.08840466000000013;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="path4607"
+ sodipodi:cx="30.004025"
+ sodipodi:cy="17.963783"
+ sodipodi:rx="4.1207242"
+ sodipodi:ry="4.0563378"
+ d="M 34.124749,17.963783 A 4.1207242,4.0563378 0 1 1 25.8833,17.963783
A 4.1207242,4.0563378 0 1 1 34.124749,17.963783 z"
+ transform="matrix(0.9707032,0,0,0.9861111,-19.125001,12.285714)" />
+ <path
+
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 54,9.9983242 L 54,54.001673"
+ id="path4609" />
+ </g>
+</svg>
diff --git a/gschem/bitmap/gschem-up.svg b/gschem/bitmap/gschem-up.svg
new file mode 100644
index 0000000..bbac22e
--- /dev/null
+++ b/gschem/bitmap/gschem-up.svg
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="64px"
+ height="64px"
+ id="svg3199"
+ sodipodi:version="0.32"
+ inkscape:version="0.46"
+ sodipodi:docname="gschem-up.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape">
+ <defs
+ id="defs3201">
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 32 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="64 : 32 : 1"
+ inkscape:persp3d-origin="32 : 21.333333 : 1"
+ id="perspective3207" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="7.765625"
+ inkscape:cx="32"
+ inkscape:cy="32"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ inkscape:document-units="px"
+ inkscape:grid-bbox="true"
+ inkscape:window-width="1279"
+ inkscape:window-height="725"
+ inkscape:window-x="1"
+ inkscape:window-y="49">
+ <inkscape:grid
+ type="xygrid"
+ id="grid4541"
+ visible="true"
+ enabled="true"
+ spacingx="4px"
+ spacingy="4px"
+ empspacing="1" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata3204">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ id="layer1"
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer">
+ <path
+
style="fill:#0000ff;fill-rule:evenodd;stroke:#000080;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none;fill-opacity:1"
+ d="M 32,6 L 6,34 L 22,34 L 22,58 L 42,58 L 42,34 L 58,34 L 32,6 z"
+ id="path4511"
+ sodipodi:nodetypes="cccccccc" />
+ </g>
+</svg>
diff --git a/gschem/include/prototype.h b/gschem/include/prototype.h
index 043c2e4..e3a1234 100644
--- a/gschem/include/prototype.h
+++ b/gschem/include/prototype.h
@@ -452,6 +452,16 @@ void i_callback_help_about(SCM rest, gpointer data, guint
callback_action, GtkWi
void i_callback_help_hotkeys(SCM rest, gpointer data, guint callback_action,
GtkWidget *widget);
void i_callback_options_show_coord_window(SCM rest, gpointer data, guint
callback_action, GtkWidget *widget);
gboolean i_callback_close_wm(GtkWidget *widget, GdkEvent *event, gpointer
data);
+void i_callback_action_add_arc(GtkWidget *widget, gpointer data);
+void i_callback_action_add_box(GtkWidget *widget, gpointer data);
+void i_callback_action_add_circle(GtkWidget *widget, gpointer data);
+void i_callback_action_add_line(GtkWidget *widget, gpointer data);
+void i_callback_action_add_pin(GtkWidget *widget, gpointer data);
+void i_callback_action_hierarchy_down_schematic(GtkWidget *widget, gpointer
data);
+void i_callback_action_hierarchy_down_symbol(GtkWidget *widget, gpointer data);
+void i_callback_action_hierarchy_up(GtkWidget *widget, gpointer data);
+void i_callback_action_view_zoom_in(GtkWidget *widget, gpointer data);
+void i_callback_action_view_zoom_out(GtkWidget *widget, gpointer data);
/* i_vars.c */
void i_vars_set(GSCHEM_TOPLEVEL *w_current);
/* o_arc.c */
diff --git a/gschem/include/x_icons.h b/gschem/include/x_icons.h
index 8379213..7194505 100644
--- a/gschem/include/x_icons.h
+++ b/gschem/include/x_icons.h
@@ -1,8 +1,17 @@
/* stock ids for gschem's icons */
-#define GSCHEM_STOCK_BUS "gschem-bus"
-#define GSCHEM_STOCK_COMPONENT "gschem-component"
-#define GSCHEM_STOCK_NET "gschem-net"
-#define GSCHEM_STOCK_SELECT "gschem-select"
-#define GSCHEM_STOCK_TEXT "gschem-text"
+#define GSCHEM_STOCK_ARC "gschem-arc"
+#define GSCHEM_STOCK_BOX "gschem-box"
+#define GSCHEM_STOCK_BUS "gschem-bus"
+#define GSCHEM_STOCK_CIRCLE "gschem-circle"
+#define GSCHEM_STOCK_COMPONENT "gschem-component"
+#define GSCHEM_STOCK_DOWN_SCHEMATIC "gschem-down-schematic"
+#define GSCHEM_STOCK_DOWN_SYMBOL "gschem-down-symbol"
+#define GSCHEM_STOCK_LINE "gschem-line"
+#define GSCHEM_STOCK_NET "gschem-net"
+#define GSCHEM_STOCK_PICTURE "gschem-picture"
+#define GSCHEM_STOCK_PIN "gschem-pin"
+#define GSCHEM_STOCK_SELECT "gschem-select"
+#define GSCHEM_STOCK_TEXT "gschem-text"
+#define GSCHEM_STOCK_UP "gschem-up"
diff --git a/gschem/src/i_callbacks.c b/gschem/src/i_callbacks.c
index 6c2141d..22e9e1f 100644
--- a/gschem/src/i_callbacks.c
+++ b/gschem/src/i_callbacks.c
@@ -161,13 +161,23 @@ void i_callback_action_ ## name (GtkWidget *widget,
gpointer data) \
} \
}
+ACTION_ADAPTER(add_arc)
+ACTION_ADAPTER(add_box)
+ACTION_ADAPTER(add_circle)
ACTION_ADAPTER(add_component)
+ACTION_ADAPTER(add_line)
+ACTION_ADAPTER(add_pin)
ACTION_ADAPTER(add_text)
ACTION_ADAPTER(edit_redo)
ACTION_ADAPTER(edit_undo)
ACTION_ADAPTER(file_new)
ACTION_ADAPTER(file_open)
ACTION_ADAPTER(file_save)
+ACTION_ADAPTER(hierarchy_down_schematic)
+ACTION_ADAPTER(hierarchy_down_symbol)
+ACTION_ADAPTER(hierarchy_up)
+ACTION_ADAPTER(view_zoom_in)
+ACTION_ADAPTER(view_zoom_out)
/*! \todo Finish function documentation!!!
* \brief
diff --git a/gschem/src/x_icons.c b/gschem/src/x_icons.c
index 3425fa3..c42b473 100644
--- a/gschem/src/x_icons.c
+++ b/gschem/src/x_icons.c
@@ -47,11 +47,19 @@ struct _icon_entry
static const icon_entry icon_table[] =
{
- { GSCHEM_STOCK_BUS, "gschem-bus.xpm" },
- { GSCHEM_STOCK_COMPONENT, "gschem-comp.xpm" },
- { GSCHEM_STOCK_NET, "gschem-net.xpm" },
- { GSCHEM_STOCK_SELECT, "gschem-select.xpm" },
- { GSCHEM_STOCK_TEXT, "gschem-text.xpm" }
+ { GSCHEM_STOCK_ARC, "gschem-arc.svg" },
+ { GSCHEM_STOCK_BOX, "gschem-box.svg" },
+ { GSCHEM_STOCK_BUS, "gschem-bus.xpm" },
+ { GSCHEM_STOCK_CIRCLE, "gschem-circle.svg" },
+ { GSCHEM_STOCK_COMPONENT, "gschem-comp.xpm" },
+ { GSCHEM_STOCK_DOWN_SCHEMATIC, "gschem-down-schematic.svg" },
+ { GSCHEM_STOCK_DOWN_SYMBOL, "gschem-down-symbol.svg" },
+ { GSCHEM_STOCK_LINE, "gschem-line.svg" },
+ { GSCHEM_STOCK_NET, "gschem-net.xpm" },
+ { GSCHEM_STOCK_PIN, "gschem-pin.svg" },
+ { GSCHEM_STOCK_SELECT, "gschem-select.xpm" },
+ { GSCHEM_STOCK_TEXT, "gschem-text.xpm" },
+ { GSCHEM_STOCK_UP, "gschem-up.svg" },
};
#define ICONS_SIZE (sizeof(icon_table)/sizeof(icon_entry))
diff --git a/gschem/src/x_window.c b/gschem/src/x_window.c
index f267c2e..2aa6da1 100644
--- a/gschem/src/x_window.c
+++ b/gschem/src/x_window.c
@@ -33,6 +33,8 @@
#include <dmalloc.h>
#endif
+static GtkWidget *x_window_create_toolbar(GSCHEM_TOPLEVEL *w_current);
+
/*! \todo Finish function documentation!!!
* \brief
* \par Function Description
@@ -303,106 +305,13 @@ void x_window_create_main(GSCHEM_TOPLEVEL *w_current)
}
if (w_current->toolbars) {
- toolbar = gtk_toolbar_new();
- gtk_toolbar_set_orientation (GTK_TOOLBAR(toolbar),
- GTK_ORIENTATION_HORIZONTAL);
- gtk_toolbar_set_style (GTK_TOOLBAR(toolbar), GTK_TOOLBAR_ICONS);
+ toolbar = x_window_create_toolbar(w_current);
if (w_current->handleboxes) {
gtk_container_add (GTK_CONTAINER (handlebox), toolbar);
} else {
gtk_box_pack_start(GTK_BOX(main_box), toolbar, FALSE, FALSE, 0);
}
-
- gtk_toolbar_append_item (GTK_TOOLBAR (toolbar),
- _("New"),
- _("New file"),
- "toolbar/new",
- x_icons_new_toolbar_pixmap(GTK_STOCK_NEW),
- (GtkSignalFunc) i_callback_action_file_new,
- w_current);
- gtk_toolbar_append_item (GTK_TOOLBAR (toolbar),
- _("Open"),
- _("Open file..."),
- "toolbar/open",
- x_icons_new_toolbar_pixmap(GTK_STOCK_OPEN),
- (GtkSignalFunc) i_callback_action_file_open,
- w_current);
- gtk_toolbar_append_item (GTK_TOOLBAR (toolbar),
- _("Save"),
- _("Save file"),
- "toolbar/save",
- x_icons_new_toolbar_pixmap(GTK_STOCK_SAVE),
- (GtkSignalFunc) i_callback_action_file_save,
- w_current);
- gtk_toolbar_append_space (GTK_TOOLBAR(toolbar));
- gtk_toolbar_append_item (GTK_TOOLBAR (toolbar),
- _("Undo"),
- _("Undo last operation"),
- "toolbar/undo",
- x_icons_new_toolbar_pixmap(GTK_STOCK_UNDO),
- (GtkSignalFunc) i_callback_action_edit_undo,
- w_current);
- gtk_toolbar_append_item (GTK_TOOLBAR (toolbar),
- _("Redo"),
- _("Redo last undo"),
- "toolbar/redo",
- x_icons_new_toolbar_pixmap(GTK_STOCK_REDO),
- (GtkSignalFunc) i_callback_action_edit_redo,
- w_current);
- gtk_toolbar_append_space (GTK_TOOLBAR(toolbar));
- /* not part of any radio button group */
- gtk_toolbar_append_item (GTK_TOOLBAR (toolbar),
- _("Component"),
- _("Add component...\nSelect library and component
from list, move the mouse into main window, click to place\nRight mouse button
to cancel"),
- "toolbar/component",
-
x_icons_new_toolbar_pixmap(GSCHEM_STOCK_COMPONENT),
- (GtkSignalFunc) i_callback_action_add_component,
- w_current);
- w_current->toolbar_net =
- gtk_toolbar_append_element(GTK_TOOLBAR(toolbar),
- GTK_TOOLBAR_CHILD_RADIOBUTTON,
- NULL,
- _("Nets"),
- _("Add nets mode\nRight mouse button to
cancel"),
- "toolbar/nets",
- x_icons_new_toolbar_pixmap(GSCHEM_STOCK_NET),
- (GtkSignalFunc) i_callback_action_add_net,
- w_current);
- w_current->toolbar_bus =
- gtk_toolbar_append_element(GTK_TOOLBAR(toolbar),
- GTK_TOOLBAR_CHILD_RADIOBUTTON,
- w_current->toolbar_net,
- _("Bus"),
- _("Add buses mode\nRight mouse button to
cancel"),
- "toolbar/bus",
- x_icons_new_toolbar_pixmap(GSCHEM_STOCK_BUS),
- (GtkSignalFunc) i_callback_action_add_bus,
- w_current);
- /* not part of any radio button group */
- gtk_toolbar_append_item (GTK_TOOLBAR (toolbar),
- _("Text"),
- _("Add Text..."),
- "toolbar/text",
- x_icons_new_toolbar_pixmap(GSCHEM_STOCK_TEXT),
- (GtkSignalFunc) i_callback_action_add_text,
- w_current);
- gtk_toolbar_append_space (GTK_TOOLBAR(toolbar));
- w_current->toolbar_select =
- gtk_toolbar_append_element(GTK_TOOLBAR(toolbar),
- GTK_TOOLBAR_CHILD_RADIOBUTTON,
- w_current->toolbar_bus,
- _("Select"),
- _("Select mode"),
- "toolbar/select",
-
x_icons_new_toolbar_pixmap(GSCHEM_STOCK_SELECT),
- (GtkSignalFunc)
i_callback_action_edit_select,
- w_current);
-
-
- gtk_toolbar_append_space (GTK_TOOLBAR(toolbar));
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w_current->toolbar_select),
- TRUE);
}
@@ -960,4 +869,205 @@ x_window_close_page (GSCHEM_TOPLEVEL *w_current, PAGE
*page)
}
}
-
+/*! \brief Create this application's main toolbar.
+ *
+ * \param [in] w_current The GSCHEM_TOPLEVEL. This pointer gets provided to
+ * this menu's signal handlers. This function also stores references to
+ * specific menu items within the GSCHEM_TOPLEVEL.
+ */
+static GtkWidget *x_window_create_toolbar(GSCHEM_TOPLEVEL *w_current)
+{
+ GtkToolbar *toolbar = GTK_TOOLBAR(gtk_toolbar_new());
+
+ gtk_toolbar_set_orientation(toolbar, GTK_ORIENTATION_HORIZONTAL);
+
+ gtk_toolbar_set_style(toolbar, GTK_TOOLBAR_ICONS);
+
+ gtk_toolbar_append_item(toolbar,
+ _("New"),
+ _("New file"),
+ "toolbar/new",
+ x_icons_new_toolbar_pixmap(GTK_STOCK_NEW),
+ (GtkSignalFunc) i_callback_action_file_new,
+ w_current);
+
+ gtk_toolbar_append_item(toolbar,
+ _("Open"),
+ _("Open file..."),
+ "toolbar/open",
+ x_icons_new_toolbar_pixmap(GTK_STOCK_OPEN),
+ (GtkSignalFunc) i_callback_action_file_open,
+ w_current);
+
+ gtk_toolbar_append_item(toolbar,
+ _("Save"),
+ _("Save file"),
+ "toolbar/save",
+ x_icons_new_toolbar_pixmap(GTK_STOCK_SAVE),
+ (GtkSignalFunc) i_callback_action_file_save,
+ w_current);
+
+ gtk_toolbar_append_space(toolbar);
+
+ gtk_toolbar_append_item(toolbar,
+ _("Undo"),
+ _("Undo last operation"),
+ "toolbar/undo",
+ x_icons_new_toolbar_pixmap(GTK_STOCK_UNDO),
+ (GtkSignalFunc) i_callback_action_edit_undo,
+ w_current);
+
+ gtk_toolbar_append_item(toolbar,
+ _("Redo"),
+ _("Redo last undo"),
+ "toolbar/redo",
+ x_icons_new_toolbar_pixmap(GTK_STOCK_REDO),
+ (GtkSignalFunc) i_callback_action_edit_redo,
+ w_current);
+
+ gtk_toolbar_append_space(toolbar);
+
+ /* not part of any radio button group */
+ gtk_toolbar_append_item(toolbar,
+ _("Component"),
+ _("Add component...\nSelect library and component
from list, move the mouse into main window, click to place\nRight mouse button
to cancel"),
+ "toolbar/component",
+ x_icons_new_toolbar_pixmap(GSCHEM_STOCK_COMPONENT),
+ (GtkSignalFunc) i_callback_action_add_component,
+ w_current);
+
+ w_current->toolbar_net =
+ gtk_toolbar_append_element(toolbar,
+ GTK_TOOLBAR_CHILD_RADIOBUTTON,
+ NULL,
+ _("Nets"),
+ _("Add nets mode\nRight mouse button to
cancel"),
+ "toolbar/nets",
+ x_icons_new_toolbar_pixmap(GSCHEM_STOCK_NET),
+ (GtkSignalFunc) i_callback_action_add_net,
+ w_current);
+
+ w_current->toolbar_bus =
+ gtk_toolbar_append_element(toolbar,
+ GTK_TOOLBAR_CHILD_RADIOBUTTON,
+ w_current->toolbar_net,
+ _("Bus"),
+ _("Add buses mode\nRight mouse button to
cancel"),
+ "toolbar/bus",
+ x_icons_new_toolbar_pixmap(GSCHEM_STOCK_BUS),
+ (GtkSignalFunc) i_callback_action_add_bus,
+ w_current);
+
+ /* not part of any radio button group */
+ gtk_toolbar_append_item(toolbar,
+ _("Text"),
+ _("Add Text..."),
+ "toolbar/text",
+ x_icons_new_toolbar_pixmap(GSCHEM_STOCK_TEXT),
+ (GtkSignalFunc) i_callback_action_add_text,
+ w_current);
+
+ gtk_toolbar_append_space(toolbar);
+
+ w_current->toolbar_select =
+ gtk_toolbar_append_element(toolbar,
+ GTK_TOOLBAR_CHILD_RADIOBUTTON,
+ w_current->toolbar_bus,
+ _("Select"),
+ _("Select mode"),
+ "toolbar/select",
+ x_icons_new_toolbar_pixmap(GSCHEM_STOCK_SELECT),
+ (GtkSignalFunc) i_callback_action_edit_select,
+ w_current);
+
+ gtk_toolbar_append_space(toolbar);
+
+ gtk_toolbar_append_item(toolbar,
+ _("Arc"),
+ _("Add Arc"),
+ "toolbar/arc",
+ x_icons_new_toolbar_pixmap(GSCHEM_STOCK_ARC),
+ (GtkSignalFunc) i_callback_action_add_arc,
+ w_current);
+
+ gtk_toolbar_append_item(toolbar,
+ _("Box"),
+ _("Add Box"),
+ "toolbar/box",
+ x_icons_new_toolbar_pixmap(GSCHEM_STOCK_BOX),
+ (GtkSignalFunc) i_callback_action_add_box,
+ w_current);
+
+ gtk_toolbar_append_item(toolbar,
+ _("Circle"),
+ _("Add Circle"),
+ "toolbar/circle",
+ x_icons_new_toolbar_pixmap(GSCHEM_STOCK_CIRCLE),
+ (GtkSignalFunc) i_callback_action_add_circle,
+ w_current);
+
+ gtk_toolbar_append_item(toolbar,
+ _("Line"),
+ _("Add Line"),
+ "toolbar/line",
+ x_icons_new_toolbar_pixmap(GSCHEM_STOCK_LINE),
+ (GtkSignalFunc) i_callback_action_add_line,
+ w_current);
+
+ gtk_toolbar_append_item(toolbar,
+ _("Pin"),
+ _("Add Pin"),
+ "toolbar/pin",
+ x_icons_new_toolbar_pixmap(GSCHEM_STOCK_PIN),
+ (GtkSignalFunc) i_callback_action_add_pin,
+ w_current);
+
+ gtk_toolbar_append_space(toolbar);
+
+ gtk_toolbar_append_item(toolbar,
+ _("Up Hierarchy"),
+ _("Up Hierarchy"),
+ "toolbar/up-hierarchy",
+ x_icons_new_toolbar_pixmap(GSCHEM_STOCK_UP),
+ (GtkSignalFunc) i_callback_action_hierarchy_up,
+ w_current);
+
+ gtk_toolbar_append_item(toolbar,
+ _("Down Schematic"),
+ _("Down Schematic"),
+ "toolbar/down-schematic",
+
x_icons_new_toolbar_pixmap(GSCHEM_STOCK_DOWN_SCHEMATIC),
+ (GtkSignalFunc)
i_callback_action_hierarchy_down_schematic,
+ w_current);
+
+ gtk_toolbar_append_item(toolbar,
+ _("Down Symbol"),
+ _("Down Symbol"),
+ "toolbar/down-symbol",
+ x_icons_new_toolbar_pixmap(GSCHEM_STOCK_DOWN_SYMBOL),
+ (GtkSignalFunc)
i_callback_action_hierarchy_down_symbol,
+ w_current);
+
+ gtk_toolbar_append_space(toolbar);
+
+ gtk_toolbar_append_item(toolbar,
+ _("Zoom In"),
+ _("Zoom In"),
+ "toolbar/zoom-in",
+ x_icons_new_toolbar_pixmap(GTK_STOCK_ZOOM_IN),
+ (GtkSignalFunc) i_callback_action_view_zoom_in,
+ w_current);
+
+ gtk_toolbar_append_item(toolbar,
+ _("Zoom Out"),
+ _("Zoom Out"),
+ "toolbar/zoom-out",
+ x_icons_new_toolbar_pixmap(GTK_STOCK_ZOOM_OUT),
+ (GtkSignalFunc) i_callback_action_view_zoom_out,
+ w_current);
+
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w_current->toolbar_select),
+ TRUE);
+
+ return GTK_WIDGET(toolbar);
+}
--
1.5.6
_______________________________________________
geda-dev mailing list
[email protected]
http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev