bleh
authordarco <darco@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Tue, 19 Apr 2005 21:58:44 +0000 (21:58 +0000)
committerdarco <darco@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Tue, 19 Apr 2005 21:58:44 +0000 (21:58 +0000)
git-svn-id: http://svn.voria.com/code@19 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-core/trunk/examples/business_card.sif
synfig-core/trunk/src/sinfg/Makefile.am
synfig-core/trunk/src/sinfg/node.cpp
synfig-core/trunk/src/sinfg/node.h
synfig-core/trunk/src/sinfg/proto/nodebase.px
synfig-core/trunk/src/sinfg/proto/proto.m4
synfig-core/trunk/src/sinfg/protocol.h [new file with mode: 0644]
synfig-core/trunk/src/tool/Makefile.am

index c2137c3..a3c1b41 100644 (file)
@@ -1,8 +1,14 @@
 <?xml version="1.0"?>
-<canvas version="0.1" width="1050" height="1500" xres="5905.511856" yres="5905.511856" view-box="-3.500000 5.000000 3.500000 -5.000000" antialias="1" fps="30.000" begin-time="0f" end-time="0f">
+<canvas version="0.1" width="1050" height="1575" xres="5905.511856" yres="5905.511856" view-box="-3.500000 5.250000 3.500000 -5.250000" antialias="1" fps="30.000" begin-time="0f" end-time="0f" bgcolor="0.500000 0.500000 0.500000 1.000000">
   <name>Untitled0</name>
+  <meta name="grid_show" content="0"/>
+  <meta name="grid_size" content="0.250000 0.250000"/>
+  <meta name="grid_snap" content="1"/>
+  <meta name="guide_show" content="1"/>
+  <meta name="guide_snap" content="0"/>
+  <meta name="onion_skin" content="0"/>
   <defs>
-    <canvas id="IndividualCard" width="525" height="300" view-box="-1.750000 1.000000 1.750000 -1.000000">
+    <canvas id="IndividualCard" width="525" height="300" view-box="-1.750000 1.000000 1.750000 -1.000000" bgcolor="0.500000 0.500000 0.500000 1.000000">
       <layer type="SolidColor" active="true" version="0.1">
         <param name="z_depth">
           <real value="0.0000000000"/>
@@ -83,6 +89,9 @@
                   <stripes>
                     <integer value="32"/>
                   </stripes>
+                  <width>
+                    <real value="0.5000000000"/>
+                  </width>
                 </stripes>
               </param>
               <param name="loop">
           <real value="0.0000000000"/>
         </param>
         <param name="time_offset">
-          <time value="0f"/>
+          <time value="0s"/>
+        </param>
+        <param name="children_lock">
+          <bool value="false"/>
         </param>
       </layer>
       <layer type="linear_gradient" active="true" version="0.0" desc="Radial Lighting004">
         </param>
         <param name="p2">
           <vector>
-            <x>0.7500000000</x>
+            <x>1.7500000000</x>
             <y>1.0000000000</y>
           </vector>
         </param>
         <param name="gradient">
-          <gradient>
+          <gradient guid="E9ABA06FDFC8A898027AF5ADD72616D2">
             <color pos="0.000000">
               <r>1.000000</r>
               <g>1.000000</g>
               <b>1.000000</b>
               <a>1.000000</a>
             </color>
-            <color pos="0.154386">
+            <color pos="0.107784">
               <r>0.000000</r>
               <g>0.000000</g>
               <b>0.000000</b>
               <a>1.000000</a>
             </color>
-            <color pos="1.000000">
+            <color pos="0.760479">
               <r>1.000000</r>
               <g>1.000000</g>
               <b>1.000000</b>
               <param name="grid_fit">
                 <bool value="false"/>
               </param>
+              <param name="invert">
+                <bool value="false"/>
+              </param>
             </layer>
             <layer type="blur" active="true" version="0.2">
               <param name="z_depth">
               <param name="grid_fit">
                 <bool value="false"/>
               </param>
+              <param name="invert">
+                <bool value="false"/>
+              </param>
             </layer>
             <layer type="rotate" active="true" version="0.1">
               <param name="origin">
           <real value="0.0000000000"/>
         </param>
         <param name="time_offset">
-          <time value="0f"/>
+          <time value="0s"/>
+        </param>
+        <param name="children_lock">
+          <bool value="false"/>
         </param>
       </layer>
       <layer type="text" active="true" version="0.2" desc="Employee Title">
         <param name="grid_fit">
           <bool value="false"/>
         </param>
+        <param name="invert">
+          <bool value="false"/>
+        </param>
       </layer>
       <layer type="text" active="true" version="0.2" desc="Employee Name">
         <param name="z_depth">
         <param name="grid_fit">
           <bool value="false"/>
         </param>
+        <param name="invert">
+          <bool value="false"/>
+        </param>
       </layer>
       <layer type="text" active="true" version="0.2" desc="Company Address">
         <param name="z_depth">
@@ -607,6 +634,9 @@ http://voria.com/</string>
         <param name="grid_fit">
           <bool value="false"/>
         </param>
+        <param name="invert">
+          <bool value="false"/>
+        </param>
       </layer>
       <layer type="PasteCanvas" active="true" version="0.1">
         <param name="z_depth">
@@ -642,12 +672,15 @@ http://voria.com/</string>
                   <y>0.0000000000</y>
                 </vector>
               </param>
-              <param name="canvas" use="../examples/logo.sif#"/>
+              <param name="canvas" use="logo.sif#"/>
               <param name="zoom">
                 <real value="-0.5000000000"/>
               </param>
               <param name="time_offset">
-                <time value="0f"/>
+                <time value="0s"/>
+              </param>
+              <param name="children_lock">
+                <bool value="false"/>
               </param>
             </layer>
             <layer type="shade" active="true" version="0.2">
@@ -693,7 +726,10 @@ http://voria.com/</string>
           <real value="0.0000000000"/>
         </param>
         <param name="time_offset">
-          <time value="0f"/>
+          <time value="0s"/>
+        </param>
+        <param name="children_lock">
+          <bool value="false"/>
         </param>
       </layer>
       <layer type="rectangle" active="true" version="0.2" desc="Clipping Rectangle">
@@ -759,6 +795,216 @@ http://voria.com/</string>
       <real value="0.0000000000"/>
     </param>
     <param name="amount">
+      <real value="0.3000000119"/>
+    </param>
+    <param name="blend_method">
+      <integer value="0"/>
+    </param>
+    <param name="origin">
+      <vector>
+        <x>-1.7500000000</x>
+        <y>4.2500000000</y>
+      </vector>
+    </param>
+    <param name="canvas">
+      <canvas>
+        <layer type="linear_gradient" active="true" version="0.0" desc="Radial Lighting004">
+          <param name="z_depth">
+            <real value="0.0000000000"/>
+          </param>
+          <param name="amount">
+            <real value="1.0000000000"/>
+          </param>
+          <param name="blend_method">
+            <integer value="0"/>
+          </param>
+          <param name="p1">
+            <vector>
+              <x>-1.3750000000</x>
+              <y>1.0000000000</y>
+            </vector>
+          </param>
+          <param name="p2">
+            <vector>
+              <x>-1.3750000000</x>
+              <y>-1.0000000000</y>
+            </vector>
+          </param>
+          <param name="gradient">
+            <stripes type="gradient">
+              <color1>
+                <color>
+                  <r>0.000000</r>
+                  <g>0.000000</g>
+                  <b>0.000000</b>
+                  <a>0.000000</a>
+                </color>
+              </color1>
+              <color2>
+                <color>
+                  <r>0.000000</r>
+                  <g>0.000000</g>
+                  <b>0.000000</b>
+                  <a>1.000000</a>
+                </color>
+              </color2>
+              <stripes>
+                <integer value="32"/>
+              </stripes>
+              <width>
+                <real value="0.5000000000"/>
+              </width>
+            </stripes>
+          </param>
+          <param name="loop">
+            <bool value="true"/>
+          </param>
+          <param name="zigzag">
+            <bool value="false"/>
+          </param>
+        </layer>
+        <layer type="rectangle" active="true" version="0.2" desc="Left Gray Bar">
+          <param name="z_depth">
+            <real value="0.0000000000"/>
+          </param>
+          <param name="amount">
+            <real value="1.0000000000"/>
+          </param>
+          <param name="blend_method">
+            <integer value="1"/>
+          </param>
+          <param name="color">
+            <color>
+              <r>0.000000</r>
+              <g>0.000000</g>
+              <b>0.000000</b>
+              <a>1.000000</a>
+            </color>
+          </param>
+          <param name="point1">
+            <vector>
+              <x>-1.7500000000</x>
+              <y>1.0000000000</y>
+            </vector>
+          </param>
+          <param name="point2">
+            <vector>
+              <x>-1.3750000000</x>
+              <y>-9.5000000000</y>
+            </vector>
+          </param>
+          <param name="expand">
+            <real value="0.0000000000"/>
+          </param>
+          <param name="invert">
+            <bool value="false"/>
+          </param>
+        </layer>
+        <layer type="rectangle" active="true" version="0.2" desc="Left Gray Bar">
+          <param name="z_depth">
+            <real value="0.0000000000"/>
+          </param>
+          <param name="amount">
+            <real value="1.0000000000"/>
+          </param>
+          <param name="blend_method">
+            <integer value="1"/>
+          </param>
+          <param name="color">
+            <color>
+              <r>0.000000</r>
+              <g>0.000000</g>
+              <b>0.000000</b>
+              <a>1.000000</a>
+            </color>
+          </param>
+          <param name="point1">
+            <vector>
+              <x>1.7500000000</x>
+              <y>1.0000000000</y>
+            </vector>
+          </param>
+          <param name="point2">
+            <vector>
+              <x>2.1250000000</x>
+              <y>-9.5000000000</y>
+            </vector>
+          </param>
+          <param name="expand">
+            <real value="0.0000000000"/>
+          </param>
+          <param name="invert">
+            <bool value="false"/>
+          </param>
+        </layer>
+      </canvas>
+    </param>
+    <param name="zoom">
+      <real value="0.0000000000"/>
+    </param>
+    <param name="time_offset">
+      <time value="0s"/>
+    </param>
+    <param name="children_lock">
+      <bool value="false"/>
+    </param>
+  </layer>
+  <layer type="linear_gradient" active="true" version="0.0" desc="Radial Lighting004">
+    <param name="z_depth">
+      <real value="0.0000000000"/>
+    </param>
+    <param name="amount">
+      <real value="1.0000000000"/>
+    </param>
+    <param name="blend_method">
+      <integer value="16"/>
+    </param>
+    <param name="p1">
+      <vector>
+        <x>-3.5000000000</x>
+        <y>5.2500000000</y>
+      </vector>
+    </param>
+    <param name="p2">
+      <vector>
+        <x>0.0000000000</x>
+        <y>5.2500000000</y>
+      </vector>
+    </param>
+    <param name="gradient">
+      <gradient guid="E9ABA06FDFC8A898027AF5ADD72616D2">
+        <color pos="0.000000">
+          <r>1.000000</r>
+          <g>1.000000</g>
+          <b>1.000000</b>
+          <a>1.000000</a>
+        </color>
+        <color pos="0.107784">
+          <r>0.000000</r>
+          <g>0.000000</g>
+          <b>0.000000</b>
+          <a>1.000000</a>
+        </color>
+        <color pos="0.760479">
+          <r>1.000000</r>
+          <g>1.000000</g>
+          <b>1.000000</b>
+          <a>1.000000</a>
+        </color>
+      </gradient>
+    </param>
+    <param name="loop">
+      <bool value="true"/>
+    </param>
+    <param name="zigzag">
+      <bool value="false"/>
+    </param>
+  </layer>
+  <layer type="PasteCanvas" active="true" version="0.1">
+    <param name="z_depth">
+      <real value="0.0000000000"/>
+    </param>
+    <param name="amount">
       <real value="1.0000000000"/>
     </param>
     <param name="blend_method">
@@ -775,7 +1021,10 @@ http://voria.com/</string>
       <real value="0.0000000000"/>
     </param>
     <param name="time_offset">
-      <time value="0f"/>
+      <time value="0s"/>
+    </param>
+    <param name="children_lock">
+      <bool value="false"/>
     </param>
   </layer>
   <layer type="PasteCanvas" active="true" version="0.1">
@@ -799,7 +1048,10 @@ http://voria.com/</string>
       <real value="0.0000000000"/>
     </param>
     <param name="time_offset">
-      <time value="0f"/>
+      <time value="0s"/>
+    </param>
+    <param name="children_lock">
+      <bool value="false"/>
     </param>
   </layer>
   <layer type="PasteCanvas" active="true" version="0.1">
@@ -823,7 +1075,10 @@ http://voria.com/</string>
       <real value="0.0000000000"/>
     </param>
     <param name="time_offset">
-      <time value="0f"/>
+      <time value="0s"/>
+    </param>
+    <param name="children_lock">
+      <bool value="false"/>
     </param>
   </layer>
   <layer type="PasteCanvas" active="true" version="0.1">
@@ -847,7 +1102,10 @@ http://voria.com/</string>
       <real value="0.0000000000"/>
     </param>
     <param name="time_offset">
-      <time value="0f"/>
+      <time value="0s"/>
+    </param>
+    <param name="children_lock">
+      <bool value="false"/>
     </param>
   </layer>
   <layer type="PasteCanvas" active="true" version="0.1">
@@ -871,7 +1129,10 @@ http://voria.com/</string>
       <real value="0.0000000000"/>
     </param>
     <param name="time_offset">
-      <time value="0f"/>
+      <time value="0s"/>
+    </param>
+    <param name="children_lock">
+      <bool value="false"/>
     </param>
   </layer>
   <layer type="PasteCanvas" active="true" version="0.1">
@@ -895,7 +1156,10 @@ http://voria.com/</string>
       <real value="0.0000000000"/>
     </param>
     <param name="time_offset">
-      <time value="0f"/>
+      <time value="0s"/>
+    </param>
+    <param name="children_lock">
+      <bool value="false"/>
     </param>
   </layer>
   <layer type="PasteCanvas" active="true" version="0.1">
@@ -919,7 +1183,10 @@ http://voria.com/</string>
       <real value="0.0000000000"/>
     </param>
     <param name="time_offset">
-      <time value="0f"/>
+      <time value="0s"/>
+    </param>
+    <param name="children_lock">
+      <bool value="false"/>
     </param>
   </layer>
   <layer type="PasteCanvas" active="true" version="0.1">
@@ -943,7 +1210,10 @@ http://voria.com/</string>
       <real value="0.0000000000"/>
     </param>
     <param name="time_offset">
-      <time value="0f"/>
+      <time value="0s"/>
+    </param>
+    <param name="children_lock">
+      <bool value="false"/>
     </param>
   </layer>
   <layer type="PasteCanvas" active="true" version="0.1">
@@ -967,7 +1237,10 @@ http://voria.com/</string>
       <real value="0.0000000000"/>
     </param>
     <param name="time_offset">
-      <time value="0f"/>
+      <time value="0s"/>
+    </param>
+    <param name="children_lock">
+      <bool value="false"/>
     </param>
   </layer>
   <layer type="PasteCanvas" active="true" version="0.1">
@@ -991,7 +1264,10 @@ http://voria.com/</string>
       <real value="0.0000000000"/>
     </param>
     <param name="time_offset">
-      <time value="0f"/>
+      <time value="0s"/>
+    </param>
+    <param name="children_lock">
+      <bool value="false"/>
     </param>
   </layer>
 </canvas>
index ff02128..f8f712f 100644 (file)
@@ -1,5 +1,7 @@
 # $Header: /opt/voria/cvs/sinfg/src/sinfg/Makefile.am,v 1.3 2005/01/21 19:29:10 darco Exp $
 
+# SUBDIRS=proto
+
 MAINTAINERCLEANFILES=Makefile.in
 INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/libltdl
 
index 1b8f5f4..fdd2bfe 100644 (file)
@@ -31,6 +31,7 @@
 #endif
 
 #include "node.h"
+#include "proto/nodebase.h"
 
 #ifdef HASH_MAP_H
 #include HASH_MAP_H
index 4612a7a..ac87725 100644 (file)
@@ -234,6 +234,8 @@ guid_cast(const sinfg::GUID& guid)
        return etl::handle<T>::cast_dynamic(sinfg::find_node(guid));
 }
 
+typedef etl::handle<Node> NodeHandle;
+
 }; // END of namespace sinfg
 
 /* === E N D =============================================================== */
index 77559c8..19b4ea2 100644 (file)
 
 /* === M A C R O S ========================================================= */
 
-/*
-
-#define DEFINE_SIMPLE_FUNC(func_name, ret_type) \
-       private: sigc::slot<ret_type> slot_##func_name; \
-       public: ret_type func_name() { return slot_##func_name(); }
-
-#define DEFINE_SIMPLE_FUNC_CONST(func_name, ret_type) \
-       private: sigc::slot<ret_type> slotconst_##func_name; \
-       public: ret_type func_name()const { return slotconst_##func_name(); }
-
-#define DECLARE_FUNC(func_name, ret_type, ...) \
-       private: sigc::slot<ret_type, __VA_ARGS__> slot_##func_name; 
-//     public: ret_type func_name(__VA_ARGS__)
-
-#define DECLARE_FUNC_CONST(func_name, ret_type, ...) \
-       private: sigc::slot<ret_type, __VA_ARGS__> slotconst_##func_name; 
-
-//     public: ret_type func_name(__VA_ARGS__)const
-               
-#define DEFINE_FUNC(func_name, ret_type, arg_list, ...) \
-       public: ret_type func_name(__VA_ARGS__) { return slot_##func_name arg_list; }
-
-#define DEFINE_FUNC_CONST(func_name, ret_type, arg_list, ...) \
-       public: ret_type func_name(__VA_ARGS__)const { return slotconst_##func_name arg_list; }
-
-#define DEFINE_DATA(data_name, data_type) \
-       DEFINE_SIMPLE_FUNC_CONST(get_ ## data_name, data_type); \
-       DECLARE_FUNC(set_ ## data_name, void, data_type); \
-       DEFINE_FUNC(set_ ## data_name, void, (x), data_type x)
-*/
-
 /* === T Y P E D E F S ===================================================== */
 
 /* === C L A S S E S & S T R U C T S ======================================= */
@@ -71,6 +40,9 @@
 namespace sinfg {
 namespace Proto {
 
+typedef int Query;
+typedef int NodeList;
+
 class NodeBase : public Protocol
 {
 public:
index 70c5299..91800eb 100644 (file)
@@ -16,17 +16,17 @@ ifelse($#,1,,`v$1`'ifelse($#,2,,`, _PRINT_ARGS2(incr($1), shift(shift($@)))')')d
 
 dnl PX_DEFINE_FUNC(func_name, ret_type, args...)
 define(`PX_DEFINE_FUNC',`
-       private: sigc::slot< $2`'ifelse($#,2,,`, shift(shift($@))') > slot_$1;
-       public: $2 $1(ifelse($#,2,,`_PRINT_ARGS(1,shift(shift($@)))')) {
-               return slot_$1(ifelse($#,2,,`_PRINT_ARGS2(1,shift(shift($@)))'));
+       sigc::slot< $2`'ifelse($#,2,,`, shift(shift($@))') > _slot_$1;
+       $2 $1(ifelse($#,2,,`_PRINT_ARGS(1,shift(shift($@)))')) {
+               return _slot_$1(ifelse($#,2,,`_PRINT_ARGS2(1,shift(shift($@)))'));
        }
 ')dnl
 
 dnl PX_DEFINE_FUNC_CONST(func_name, ret_type, args...)
 define(`PX_DEFINE_FUNC_CONST',`
-       private: sigc::slot< $2`'ifelse($#,2,,`, shift(shift($@))') > slotconst_$1;
-       public: $2 $1(ifelse($#,2,,`_PRINT_ARGS(1,shift(shift($@)))'))const {
-               return slotconst_$1(ifelse($#,2,,`_PRINT_ARGS2(1,shift(shift($@)))'));
+       sigc::slot< $2`'ifelse($#,2,,`, shift(shift($@))') > _slot_$1_const;
+       $2 $1(ifelse($#,2,,`_PRINT_ARGS(1,shift(shift($@)))'))const {
+               return _slot_$1_const(ifelse($#,2,,`_PRINT_ARGS2(1,shift(shift($@)))'));
        }
 ')dnl
 
diff --git a/synfig-core/trunk/src/sinfg/protocol.h b/synfig-core/trunk/src/sinfg/protocol.h
new file mode 100644 (file)
index 0000000..33ec3f1
--- /dev/null
@@ -0,0 +1,65 @@
+/* === S I N F G =========================================================== */
+/*!    \file protocol.h
+**     \brief Template Header
+**
+**     $Id: template.h,v 1.1.1.1 2005/01/04 01:23:09 darco Exp $
+**
+**     \legal
+**     Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+**     This software and associated documentation
+**     are CONFIDENTIAL and PROPRIETARY property of
+**     the above-mentioned copyright holder.
+**
+**     You may not copy, print, publish, or in any
+**     other way distribute this software without
+**     a prior written agreement with
+**     the copyright holder.
+**     \endlegal
+*/
+/* ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __SINFG_PROTOCOL_H
+#define __SINFG_PROTOCOL_H
+
+/* === H E A D E R S ======================================================= */
+
+#include <sigc++/signal.h>
+
+/* === M A C R O S ========================================================= */
+
+/* === T Y P E D E F S ===================================================== */
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+namespace sinfg {
+
+class Object
+{
+public:
+       
+       sigc::signal_
+       bool find_protocol(Protocol& proto)
+       {
+               
+       }
+};
+
+class Protocol
+{
+public:
+       class Type;
+       
+}; // END of class Protocol
+
+class Protocol::Type
+{
+}; // END of class Protocol::Type
+
+}; // END of namespace sinfg
+
+/* === E N D =============================================================== */
+
+#endif
index 78e5c18..3d55d51 100644 (file)
@@ -4,10 +4,11 @@ MAINTAINERCLEANFILES=Makefile.in
 
 INCLUDES=-I$(top_srcdir)/src
 
-bin_PROGRAMS   =       sinfg
-sinfg_SOURCES = main.cpp
-sinfg_LDADD = -L../sinfg -lsinfg @SINFG_LIBS@
-sinfg_CXXFLAGS = -lsinfg @SINFG_CFLAGS@
-#sinfg_LDFLAGS=-export-dynamic  -dlopen self
+bin_PROGRAMS   =       synfig
+
+synfig_SOURCES = main.cpp
+synfig_LDADD = -L../sinfg -lsinfg @SINFG_LIBS@
+synfig_CXXFLAGS = -lsinfg @SINFG_CFLAGS@
+#synfig_LDFLAGS=-export-dynamic  -dlopen self
 #-dlopen ../modules/example/libexample.la