@@ DEV @@ : Try to use Java MVC for graphics component. 15/1115/6
Bruno JOFRET [Fri, 25 Jun 2010 06:23:36 +0000 (08:23 +0200)]
Change-Id: I917c0e6857873067aa267efbc8bcefdd67fb6be7

30 files changed:
scilab/Scilab.sln
scilab/Scilab_f2c.sln
scilab/modules/graphic_objects/Makefile.am
scilab/modules/graphic_objects/Makefile.in
scilab/modules/graphic_objects/includes/createGraphicObject.h [new file with mode: 0644]
scilab/modules/graphic_objects/includes/getGraphicObjectProperty.h [new file with mode: 0644]
scilab/modules/graphic_objects/includes/returnType.h [new file with mode: 0644]
scilab/modules/graphic_objects/includes/setGraphicObjectProperty.h [new file with mode: 0644]
scilab/modules/graphic_objects/src/c/graphic_objects.vcproj
scilab/modules/graphic_objects/src/cpp/createGraphicObject.cpp [new file with mode: 0644]
scilab/modules/graphic_objects/src/cpp/getGraphicObjectProperty.cpp [new file with mode: 0644]
scilab/modules/graphic_objects/src/cpp/setGraphicObjectProperty.cpp [new file with mode: 0644]
scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/CallGraphicController.java [new file with mode: 0644]
scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/graphicController/GraphicController.java
scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/graphicModel/GraphicModel.java
scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/graphicObject/GraphicObject.java
scilab/modules/graphic_objects/src/jni/CallGraphicController.cpp [new file with mode: 0644]
scilab/modules/graphic_objects/src/jni/CallGraphicController.hxx [new file with mode: 0644]
scilab/modules/graphic_objects/src/jni/graphic_objects.giws.xml
scilab/modules/graphic_objects/tests/java/org/scilab/tests/modules/graphic_objects/testGraphicObject.java
scilab/modules/graphics/Makefile.am
scilab/modules/graphics/Makefile.in
scilab/modules/graphics/graphics.vcproj
scilab/modules/graphics/includes/ObjectStructure.h
scilab/modules/graphics/macros/%h_p.sci
scilab/modules/graphics/src/c/BuildObjects.c
scilab/modules/graphics/src/c/getHandleProperty/GetHashTable.c
scilab/modules/graphics/src/c/getHandleProperty/getHandleProperty.h
scilab/modules/graphics/src/c/getHandleProperty/get_figure_name_property.c
scilab/modules/graphics/src/c/getHandleProperty/get_visible_property.c

index cd72eb3..60b640b 100644 (file)
@@ -145,6 +145,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "graphics", "modules\graphic
                {ECFFEB0C-1EDA-45EE-9A10-B18143852E17} = {ECFFEB0C-1EDA-45EE-9A10-B18143852E17}
                {DBC45B0D-6E0A-4107-B284-5A3B0C5BB50D} = {DBC45B0D-6E0A-4107-B284-5A3B0C5BB50D}
                {2DAEC214-B0B4-4BC3-96B2-77C6AD1450CD} = {2DAEC214-B0B4-4BC3-96B2-77C6AD1450CD}
+               {30F9EE41-587B-4618-8DE7-698D3FBA4985} = {30F9EE41-587B-4618-8DE7-698D3FBA4985}
                {4FC72D4A-80EE-4B1A-8724-0201C1A35621} = {4FC72D4A-80EE-4B1A-8724-0201C1A35621}
                {ED02137F-0A4F-4EF0-AC58-97ACE37FA89D} = {ED02137F-0A4F-4EF0-AC58-97ACE37FA89D}
                {6A84AD8C-BA18-4A3F-9C72-EC3DF0939E9E} = {6A84AD8C-BA18-4A3F-9C72-EC3DF0939E9E}
@@ -1183,6 +1184,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "graphic_objects", "modules\
        ProjectSection(ProjectDependencies) = postProject
                {ECFFEB0C-1EDA-45EE-9A10-B18143852E17} = {ECFFEB0C-1EDA-45EE-9A10-B18143852E17}
                {6A84AD8C-BA18-4A3F-9C72-EC3DF0939E9E} = {6A84AD8C-BA18-4A3F-9C72-EC3DF0939E9E}
+               {8BA2DDA8-BD04-4D4D-8EE6-6CAA955F7470} = {8BA2DDA8-BD04-4D4D-8EE6-6CAA955F7470}
                {43C5BAB1-1DCA-4743-A183-77E0D42FE7D0} = {43C5BAB1-1DCA-4743-A183-77E0D42FE7D0}
                {3170E4C2-1173-4264-A222-7EE8CCB3DDF7} = {3170E4C2-1173-4264-A222-7EE8CCB3DDF7}
                {A5911CD7-F8E8-440C-A23E-4843A0636F3A} = {A5911CD7-F8E8-440C-A23E-4843A0636F3A}
@@ -2361,6 +2363,14 @@ Global
                {968FD6C1-5845-4B22-B61E-F6DE987D47AD}.Release|Win32.Build.0 = Release|Win32
                {968FD6C1-5845-4B22-B61E-F6DE987D47AD}.Release|x64.ActiveCfg = Release|x64
                {968FD6C1-5845-4B22-B61E-F6DE987D47AD}.Release|x64.Build.0 = Release|x64
+               {30F9EE41-587B-4618-8DE7-698D3FBA4985}.Debug|Win32.ActiveCfg = Debug|Win32
+               {30F9EE41-587B-4618-8DE7-698D3FBA4985}.Debug|x64.ActiveCfg = Debug|x64
+               {30F9EE41-587B-4618-8DE7-698D3FBA4985}.Release|Win32.ActiveCfg = Release|Win32
+               {30F9EE41-587B-4618-8DE7-698D3FBA4985}.Release|x64.ActiveCfg = Release|x64
+               {A3193DF3-A764-4B51-B240-9285289C337E}.Debug|Win32.ActiveCfg = Debug|Win32
+               {A3193DF3-A764-4B51-B240-9285289C337E}.Debug|x64.ActiveCfg = Debug|x64
+               {A3193DF3-A764-4B51-B240-9285289C337E}.Release|Win32.ActiveCfg = Release|Win32
+               {A3193DF3-A764-4B51-B240-9285289C337E}.Release|x64.ActiveCfg = Release|x64
                {ABCB724E-8534-4420-AC12-7C33A606ABA3}.Debug|Win32.ActiveCfg = Debug|Win32
                {ABCB724E-8534-4420-AC12-7C33A606ABA3}.Debug|Win32.Build.0 = Debug|Win32
                {ABCB724E-8534-4420-AC12-7C33A606ABA3}.Debug|x64.ActiveCfg = Debug|x64
index 307c4ec..aa9bfa3 100644 (file)
@@ -145,6 +145,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "graphics", "modules\graphic
                {ECFFEB0C-1EDA-45EE-9A10-B18143852E17} = {ECFFEB0C-1EDA-45EE-9A10-B18143852E17}
                {DBC45B0D-6E0A-4107-B284-5A3B0C5BB50D} = {DBC45B0D-6E0A-4107-B284-5A3B0C5BB50D}
                {2DAEC214-B0B4-4BC3-96B2-77C6AD1450CD} = {2DAEC214-B0B4-4BC3-96B2-77C6AD1450CD}
+               {30F9EE41-587B-4618-8DE7-698D3FBA4985} = {30F9EE41-587B-4618-8DE7-698D3FBA4985}
                {4FC72D4A-80EE-4B1A-8724-0201C1A35621} = {4FC72D4A-80EE-4B1A-8724-0201C1A35621}
                {ED02137F-0A4F-4EF0-AC58-97ACE37FA89D} = {ED02137F-0A4F-4EF0-AC58-97ACE37FA89D}
                {6A84AD8C-BA18-4A3F-9C72-EC3DF0939E9E} = {6A84AD8C-BA18-4A3F-9C72-EC3DF0939E9E}
@@ -1181,6 +1182,7 @@ EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "graphic_objects", "modules\graphic_objects\src\c\graphic_objects.vcproj", "{30F9EE41-587B-4618-8DE7-698D3FBA4985}"
        ProjectSection(ProjectDependencies) = postProject
                {6A84AD8C-BA18-4A3F-9C72-EC3DF0939E9E} = {6A84AD8C-BA18-4A3F-9C72-EC3DF0939E9E}
+               {8BA2DDA8-BD04-4D4D-8EE6-6CAA955F7470} = {8BA2DDA8-BD04-4D4D-8EE6-6CAA955F7470}
                {43C5BAB1-1DCA-4743-A183-77E0D42FE7D0} = {43C5BAB1-1DCA-4743-A183-77E0D42FE7D0}
                {3170E4C2-1173-4264-A222-7EE8CCB3DDF7} = {3170E4C2-1173-4264-A222-7EE8CCB3DDF7}
                {A5911CD7-F8E8-440C-A23E-4843A0636F3A} = {A5911CD7-F8E8-440C-A23E-4843A0636F3A}
@@ -2359,6 +2361,14 @@ Global
                {968FD6C1-5845-4B22-B61E-F6DE987D47AD}.Release|Win32.Build.0 = Release|Win32
                {968FD6C1-5845-4B22-B61E-F6DE987D47AD}.Release|x64.ActiveCfg = Release|x64
                {968FD6C1-5845-4B22-B61E-F6DE987D47AD}.Release|x64.Build.0 = Release|x64
+               {30F9EE41-587B-4618-8DE7-698D3FBA4985}.Debug|Win32.ActiveCfg = Debug|Win32
+               {30F9EE41-587B-4618-8DE7-698D3FBA4985}.Debug|x64.ActiveCfg = Debug|x64
+               {30F9EE41-587B-4618-8DE7-698D3FBA4985}.Release|Win32.ActiveCfg = Release|Win32
+               {30F9EE41-587B-4618-8DE7-698D3FBA4985}.Release|x64.ActiveCfg = Release|x64
+               {A3193DF3-A764-4B51-B240-9285289C337E}.Debug|Win32.ActiveCfg = Debug|Win32
+               {A3193DF3-A764-4B51-B240-9285289C337E}.Debug|x64.ActiveCfg = Debug|x64
+               {A3193DF3-A764-4B51-B240-9285289C337E}.Release|Win32.ActiveCfg = Release|Win32
+               {A3193DF3-A764-4B51-B240-9285289C337E}.Release|x64.ActiveCfg = Release|x64
                {ABCB724E-8534-4420-AC12-7C33A606ABA3}.Debug|Win32.ActiveCfg = Debug|Win32
                {ABCB724E-8534-4420-AC12-7C33A606ABA3}.Debug|Win32.Build.0 = Debug|Win32
                {ABCB724E-8534-4420-AC12-7C33A606ABA3}.Debug|x64.ActiveCfg = Debug|x64
index 265561a..47c03f5 100644 (file)
@@ -1,11 +1,11 @@
 #
 # Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 # Copyright (C) DIGITEO - 2010 - Allan CORNET
-# 
+#
 # This file must be used under the terms of the CeCILL.
 # This source file is licensed as described in the file COPYING, which
 # you should have received as part of this distribution.  The terms
-# are also available at    
+# are also available at
 # http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
 #
 
@@ -26,13 +26,15 @@ libscigraphic_objects_la_etc_DATA = etc/graphic_objects.quit \
 include $(top_srcdir)/Makefile.incl.am
 
 
-GRAPHIC_OBJECTS_JNI_SOURCES = 
+GRAPHIC_OBJECTS_JNI_SOURCES = src/jni/CallGraphicController.cpp
 
-GRAPHIC_OBJECTS_C_SOURCES = 
+GRAPHIC_OBJECTS_C_SOURCES =
 
-GRAPHIC_OBJECTS_CPP_SOURCES = 
+GRAPHIC_OBJECTS_CPP_SOURCES =  src/cpp/createGraphicObject.cpp \
+                                                               src/cpp/getGraphicObjectProperty.cpp \
+                                                               src/cpp/setGraphicObjectProperty.cpp
 
-GIWS_WRAPPERS = 
+GIWS_WRAPPERS =
 
 if GIWS
 BUILT_SOURCES=giws
@@ -62,7 +64,7 @@ libscigraphic_objects_la_CPPFLAGS = $(JAVA_JNI_INCLUDE) \
                        -I$(top_srcdir)/modules/localization/includes \
                        -I$(top_srcdir)/modules/api_scilab/includes
 
-# Without the graphic_objects module 
+# Without the graphic_objects module
 libscigraphic_objects_disable_la_CFLAGS = -Iincludes/ \
                        -I$(top_srcdir)/modules/output_stream/includes
 
@@ -73,7 +75,7 @@ libscigraphic_objects_disable_la_SOURCES = $(GRAPHIC_OBJECTS_DISABLE_C_SOURCES)
 pkglib_LTLIBRARIES = libscigraphic_objects-disable.la
 
 if GUI
-pkglib_LTLIBRARIES += libscigraphic_objects.la 
+pkglib_LTLIBRARIES += libscigraphic_objects.la
 endif
 
 libscigraphic_objects_la_LDFLAGS = -version-info $(SCILAB_LIBRARY_VERSION) $(LD_FLAGS)  $(X_LIBS) $(X_EXTRA_LIBS)
@@ -86,7 +88,7 @@ INCLUDE_FLAGS = $(libscigraphic_objects_la_CFLAGS)
 
 
 #### SWIG Declaration ####
-SWIG_WRAPPERS = 
+SWIG_WRAPPERS =
 
 if SWIG
 BUILT_SOURCES=swig
index a412bb3..db9f166 100644 (file)
 #
 # Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 # Copyright (C) DIGITEO - 2010 - Allan CORNET
-# 
+#
 # This file must be used under the terms of the CeCILL.
 # This source file is licensed as described in the file COPYING, which
 # you should have received as part of this distribution.  The terms
-# are also available at    
+# are also available at
 # http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
 #
 
@@ -68,7 +68,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
 
 # With --enable-compilation-tests, launch java unitary tests
 @COMPILATION_TESTS_TRUE@am__append_2 = test
-@GUI_TRUE@am__append_3 = libscigraphic_objects.la 
+@GUI_TRUE@am__append_3 = libscigraphic_objects.la
 subdir = modules/graphic_objects
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/docbook.m4 \
@@ -131,11 +131,15 @@ libscigraphic_objects_la_DEPENDENCIES =  \
        $(top_builddir)/libs/MALLOC/libscimalloc.la \
        $(top_builddir)/modules/output_stream/libscioutput_stream.la
 am__objects_2 =
-am__objects_3 = libscigraphic_objects_la-gw_graphic_objects.lo
-am__objects_4 = libscigraphic_objects_la-sci_graphicfunction.lo
+am__objects_3 = libscigraphic_objects_la-CallGraphicController.lo
+am__objects_4 = libscigraphic_objects_la-gw_graphic_objects.lo
+am__objects_5 = libscigraphic_objects_la-sci_graphicfunction.lo
+am__objects_6 = libscigraphic_objects_la-createGraphicObject.lo \
+       libscigraphic_objects_la-getGraphicObjectProperty.lo \
+       libscigraphic_objects_la-setGraphicObjectProperty.lo
 am_libscigraphic_objects_la_OBJECTS = $(am__objects_2) \
-       $(am__objects_2) $(am__objects_3) $(am__objects_4) \
-       $(am__objects_2)
+       $(am__objects_3) $(am__objects_4) $(am__objects_5) \
+       $(am__objects_6)
 libscigraphic_objects_la_OBJECTS =  \
        $(am_libscigraphic_objects_la_OBJECTS)
 libscigraphic_objects_la_LINK = $(LIBTOOL) --tag=CXX \
@@ -495,9 +499,12 @@ JARMASK = *.jar
 HELP_CHAPTERDIR = help/
 HELP_CHAPTERFILE = addchapter.sce
 HELP_CHAPTERLANG = en_US fr_FR pt_BR
-GRAPHIC_OBJECTS_JNI_SOURCES = 
+GRAPHIC_OBJECTS_JNI_SOURCES = src/jni/CallGraphicController.cpp
 GRAPHIC_OBJECTS_C_SOURCES = 
-GRAPHIC_OBJECTS_CPP_SOURCES = 
+GRAPHIC_OBJECTS_CPP_SOURCES = src/cpp/createGraphicObject.cpp \
+                                                               src/cpp/getGraphicObjectProperty.cpp \
+                                                               src/cpp/setGraphicObjectProperty.cpp
+
 GIWS_WRAPPERS = 
 @GIWS_TRUE@BUILT_SOURCES = giws
 @SWIG_TRUE@BUILT_SOURCES = swig
@@ -522,7 +529,7 @@ libscigraphic_objects_la_CPPFLAGS = $(JAVA_JNI_INCLUDE) \
                        -I$(top_srcdir)/modules/api_scilab/includes
 
 
-# Without the graphic_objects module 
+# Without the graphic_objects module
 libscigraphic_objects_disable_la_CFLAGS = -Iincludes/ \
                        -I$(top_srcdir)/modules/output_stream/includes
 
@@ -626,8 +633,12 @@ distclean-compile:
        -rm -f *.tab.c
 
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscigraphic_objects_disable_la-nographic_objects.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscigraphic_objects_la-CallGraphicController.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscigraphic_objects_la-createGraphicObject.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscigraphic_objects_la-getGraphicObjectProperty.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscigraphic_objects_la-gw_graphic_objects.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscigraphic_objects_la-sci_graphicfunction.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscigraphic_objects_la-setGraphicObjectProperty.Plo@am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -685,6 +696,13 @@ libscigraphic_objects_la-gw_graphic_objects.lo: sci_gateway/c/gw_graphic_objects
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
 
+libscigraphic_objects_la-CallGraphicController.lo: src/jni/CallGraphicController.cpp
+@am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphic_objects_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libscigraphic_objects_la-CallGraphicController.lo -MD -MP -MF $(DEPDIR)/libscigraphic_objects_la-CallGraphicController.Tpo -c -o libscigraphic_objects_la-CallGraphicController.lo `test -f 'src/jni/CallGraphicController.cpp' || echo '$(srcdir)/'`src/jni/CallGraphicController.cpp
+@am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libscigraphic_objects_la-CallGraphicController.Tpo $(DEPDIR)/libscigraphic_objects_la-CallGraphicController.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='src/jni/CallGraphicController.cpp' object='libscigraphic_objects_la-CallGraphicController.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphic_objects_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libscigraphic_objects_la-CallGraphicController.lo `test -f 'src/jni/CallGraphicController.cpp' || echo '$(srcdir)/'`src/jni/CallGraphicController.cpp
+
 libscigraphic_objects_la-sci_graphicfunction.lo: sci_gateway/cpp/sci_graphicfunction.cpp
 @am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphic_objects_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libscigraphic_objects_la-sci_graphicfunction.lo -MD -MP -MF $(DEPDIR)/libscigraphic_objects_la-sci_graphicfunction.Tpo -c -o libscigraphic_objects_la-sci_graphicfunction.lo `test -f 'sci_gateway/cpp/sci_graphicfunction.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_graphicfunction.cpp
 @am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libscigraphic_objects_la-sci_graphicfunction.Tpo $(DEPDIR)/libscigraphic_objects_la-sci_graphicfunction.Plo
@@ -692,6 +710,27 @@ libscigraphic_objects_la-sci_graphicfunction.lo: sci_gateway/cpp/sci_graphicfunc
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphic_objects_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libscigraphic_objects_la-sci_graphicfunction.lo `test -f 'sci_gateway/cpp/sci_graphicfunction.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_graphicfunction.cpp
 
+libscigraphic_objects_la-createGraphicObject.lo: src/cpp/createGraphicObject.cpp
+@am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphic_objects_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libscigraphic_objects_la-createGraphicObject.lo -MD -MP -MF $(DEPDIR)/libscigraphic_objects_la-createGraphicObject.Tpo -c -o libscigraphic_objects_la-createGraphicObject.lo `test -f 'src/cpp/createGraphicObject.cpp' || echo '$(srcdir)/'`src/cpp/createGraphicObject.cpp
+@am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libscigraphic_objects_la-createGraphicObject.Tpo $(DEPDIR)/libscigraphic_objects_la-createGraphicObject.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='src/cpp/createGraphicObject.cpp' object='libscigraphic_objects_la-createGraphicObject.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphic_objects_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libscigraphic_objects_la-createGraphicObject.lo `test -f 'src/cpp/createGraphicObject.cpp' || echo '$(srcdir)/'`src/cpp/createGraphicObject.cpp
+
+libscigraphic_objects_la-getGraphicObjectProperty.lo: src/cpp/getGraphicObjectProperty.cpp
+@am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphic_objects_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libscigraphic_objects_la-getGraphicObjectProperty.lo -MD -MP -MF $(DEPDIR)/libscigraphic_objects_la-getGraphicObjectProperty.Tpo -c -o libscigraphic_objects_la-getGraphicObjectProperty.lo `test -f 'src/cpp/getGraphicObjectProperty.cpp' || echo '$(srcdir)/'`src/cpp/getGraphicObjectProperty.cpp
+@am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libscigraphic_objects_la-getGraphicObjectProperty.Tpo $(DEPDIR)/libscigraphic_objects_la-getGraphicObjectProperty.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='src/cpp/getGraphicObjectProperty.cpp' object='libscigraphic_objects_la-getGraphicObjectProperty.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphic_objects_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libscigraphic_objects_la-getGraphicObjectProperty.lo `test -f 'src/cpp/getGraphicObjectProperty.cpp' || echo '$(srcdir)/'`src/cpp/getGraphicObjectProperty.cpp
+
+libscigraphic_objects_la-setGraphicObjectProperty.lo: src/cpp/setGraphicObjectProperty.cpp
+@am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphic_objects_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libscigraphic_objects_la-setGraphicObjectProperty.lo -MD -MP -MF $(DEPDIR)/libscigraphic_objects_la-setGraphicObjectProperty.Tpo -c -o libscigraphic_objects_la-setGraphicObjectProperty.lo `test -f 'src/cpp/setGraphicObjectProperty.cpp' || echo '$(srcdir)/'`src/cpp/setGraphicObjectProperty.cpp
+@am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libscigraphic_objects_la-setGraphicObjectProperty.Tpo $(DEPDIR)/libscigraphic_objects_la-setGraphicObjectProperty.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='src/cpp/setGraphicObjectProperty.cpp' object='libscigraphic_objects_la-setGraphicObjectProperty.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphic_objects_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libscigraphic_objects_la-setGraphicObjectProperty.lo `test -f 'src/cpp/setGraphicObjectProperty.cpp' || echo '$(srcdir)/'`src/cpp/setGraphicObjectProperty.cpp
+
 mostlyclean-libtool:
        -rm -f *.lo
 
diff --git a/scilab/modules/graphic_objects/includes/createGraphicObject.h b/scilab/modules/graphic_objects/includes/createGraphicObject.h
new file mode 100644 (file)
index 0000000..cb23b77
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ *  Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ *  Copyright (C) 2010-2010 - DIGITEO - Bruno JOFRET
+ *
+ *  This file must be used under the terms of the CeCILL.
+ *  This source file is licensed as described in the file COPYING, which
+ *  you should have received as part of this distribution.  The terms
+ *  are also available at
+ *  http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
+#ifndef __CREATEGRAPHICOBJECT_H__
+#define __CREATEGRAPHICOBJECT_H__
+
+#include "dynlib_graphic_objects.h"
+
+/*
+** Ask Controler to create a graphic object
+** of the given _sType.
+*/
+GRAPHIC_OBJECTS_IMPEXP char *createGraphicObject(char *_sType);
+
+#endif /* !__CREATEGRAPHICOBJECT_H__ */
diff --git a/scilab/modules/graphic_objects/includes/getGraphicObjectProperty.h b/scilab/modules/graphic_objects/includes/getGraphicObjectProperty.h
new file mode 100644 (file)
index 0000000..2f5ff20
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ *  Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ *  Copyright (C) 2010-2010 - DIGITEO - Bruno JOFRET
+ *
+ *  This file must be used under the terms of the CeCILL.
+ *  This source file is licensed as described in the file COPYING, which
+ *  you should have received as part of this distribution.  The terms
+ *  are also available at
+ *  http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
+#ifndef __GETGRAPHICOBJECTPROPERTY_H__
+#define __GETGRAPHICOBJECTPROPERTY_H__
+
+#include "returnType.h"
+#include "dynlib_graphic_objects.h"
+
+/*
+** Retrive Graphic object property from Model.
+** Specify type exepected as parameter for JNI.
+*/
+GRAPHIC_OBJECTS_IMPEXP void *getGraphicObjectProperty(char *_pstID, char *_pstName, enum _ReturnType_ _returnType );
+
+#endif /* !__GETGRAPHICOBJECTPROPERTY_H__ */
diff --git a/scilab/modules/graphic_objects/includes/returnType.h b/scilab/modules/graphic_objects/includes/returnType.h
new file mode 100644 (file)
index 0000000..ddc0ae3
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ *  Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ *  Copyright (C) 2010-2010 - DIGITEO - Bruno JOFRET
+ *
+ *  This file must be used under the terms of the CeCILL.
+ *  This source file is licensed as described in the file COPYING, which
+ *  you should have received as part of this distribution.  The terms
+ *  are also available at
+ *  http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
+#ifndef __RETURNTYPE_H__
+#define __RETURNTYPE_H__
+
+enum _ReturnType_ {
+    jni_string,
+    jni_string_vector,
+    jni_double,
+    jni_double_vector,
+    jni_int,
+    jni_int_vector,
+    jni_bool,
+    jni_bool_vector
+};
+
+#endif /* !__RETURNTYPE_H__ */
diff --git a/scilab/modules/graphic_objects/includes/setGraphicObjectProperty.h b/scilab/modules/graphic_objects/includes/setGraphicObjectProperty.h
new file mode 100644 (file)
index 0000000..caf40b0
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+ *  Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ *  Copyright (C) 2010-2010 - DIGITEO - Bruno JOFRET
+ *
+ *  This file must be used under the terms of the CeCILL.
+ *  This source file is licensed as described in the file COPYING, which
+ *  you should have received as part of this distribution.  The terms
+ *  are also available at
+ *  http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
+#ifndef __SETGRAPHICOBJECTPROPERTY_H__
+#define __SETGRAPHICOBJECTPROPERTY_H__
+
+#include "returnType.h"
+#include "dynlib_graphic_objects.h"
+
+GRAPHIC_OBJECTS_IMPEXP void setGraphicObjectProperty(char *_psUID, char *_psPropertyName, void *_pvValue, enum _ReturnType_ _valueTtype);
+
+#endif /* !__SETGRAPHICOBJECTPROPERTY_H__ */
index fed8c1f..39a3c0b 100644 (file)
                        Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
                        >
                        <File
+                               RelativePath="..\jni\CallGraphicController.cpp"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\cpp\createGraphicObject.cpp"
+                               >
+                       </File>
+                       <File
                                RelativePath=".\DllmainGraphic_objects.c"
                                >
                        </File>
                        <File
+                               RelativePath="..\cpp\getGraphicObjectProperty.cpp"
+                               >
+                       </File>
+                       <File
                                RelativePath="..\..\sci_gateway\c\gw_graphic_objects.c"
                                >
                        </File>
                                RelativePath="..\..\sci_gateway\cpp\sci_graphicfunction.cpp"
                                >
                        </File>
+                       <File
+                               RelativePath="..\cpp\setGraphicObjectProperty.cpp"
+                               >
+                       </File>
                </Filter>
                <Filter
                        Name="Header Files"
                        Filter="h;hpp;hxx;hm;inl"
                        >
                        <File
+                               RelativePath="..\jni\CallGraphicController.hxx"
+                               >
+                       </File>
+                       <File
                                RelativePath="..\..\includes\dynlib_graphic_objects.h"
                                >
                        </File>
diff --git a/scilab/modules/graphic_objects/src/cpp/createGraphicObject.cpp b/scilab/modules/graphic_objects/src/cpp/createGraphicObject.cpp
new file mode 100644 (file)
index 0000000..343c0f9
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ *  Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ *  Copyright (C) 2010-2010 - DIGITEO - Bruno JOFRET
+ *
+ *  This file must be used under the terms of the CeCILL.
+ *  This source file is licensed as described in the file COPYING, which
+ *  you should have received as part of this distribution.  The terms
+ *  are also available at
+ *  http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
+extern "C"
+{
+#include "createGraphicObject.h"
+#include "getScilabJavaVM.h"
+}
+
+#include "CallGraphicController.hxx"
+
+using namespace org_scilab_modules_graphic_objects;
+
+char *createGraphicObject(char *_sType)
+{
+    return CallGraphicController::askGraphicObject(getScilabJavaVM(), _sType);
+}
diff --git a/scilab/modules/graphic_objects/src/cpp/getGraphicObjectProperty.cpp b/scilab/modules/graphic_objects/src/cpp/getGraphicObjectProperty.cpp
new file mode 100644 (file)
index 0000000..fa6edeb
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ *  Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ *  Copyright (C) 2010-2010 - DIGITEO - Bruno JOFRET
+ *
+ *  This file must be used under the terms of the CeCILL.
+ *  This source file is licensed as described in the file COPYING, which
+ *  you should have received as part of this distribution.  The terms
+ *  are also available at
+ *  http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
+
+extern "C"
+{
+#include <stdlib.h>
+#include "getGraphicObjectProperty.h"
+#include "getScilabJavaVM.h"
+}
+
+#include "CallGraphicController.hxx"
+
+using namespace org_scilab_modules_graphic_objects;
+
+void *getGraphicObjectProperty(char *_pstID, char *_pstName, _ReturnType_ _returnType)
+{
+    switch(_returnType)
+    {
+    case jni_string :
+        return CallGraphicController::getGraphicObjectPropertyAsString(getScilabJavaVM(), _pstID, _pstName);
+    default :
+        return NULL;
+    }
+}
diff --git a/scilab/modules/graphic_objects/src/cpp/setGraphicObjectProperty.cpp b/scilab/modules/graphic_objects/src/cpp/setGraphicObjectProperty.cpp
new file mode 100644 (file)
index 0000000..7b84797
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ *  Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ *  Copyright (C) 2010-2010 - DIGITEO - Bruno JOFRET
+ *
+ *  This file must be used under the terms of the CeCILL.
+ *  This source file is licensed as described in the file COPYING, which
+ *  you should have received as part of this distribution.  The terms
+ *  are also available at
+ *  http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
+extern "C"
+{
+#include "setGraphicObjectProperty.h"
+#include "getScilabJavaVM.h"
+}
+
+#include "CallGraphicController.hxx"
+
+using namespace org_scilab_modules_graphic_objects;
+
+void setGraphicObjectProperty(char *_pstID, char *_pstName, void *_pvValue, _ReturnType_ _valueType)
+{
+ switch(_valueType)
+    {
+    case jni_string :
+        CallGraphicController::setGraphicObjectProperty(getScilabJavaVM(), _pstID, _pstName, (char *)_pvValue);
+        break;
+    default :
+        /* Do Nothing */
+        break;
+    }
+}
diff --git a/scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/CallGraphicController.java b/scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/CallGraphicController.java
new file mode 100644 (file)
index 0000000..cb1281e
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - DIGITEO - Bruno JOFRET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution.  The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
+package org.scilab.modules.graphic_objects;
+
+import org.scilab.modules.graphic_objects.graphicController.GraphicController;
+import org.scilab.modules.graphic_objects.graphicObject.GraphicObject;
+
+/**
+ * This is a static class to acces all controller capabilities
+ * from C/C++ code through JNI
+ * See SCI/modules/graphic_objects/src/jni/graphic_objects.giws.xml for other details.
+ **/
+public final class CallGraphicController {
+
+    public static String askGraphicObject(String typeName) {
+        return GraphicController.getController().askObject(GraphicObject.getTypeFromName(typeName));
+    }
+
+    private static void setGraphicObjectProperty(String id, String propertyName, Object value) {
+        GraphicController.getController().setPropertyFast(id, propertyName, value);
+    }
+
+    private static Object getGraphicObjectProperty(String id, String propertyName) {
+        return GraphicController.getController().getPropertyFast(id, propertyName);
+    }
+
+    public static void setGraphicObjectProperty(String id, String propertyName, String value) {
+        setGraphicObjectProperty(id, propertyName, (Object) value);
+    }
+
+    public static String getGraphicObjectPropertyAsString(String id, String propertyName) {
+        return (String) getGraphicObjectProperty(id, propertyName);
+    }
+}
index 69b3b82..400b305 100644 (file)
@@ -69,7 +69,7 @@ public class GraphicController {
      * @param id the object id
      * @return the object
      */
-    public Object getObjectFromId(UID id) {
+    public Object getObjectFromId(String id) {
        Object object;
        object = GraphicModel.getModel().getObjectFromId(id);
 
@@ -82,7 +82,7 @@ public class GraphicController {
      * @param prop the property name
      * @param value the property value
      */
-    public void setPropertyFast(UID id, String prop, Object value) {
+    public void setPropertyFast(String id, String prop, Object value) {
        GraphicModel.getModel().setPropertyFast(id, prop, value);
     }
 
@@ -92,7 +92,7 @@ public class GraphicController {
      * @param prop the property name
      * @return the property value
      */
-    public Object getPropertyFast(UID id, String prop) {
+    public Object getPropertyFast(String id, String prop) {
        return GraphicModel.getModel().getPropertyFast(id, prop);
     }
 
@@ -102,7 +102,7 @@ public class GraphicController {
      * @param prop the property name
      * @param value the property value
      */
-    public void setProperty(UID id, String prop, Object value) {
+    public void setProperty(String id, String prop, Object value) {
        GraphicModel.getModel().setProperty(id, prop, value);
        objectUpdate(id);
     }
@@ -113,7 +113,7 @@ public class GraphicController {
      * @param prop the property name
      * @return the null property
      */
-    public Object getNullProperty(UID id, String prop) {
+    public Object getNullProperty(String id, String prop) {
        return GraphicModel.getModel().getNullProperty(id, prop);
     }
     
@@ -123,7 +123,7 @@ public class GraphicController {
      * @param prop the property name
      * @return the property value
      */
-       public Object getProperty(UID id, String prop) {
+       public Object getProperty(String id, String prop) {
                return GraphicModel.getModel().getProperty(id, prop);
     }
     
@@ -132,12 +132,12 @@ public class GraphicController {
         * @param type the object type
         * @return the created object's id
         */
-    public UID askObject(Type type) {
+    public String askObject(Type type) {
        UID id = createUID();
-       GraphicModel.getModel().createObject(id, type);
-       objectCreated(id);
+       GraphicModel.getModel().createObject(id.toString(), type);
+       objectCreated(id.toString());
        
-       return id;
+       return id.toString();
     }
     
     
@@ -145,7 +145,7 @@ public class GraphicController {
      * Notifies the existing views that an object has been created
      * @param id the created object's id
      */
-    public void objectCreated(UID id) {
+    public void objectCreated(String id) {
        // TBD, deactivated for now
     
        /*
@@ -163,7 +163,7 @@ public class GraphicController {
      * Notified the existing views that an object has been updated 
      * @param id the updated object's id
      */
-    public void objectUpdate(UID id) {
+    public void objectUpdate(String id) {
        
     // TBD, deactivated for now
     /*
@@ -179,7 +179,7 @@ public class GraphicController {
      * Deletes an object
      * @param id the deleted object's id
      */
-    public void deleteObject(UID id) {
+    public void deleteObject(String id) {
           GraphicModel.getModel().deleteObject(id);
           
           // TBD, deactivated for now
index 13a9946..b704d42 100644 (file)
@@ -44,7 +44,7 @@ import org.scilab.modules.graphic_objects.vectfield.Segs;
  */
 public class GraphicModel {
 
-    private Map<UID, GraphicObject> allObjects = new HashMap<UID, GraphicObject>();
+    private Map<String, GraphicObject> allObjects = new HashMap<String, GraphicObject>();
 
     private static GraphicModel me = null;
 
@@ -69,7 +69,7 @@ public class GraphicModel {
      * @param id the id of the object to get
      * @return the object
      */
-    public Object getObjectFromId(UID id) {
+    public Object getObjectFromId(String id) {
        return allObjects.get(id);
     }
 
@@ -79,7 +79,7 @@ public class GraphicModel {
      * @param property the property name
      * @return the property
      */
-    public Object getNullProperty(UID id, String property){
+    public Object getNullProperty(String id, String property){
        GraphicObject object = allObjects.get(id);
        return object.getNullProperty(property);
     }
@@ -90,7 +90,7 @@ public class GraphicModel {
      * @param property the property name 
      * @return the property value
      */
-    public Object getProperty(UID id, String property) {
+    public Object getProperty(String id, String property) {
        GraphicObject object = allObjects.get(id);
        return object.getProperty(property);
     }
@@ -101,7 +101,7 @@ public class GraphicModel {
      * @param property property name
      * @param value property value
      */
-    public void setProperty(UID id, String property, Object value) {
+    public void setProperty(String id, String property, Object value) {
        GraphicObject object = allObjects.get(id);
        object.setProperty(property, value);
     }
@@ -112,7 +112,7 @@ public class GraphicModel {
      * @param property property name
      * @return property value
      */
-    public Object getPropertyFast(UID id, String property) {
+    public Object getPropertyFast(String id, String property) {
        GraphicObject object = allObjects.get(id);
        Object propertyType = object.getPropertyFromName(property);
        return object.getPropertyFast(propertyType);
@@ -124,7 +124,7 @@ public class GraphicModel {
      * @param property name
      * @param value property value
      */
-    public void setPropertyFast(UID id, String property, Object value) {
+    public void setPropertyFast(String id, String property, Object value) {
        GraphicObject object = allObjects.get(id);
        Object propertyType = object.getPropertyFromName(property);
        object.setPropertyFast(propertyType, value);
@@ -136,7 +136,7 @@ public class GraphicModel {
      * @param type object type
      * @return the created object's id
      */
-    public UID createObject(UID id, GraphicObject.Type type) {
+    public String createObject(String id, GraphicObject.Type type) {
        GraphicObject object = createTypedObject(type);
 
        if (object != null) {
@@ -202,7 +202,7 @@ public class GraphicModel {
      * Deletes an object
      * @param id object id
      */
-    public void deleteObject(UID id) {
+    public void deleteObject(String id) {
        allObjects.remove(id);
     }
 
index 230219f..efecbbd 100644 (file)
@@ -13,7 +13,6 @@
 package org.scilab.modules.graphic_objects.graphicObject;
 
 import java.lang.reflect.Method;
-import java.rmi.server.UID;
 import java.util.ArrayList;
 
 /**
@@ -29,7 +28,7 @@ public abstract class GraphicObject {
        public enum GraphicObjectPropertyType { PARENT, CHILDREN, VISIBLE, USERDATA, UNKNOWNPROPERTY };
 
        /** Identifier */
-       private UID identifier;
+       private String identifier;
        
        /** Parent object */
        private GraphicObject parent;
@@ -53,6 +52,68 @@ public abstract class GraphicObject {
        }
 
        /**
+     * Returns the enum associated to a type name
+     * @param typeName the property name
+     * @return the type enum
+     */
+    public static Type getTypeFromName(String typeName) {
+        if (typeName.equals("arc")) {
+            return Type.ARC;
+        } 
+        else if (typeName.equals("axes")) {
+            return Type.AXES;
+        }
+        else if (typeName.equals("axis")) {
+            return Type.AXIS;
+        }
+        else if (typeName.equals("champ")) {
+            return Type.CHAMP;
+        }
+        else if (typeName.equals("compound")) {
+            return Type.COMPOUND;
+        }
+        else if (typeName.equals("fac3d")) {
+            return Type.FAC3D;
+        }
+        else if (typeName.equals("fec")) {
+            return Type.FEC;
+        }
+        else if (typeName.equals("figure")) {
+            return Type.FIGURE;
+        }
+        else if (typeName.equals("grayplot")) {
+            return Type.GRAYPLOT;
+        }
+        else if (typeName.equals("label")) {
+            return Type.LABEL;
+        }
+        else if (typeName.equals("legend")) {
+            return Type.LEGEND;
+        }
+        else if (typeName.equals("matplot")) {
+            return Type.MATPLOT;
+        }
+        else if (typeName.equals("plot3d")) {
+            return Type.PLOT3D;
+        }
+        else if (typeName.equals("polyline")) {
+            return Type.POLYLINE;
+        }
+        else if (typeName.equals("rectangle")) {
+            return Type.RECTANGLE;
+        }
+        else if (typeName.equals("segs")) {
+            return Type.SEGS;
+        }
+        else if (typeName.equals("text")) {
+            return Type.TEXT;
+        }
+        else {
+            return Type.UNKNOWNOBJECT;
+        }
+       }
+       
+       /**
         * Returns the enum associated to a property name
         * @param propertyName the property name
         * @return the property enum
@@ -186,14 +247,14 @@ public abstract class GraphicObject {
        /**
         * @return the identifier
         */
-       public UID getIdentifier() {
+       public String getIdentifier() {
                return identifier;
        }
 
        /**
         * @param identifier the identifier to set
         */
-       public void setIdentifier(UID identifier) {
+       public void setIdentifier(String identifier) {
                this.identifier = identifier;
        }
 
diff --git a/scilab/modules/graphic_objects/src/jni/CallGraphicController.cpp b/scilab/modules/graphic_objects/src/jni/CallGraphicController.cpp
new file mode 100644 (file)
index 0000000..9c850e6
--- /dev/null
@@ -0,0 +1,262 @@
+#include "CallGraphicController.hxx"
+/* Generated by GIWS (version 1.0.5) */
+/*
+
+Copyright 2007-2008 INRIA
+
+Author : Sylvestre Ledru & others
+
+This software is a computer program whose purpose is to hide the complexity
+of accessing Java objects/methods from C++ code.
+
+This software is governed by the CeCILL-B license under French law and
+abiding by the rules of distribution of free software.  You can  use, 
+modify and/ or redistribute the software under the terms of the CeCILL-B
+license as circulated by CEA, CNRS and INRIA at the following URL
+"http://www.cecill.info". 
+
+As a counterpart to the access to the source code and  rights to copy,
+modify and redistribute granted by the license, users are provided only
+with a limited warranty  and the software's author,  the holder of the
+economic rights,  and the successive licensors  have only  limited
+liability. 
+
+In this respect, the user's attention is drawn to the risks associated
+with loading,  using,  modifying and/or developing or reproducing the
+software by the user in light of its specific status of free software,
+that may mean  that it is complicated to manipulate,  and  that  also
+therefore means  that it is reserved for developers  and  experienced
+professionals having in-depth computer knowledge. Users are therefore
+encouraged to load and test the software's suitability as regards their
+requirements in conditions enabling the security of their systems and/or 
+data to be ensured and,  more generally, to use and operate it in the 
+same conditions as regards security. 
+
+The fact that you are presently reading this means that you have had
+knowledge of the CeCILL-B license and that you accept its terms.
+*/
+
+namespace org_scilab_modules_graphic_objects {
+
+// Returns the current env
+
+JNIEnv * CallGraphicController::getCurrentEnv() {
+JNIEnv * curEnv = NULL;
+this->jvm->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL);
+return curEnv;
+}
+// Destructor
+
+CallGraphicController::~CallGraphicController() {
+JNIEnv * curEnv = NULL;
+this->jvm->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL);
+
+curEnv->DeleteGlobalRef(this->instance);
+curEnv->DeleteGlobalRef(this->instanceClass);
+}
+// Constructors
+
+CallGraphicController::CallGraphicController(JavaVM * jvm_) {
+jmethodID constructObject = NULL ;
+jobject localInstance ;
+jclass localClass ;
+const std::string construct="<init>";
+const std::string param="()V";
+jvm=jvm_;
+
+JNIEnv * curEnv = getCurrentEnv();
+
+localClass = curEnv->FindClass( this->className().c_str() ) ;
+if (localClass == NULL) {
+std::cerr << "Could not get the Class " << this->className() <<  std::endl;
+curEnv->ExceptionDescribe();
+exit(EXIT_FAILURE);
+}
+
+this->instanceClass = static_cast<jclass>(curEnv->NewGlobalRef(localClass));
+
+/* localClass is not needed anymore */
+curEnv->DeleteLocalRef(localClass);
+
+if (this->instanceClass == NULL) {
+std::cerr << "Could not create a Global Ref of " << this->className() <<  std::endl;
+curEnv->ExceptionDescribe();
+exit(EXIT_FAILURE);
+}
+
+
+constructObject = curEnv->GetMethodID( this->instanceClass, construct.c_str() , param.c_str() ) ;
+if(constructObject == NULL){
+std::cerr << "Could not retrieve the constructor of the class " << this->className() << " with the profile : " << construct << param << std::endl;
+curEnv->ExceptionDescribe();
+exit(EXIT_FAILURE);
+}
+
+localInstance = curEnv->NewObject( this->instanceClass, constructObject ) ;
+if(localInstance == NULL){
+std::cerr << "Could not instantiate the object " << this->className() << " with the constructor : " << construct << param << std::endl;
+curEnv->ExceptionDescribe();
+exit(EXIT_FAILURE);
+}
+this->instance = curEnv->NewGlobalRef(localInstance) ;
+if(this->instance == NULL){
+std::cerr << "Could not create a new global ref of " << this->className() << std::endl;
+curEnv->ExceptionDescribe();
+exit(EXIT_FAILURE);
+}
+/* localInstance not needed anymore */
+curEnv->DeleteLocalRef(localInstance);
+
+                /* Methods ID set to NULL */
+jstringaskGraphicObjectjstringID=NULL; 
+jstringgetGraphicObjectPropertyAsStringjstringjstringID=NULL; 
+voidsetGraphicObjectPropertyjstringjstringjstringID=NULL; 
+
+
+}
+
+CallGraphicController::CallGraphicController(JavaVM * jvm_, jobject JObj) {
+        jvm=jvm_;
+
+        JNIEnv * curEnv = getCurrentEnv();
+
+jclass localClass = curEnv->GetObjectClass(JObj);
+        this->instanceClass = static_cast<jclass>(curEnv->NewGlobalRef(localClass));
+        curEnv->DeleteLocalRef(localClass);
+
+        if (this->instanceClass == NULL) {
+
+std::cerr << "Could not create a Global Ref of " << this->className() <<  std::endl;
+curEnv->ExceptionDescribe();
+exit(EXIT_FAILURE);
+        }
+
+        this->instance = curEnv->NewGlobalRef(JObj) ;
+        if(this->instance == NULL){
+
+std::cerr << "Could not create a new global ref of " << this->className() << std::endl;
+curEnv->ExceptionDescribe();
+exit(EXIT_FAILURE);
+        }
+        /* Methods ID set to NULL */
+        jstringaskGraphicObjectjstringID=NULL; 
+jstringgetGraphicObjectPropertyAsStringjstringjstringID=NULL; 
+voidsetGraphicObjectPropertyjstringjstringjstringID=NULL; 
+
+
+}
+
+// Generic methods
+
+void CallGraphicController::synchronize() {
+if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) {
+std::cerr << "Fail to enter monitor." << std::endl;
+exit(EXIT_FAILURE);
+
+}
+}
+
+void CallGraphicController::endSynchronize() {
+if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) {
+
+std::cerr << "Fail to exit monitor." << std::endl;
+exit(EXIT_FAILURE);
+}
+}
+// Method(s)
+
+char * CallGraphicController::askGraphicObject (JavaVM * jvm_, char * typeName){
+
+JNIEnv * curEnv = NULL;
+jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL);
+jclass cls = curEnv->FindClass( className().c_str() );
+
+jmethodID jstringaskGraphicObjectjstringID = curEnv->GetStaticMethodID(cls, "askGraphicObject", "(Ljava/lang/String;)Ljava/lang/String;" ) ;
+if (jstringaskGraphicObjectjstringID == NULL) {
+std::cerr << "Could not access to the method " << "askGraphicObject" << std::endl;
+curEnv->ExceptionDescribe();
+exit(EXIT_FAILURE);
+}
+
+jstring typeName_ = curEnv->NewStringUTF( typeName );
+
+                        jstring res =  static_cast<jstring>( curEnv->CallStaticObjectMethod(cls, jstringaskGraphicObjectjstringID ,typeName_));if (curEnv->ExceptionCheck()) {
+curEnv->ExceptionDescribe() ;
+}
+
+
+const char *tempString = curEnv->GetStringUTFChars(res, 0);
+char * myStringBuffer = new char[strlen(tempString) + 1];
+strcpy(myStringBuffer, tempString);
+curEnv->ReleaseStringUTFChars(res, tempString);
+curEnv->DeleteLocalRef(res);
+if (curEnv->ExceptionCheck()) {
+curEnv->ExceptionDescribe() ;
+}
+
+return myStringBuffer;
+
+}
+
+char * CallGraphicController::getGraphicObjectPropertyAsString (JavaVM * jvm_, char * id, char * propertyName){
+
+JNIEnv * curEnv = NULL;
+jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL);
+jclass cls = curEnv->FindClass( className().c_str() );
+
+jmethodID jstringgetGraphicObjectPropertyAsStringjstringjstringID = curEnv->GetStaticMethodID(cls, "getGraphicObjectPropertyAsString", "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;" ) ;
+if (jstringgetGraphicObjectPropertyAsStringjstringjstringID == NULL) {
+std::cerr << "Could not access to the method " << "getGraphicObjectPropertyAsString" << std::endl;
+curEnv->ExceptionDescribe();
+exit(EXIT_FAILURE);
+}
+
+jstring id_ = curEnv->NewStringUTF( id );
+
+jstring propertyName_ = curEnv->NewStringUTF( propertyName );
+
+                        jstring res =  static_cast<jstring>( curEnv->CallStaticObjectMethod(cls, jstringgetGraphicObjectPropertyAsStringjstringjstringID ,id_, propertyName_));if (curEnv->ExceptionCheck()) {
+curEnv->ExceptionDescribe() ;
+}
+
+
+const char *tempString = curEnv->GetStringUTFChars(res, 0);
+char * myStringBuffer = new char[strlen(tempString) + 1];
+strcpy(myStringBuffer, tempString);
+curEnv->ReleaseStringUTFChars(res, tempString);
+curEnv->DeleteLocalRef(res);
+if (curEnv->ExceptionCheck()) {
+curEnv->ExceptionDescribe() ;
+}
+
+return myStringBuffer;
+
+}
+
+void CallGraphicController::setGraphicObjectProperty (JavaVM * jvm_, char * id, char * propertyName, char * value){
+
+JNIEnv * curEnv = NULL;
+jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL);
+jclass cls = curEnv->FindClass( className().c_str() );
+
+jmethodID voidsetGraphicObjectPropertyjstringjstringjstringID = curEnv->GetStaticMethodID(cls, "setGraphicObjectProperty", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V" ) ;
+if (voidsetGraphicObjectPropertyjstringjstringjstringID == NULL) {
+std::cerr << "Could not access to the method " << "setGraphicObjectProperty" << std::endl;
+curEnv->ExceptionDescribe();
+exit(EXIT_FAILURE);
+}
+
+jstring id_ = curEnv->NewStringUTF( id );
+
+jstring propertyName_ = curEnv->NewStringUTF( propertyName );
+
+jstring value_ = curEnv->NewStringUTF( value );
+
+                         curEnv->CallStaticVoidMethod(cls, voidsetGraphicObjectPropertyjstringjstringjstringID ,id_, propertyName_, value_);if (curEnv->ExceptionCheck()) {
+curEnv->ExceptionDescribe() ;
+}
+
+}
+
+}
diff --git a/scilab/modules/graphic_objects/src/jni/CallGraphicController.hxx b/scilab/modules/graphic_objects/src/jni/CallGraphicController.hxx
new file mode 100644 (file)
index 0000000..7ccaef4
--- /dev/null
@@ -0,0 +1,120 @@
+/* Generated by GIWS (version 1.0.5) */
+/*
+
+Copyright 2007-2008 INRIA
+
+Author : Sylvestre Ledru & others
+
+This software is a computer program whose purpose is to hide the complexity
+of accessing Java objects/methods from C++ code.
+
+This software is governed by the CeCILL-B license under French law and
+abiding by the rules of distribution of free software.  You can  use, 
+modify and/ or redistribute the software under the terms of the CeCILL-B
+license as circulated by CEA, CNRS and INRIA at the following URL
+"http://www.cecill.info". 
+
+As a counterpart to the access to the source code and  rights to copy,
+modify and redistribute granted by the license, users are provided only
+with a limited warranty  and the software's author,  the holder of the
+economic rights,  and the successive licensors  have only  limited
+liability. 
+
+In this respect, the user's attention is drawn to the risks associated
+with loading,  using,  modifying and/or developing or reproducing the
+software by the user in light of its specific status of free software,
+that may mean  that it is complicated to manipulate,  and  that  also
+therefore means  that it is reserved for developers  and  experienced
+professionals having in-depth computer knowledge. Users are therefore
+encouraged to load and test the software's suitability as regards their
+requirements in conditions enabling the security of their systems and/or 
+data to be ensured and,  more generally, to use and operate it in the 
+same conditions as regards security. 
+
+The fact that you are presently reading this means that you have had
+knowledge of the CeCILL-B license and that you accept its terms.
+*/
+
+
+#ifndef __ORG_SCILAB_MODULES_GRAPHIC_OBJECTS_CALLGRAPHICCONTROLLER__
+#define __ORG_SCILAB_MODULES_GRAPHIC_OBJECTS_CALLGRAPHICCONTROLLER__
+#include <iostream>
+#include <string>
+#include <string.h>
+#include <stdlib.h>
+#include <jni.h>
+
+namespace org_scilab_modules_graphic_objects {
+
+class CallGraphicController {
+private:
+JavaVM * jvm;
+jobject instance;
+
+jclass instanceClass; // cache class
+jmethodID jstringaskGraphicObjectjstringID; // cache method id
+jmethodID jstringgetGraphicObjectPropertyAsStringjstringjstringID; // cache method id
+jmethodID voidsetGraphicObjectPropertyjstringjstringjstringID; // cache method id
+
+
+/**
+* Get the environment matching to the current thread.
+*/
+JNIEnv * getCurrentEnv();
+
+public:
+// Constructor
+/**
+* Create a wrapping of the object from a JNIEnv.
+* It will call the default constructor
+* @param JEnv_ the Java Env
+*/
+CallGraphicController(JavaVM * jvm_);
+/**
+* Create a wrapping of an already existing object from a JNIEnv.
+* The object must have already been instantiated
+* @param JEnv_ the Java Env
+* @param JObj the object
+*/
+CallGraphicController(JavaVM * jvm_, jobject JObj);
+
+// Destructor
+~CallGraphicController();
+
+// Generic method
+// Synchronization methods
+/**
+* Enter monitor associated with the object.
+* Equivalent of creating a "synchronized(obj)" scope in Java.
+*/
+void synchronize();
+
+/**
+* Exit monitor associated with the object.
+* Equivalent of ending a "synchronized(obj)" scope.
+*/
+void endSynchronize();
+
+// Methods
+static char * askGraphicObject(JavaVM * jvm_, char * typeName);
+
+static char * getGraphicObjectPropertyAsString(JavaVM * jvm_, char * id, char * propertyName);
+
+static void setGraphicObjectProperty(JavaVM * jvm_, char * id, char * propertyName, char * value);
+
+
+                        /**
+                        * Get class name to use for static methods
+                        * @return class name to use for static methods
+                        */
+                        
+                static const std::string className()
+                {
+                return "org/scilab/modules/graphic_objects/CallGraphicController";
+                }
+                
+};
+
+
+}
+#endif
index e69de29..33769d4 100644 (file)
@@ -0,0 +1,16 @@
+<package name="org.scilab.modules.graphic_objects">
+  <object name="CallGraphicController">
+    <method name="askGraphicObject" returnType="String" modifier="static">
+      <parameter name="typeName" type="String" />
+    </method>
+    <method name="getGraphicObjectPropertyAsString" returnType="String" modifier="static">
+      <parameter name="id" type="String"/>
+      <parameter name="propertyName" type="String"/>
+    </method>
+    <method name="setGraphicObjectProperty" returnType="void" modifier="static">
+      <parameter name="id" type="String"/>
+      <parameter name="propertyName" type="String"/>
+      <parameter name="value" type="String"/>
+    </method>
+  </object>
+</package>
index 48b8746..68ae11a 100644 (file)
 
 package org.scilab.tests.modules.graphic_objects;
 
-import org.testng.annotations.*;
-
-import java.rmi.server.UID;
-
 import org.scilab.modules.graphic_objects.graphicController.GraphicController;
 import org.scilab.modules.graphic_objects.graphicObject.GraphicObject;
 import org.scilab.modules.graphic_objects.graphicObject.GraphicObject.Type;
+import org.testng.annotations.Test;
 
 /**
  * GraphicObject test class
@@ -34,22 +31,22 @@ public class testGraphicObject {
     public void testGraphicObject() throws NullPointerException {
         GraphicController controller = GraphicController.getController();
         
-        UID axesID = controller.askObject(Type.AXES);
+        String axesID = controller.askObject(Type.AXES);
         GraphicObject axes = (GraphicObject) controller.getObjectFromId(axesID);
 
         if (axes == null) {
                throw new NullPointerException();
         }
 
-        UID arcID = controller.askObject(Type.ARC);
+        String arcID = controller.askObject(Type.ARC);
         GraphicObject arc = (GraphicObject) controller.getObjectFromId(arcID);
 
        if (arc == null) {
                throw new NullPointerException();
        }
 
-       UID axesIDret = axes.getIdentifier();
-        UID arcIDret = arc.getIdentifier();
+       String axesIDret = axes.getIdentifier();
+       String arcIDret = arc.getIdentifier();
 
         assert axesID.equals(axesIDret);
         assert arcID.equals(arcIDret);
index 27c7972..7ac5c84 100644 (file)
@@ -36,7 +36,8 @@ libscigraphics_la_CFLAGS = -I$(top_srcdir)/libs/doublylinkedlist/includes/ \
        -I$(top_srcdir)/modules/api_scilab/includes/ \
        -I$(top_srcdir)/modules/elementary_functions/includes/ \
        -I$(top_srcdir)/modules/fileio/includes/ \
-       -I$(top_srcdir)/modules/string/includes/
+       -I$(top_srcdir)/modules/string/includes/ \
+       -I$(top_srcdir)/modules/graphic_objects/includes/
 
 
 GRAPHICS_C_SOURCES = src/c/GetCommandArg.c \
@@ -516,4 +517,4 @@ libscigraphics_la_LDFLAGS = -version-info $(SCILAB_LIBRARY_VERSION) $(TCLTK_LIBS
 
 
 include $(top_srcdir)/Makefile.incl.am
+
index 37e3644..c4cf343 100644 (file)
@@ -794,8 +794,9 @@ libscigraphics_la_CFLAGS =  \
        -I$(top_srcdir)/modules/api_scilab/includes/ \
        -I$(top_srcdir)/modules/elementary_functions/includes/ \
        -I$(top_srcdir)/modules/fileio/includes/ \
-       -I$(top_srcdir)/modules/string/includes/ $(JAVA_JNI_INCLUDE) \
-       -Isrc/cpp $(TCL_INC_PATH) $(TK_INC_PATH) \
+       -I$(top_srcdir)/modules/string/includes/ \
+       -I$(top_srcdir)/modules/graphic_objects/includes/ \
+       $(JAVA_JNI_INCLUDE) -Isrc/cpp $(TCL_INC_PATH) $(TK_INC_PATH) \
        -I$(top_srcdir)/libs/MALLOC/includes/ \
        -I$(top_srcdir)/libs/hashtable/ \
        -I$(top_srcdir)/modules/jvm/includes/ \
index 50b190a..74ae1c3 100644 (file)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="Windows-1252"?>
 <VisualStudioProject
        ProjectType="Visual C++"
        Version="9,00"
@@ -45,7 +45,7 @@
                                Name="VCCLCompilerTool"
                                AdditionalOptions=""
                                Optimization="0"
-                               AdditionalIncludeDirectories="includes;../../java/jdk/include;../../java/jdk/include/win32;../elementary_functions/includes;../output_stream/includes;../fileio/includes;../gui/includes;../core/includes;../localization/includes;../../libs/MALLOC/includes;../../libs/intl;../../libs/doublylinkedlist/includes;../../libs/hashtable;src/c;src/c/getHandleProperty;../renderer/includes;../jvm/includes;includes/handleDrawing;../action_binding/includes;../graphic_export/includes;../string/includes;../windows_tools/includes;../api_scilab/includes"
+                               AdditionalIncludeDirectories="includes;../../java/jdk/include;../../java/jdk/include/win32;../elementary_functions/includes;../output_stream/includes;../fileio/includes;../gui/includes;../core/includes;../localization/includes;../../libs/MALLOC/includes;../../libs/intl;../../libs/doublylinkedlist/includes;../../libs/hashtable;src/c;src/c/getHandleProperty;../renderer/includes;../jvm/includes;includes/handleDrawing;../action_binding/includes;../graphic_export/includes;../string/includes;../windows_tools/includes;../api_scilab/includes;../graphic_objects/includes"
                                PreprocessorDefinitions="FORDLL;_DEBUG;_WINDOWS;_USRDLL;GRAPHICS_EXPORTS;_CRT_SECURE_NO_DEPRECATE"
                                MinimalRebuild="true"
                                BasicRuntimeChecks="0"
                        <Tool
                                Name="VCCLCompilerTool"
                                Optimization="0"
-                               AdditionalIncludeDirectories="includes;../../java/jdk/include;../../java/jdk/include/win32;../elementary_functions/includes;../output_stream/includes;../fileio/includes;../gui/includes;../core/includes;../localization/includes;../../libs/MALLOC/includes;../../libs/intl;../../libs/doublylinkedlist/includes;../../libs/hashtable;src/c;src/c/getHandleProperty;../renderer/includes;../jvm/includes;includes/handleDrawing;../action_binding/includes;../graphic_export/includes;../string/includes;../windows_tools/includes;../api_scilab/includes"
+                               AdditionalIncludeDirectories="includes;../../java/jdk/include;../../java/jdk/include/win32;../elementary_functions/includes;../output_stream/includes;../fileio/includes;../gui/includes;../core/includes;../localization/includes;../../libs/MALLOC/includes;../../libs/intl;../../libs/doublylinkedlist/includes;../../libs/hashtable;src/c;src/c/getHandleProperty;../renderer/includes;../jvm/includes;includes/handleDrawing;../action_binding/includes;../graphic_export/includes;../string/includes;../windows_tools/includes;../api_scilab/includes;../graphic_objects/includes"
                                PreprocessorDefinitions="FORDLL;_DEBUG;_WINDOWS;_USRDLL;GRAPHICS_EXPORTS;_CRT_SECURE_NO_DEPRECATE"
                                MinimalRebuild="true"
                                BasicRuntimeChecks="0"
                                AdditionalOptions=""
                                InlineFunctionExpansion="1"
                                FavorSizeOrSpeed="1"
-                               AdditionalIncludeDirectories="includes;../../java/jdk/include;../../java/jdk/include/win32;../elementary_functions/includes;../output_stream/includes;../fileio/includes;../gui/includes;../core/includes;../localization/includes;../../libs/MALLOC/includes;../../libs/intl;../../libs/doublylinkedlist/includes;../../libs/hashtable;src/c;src/c/getHandleProperty;../renderer/includes;../jvm/includes;includes/handleDrawing;../action_binding/includes;../graphic_export/includes;../string/includes;../windows_tools/includes;../api_scilab/includes"
+                               AdditionalIncludeDirectories="includes;../../java/jdk/include;../../java/jdk/include/win32;../elementary_functions/includes;../output_stream/includes;../fileio/includes;../gui/includes;../core/includes;../localization/includes;../../libs/MALLOC/includes;../../libs/intl;../../libs/doublylinkedlist/includes;../../libs/hashtable;src/c;src/c/getHandleProperty;../renderer/includes;../jvm/includes;includes/handleDrawing;../action_binding/includes;../graphic_export/includes;../string/includes;../windows_tools/includes;../api_scilab/includes;../graphic_objects/includes"
                                PreprocessorDefinitions="FORDLL;NDEBUG;_WINDOWS;_USRDLL;GRAPHICS_EXPORTS;_CRT_SECURE_NO_DEPRECATE"
                                StringPooling="true"
                                RuntimeLibrary="2"
                                Name="VCCLCompilerTool"
                                InlineFunctionExpansion="1"
                                FavorSizeOrSpeed="1"
-                               AdditionalIncludeDirectories="includes;../../java/jdk/include;../../java/jdk/include/win32;../elementary_functions/includes;../output_stream/includes;../fileio/includes;../gui/includes;../core/includes;../localization/includes;../../libs/MALLOC/includes;../../libs/intl;../../libs/doublylinkedlist/includes;../../libs/hashtable;src/c;src/c/getHandleProperty;../renderer/includes;../jvm/includes;includes/handleDrawing;../action_binding/includes;../graphic_export/includes;../string/includes;../windows_tools/includes;../api_scilab/includes"
+                               AdditionalIncludeDirectories="includes;../../java/jdk/include;../../java/jdk/include/win32;../elementary_functions/includes;../output_stream/includes;../fileio/includes;../gui/includes;../core/includes;../localization/includes;../../libs/MALLOC/includes;../../libs/intl;../../libs/doublylinkedlist/includes;../../libs/hashtable;src/c;src/c/getHandleProperty;../renderer/includes;../jvm/includes;includes/handleDrawing;../action_binding/includes;../graphic_export/includes;../string/includes;../windows_tools/includes;../api_scilab/includes;../graphic_objects/includes"
                                PreprocessorDefinitions="FORDLL;NDEBUG;_WINDOWS;_USRDLL;GRAPHICS_EXPORTS;_CRT_SECURE_NO_DEPRECATE"
                                StringPooling="true"
                                RuntimeLibrary="2"
index 5cd594b..3c8dffc 100644 (file)
@@ -5,17 +5,17 @@
  * Copyright (C) 2004 - 2006 - INRIA - Fabrice Leray
  * Copyright (C) 2005 - INRIA - Jean-Baptiste Silvy
  * Copyright (C) 2009 - DIGITEO - Pierre Lando
- * 
+ *
  * This file must be used under the terms of the CeCILL.
  * This source file is licensed as described in the file COPYING, which
  * you should have received as part of this distribution.  The terms
- * are also available at    
+ * are also available at
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  */
 
 /*------------------------------------------------------------------------
- *    Graphic library 
+ *    Graphic library
  *    newGraph Library header
  *    This file contains all structures definitions used for New Graphics mode.
  --------------------------------------------------------------------------*/
@@ -68,43 +68,43 @@ POINT2D;
  * @memo SCI_POLYLINE,
  * @memo SCI_RECTANGLE,
  * @memo SCI_SURFACE,
- * @memo SCI_AXIS, 
- * @memo SCI_AXES, 
- * @memo SCI_SEGS 
- * @memo SCI_GRAYPLOT, 
+ * @memo SCI_AXIS,
+ * @memo SCI_AXES,
+ * @memo SCI_SEGS
+ * @memo SCI_GRAYPLOT,
  * @memo SCI_FEC,
  * @memo SCI_UIMENU,
  * @memo SCI_UICONTEXTMENU,
  */
 typedef enum
   {/**Entity type FIGURE*/
-    SCI_FIGURE,                
+    SCI_FIGURE,
     /**Entity type SUBWINDOW*/
-    SCI_SUBWIN,                
+    SCI_SUBWIN,
     /**Entity type TEXT*/
     SCI_TEXT,
     /**Entity type LEGEND */
-    SCI_LEGEND,                
+    SCI_LEGEND,
     /**Entity type ARC */
-    SCI_ARC,                   
+    SCI_ARC,
     /**Entity type POLYLINE*/
-    SCI_POLYLINE,          
+    SCI_POLYLINE,
     /**Entity type RECTANGLE*/
-    SCI_RECTANGLE,    
+    SCI_RECTANGLE,
     /**Entity type SURFACE*/
-    SCI_SURFACE,       
+    SCI_SURFACE,
     /**Entity type AXES*/
-    SCI_AXES,    
+    SCI_AXES,
     /**Entity type SEGS*/
-    SCI_SEGS,  
+    SCI_SEGS,
     /**Entity type GRAYPLOT*/
-    SCI_GRAYPLOT, 
+    SCI_GRAYPLOT,
     /**Entity type FEC*/
-    SCI_FEC,                                           
+    SCI_FEC,
     /**Entity type CONTEXT MENU*/
-    SCI_UICONTEXTMENU,             
+    SCI_UICONTEXTMENU,
     /**Entity type Compound */
-    SCI_AGREG,                 
+    SCI_AGREG,
     /**Entity type LABEL created by F.Leray 26.05.04 */
     SCI_LABEL,
     /**Entity type UIMENU created by A.C 28.09.05 **/
@@ -117,7 +117,7 @@ typedef enum
     SCI_PROGRESSIONBAR
   }
 /**Struct of Entity type*/
-sciEntityType; 
+sciEntityType;
 
 struct _sciRelationShip;
 
@@ -135,6 +135,8 @@ typedef struct
   void * pDrawer ;
        /** reference the object in the hierachy */
        struct _sciRelationShip * relationShip;
+    /** UID */
+    char * UID;
 }
 sciPointObj;
 
@@ -146,14 +148,14 @@ sciPointObj;
 typedef struct tagSons
 {
   /** */
-  struct tagSons *pprev;         
+  struct tagSons *pprev;
   /**  is the pointer of next the son's structure      */
-  sciPointObj *pointobj;       
+  sciPointObj *pointobj;
   /** */
   struct tagSons *pnext;
 }
 /** */
-sciSons;  
+sciSons;
 
 /**@name RelationShip
  * Used to determine the hierarchy
@@ -161,11 +163,11 @@ sciSons;
 typedef struct _sciRelationShip
 {
   /** is the scilab handle of THIS */
-  long handleIndex;       
+  long handleIndex;
   /** points to the parent structures */
-  sciPointObj * pparent;              
+  sciPointObj * pparent;
   /** points to the sons structures */
-  sciSons * psons;            
+  sciSons * psons;
   /** the last sciSons of the list (the first created!) */
   sciSons * plastsons;
   /** the set of selected sons. List of lists for each type. Not to be used directly.*/
@@ -175,13 +177,13 @@ sciRelationShip;
 
 
 /**@name GraphicContext
- * Used to know what are the contexte value attached with the Graphic area  
+ * Used to know what are the contexte value attached with the Graphic area
  */
 typedef struct
 {
   /** currently not used in this version */
   /** pointe sur un ID de la table des couleur Scilab */
-  int backgroundcolor;     
+  int backgroundcolor;
   /** pointe sur un ID de la table des couleur Scilab */
   int foregroundcolor;
   /** */
@@ -207,18 +209,18 @@ typedef struct
   /** */
   int markforeground;
 }/** */
-sciGraphicContext;  
+sciGraphicContext;
 
 
 /**@name sciFont
- * Used to know what are the contexte value attached with the Graphic area  
+ * Used to know what are the contexte value attached with the Graphic area
  */
 typedef struct
 {
   /** currently not used in this version */
   /* il faudrait prendre la font windows */
   /** pointe sur un ID de la table des couleur Scilab */
-  int backgroundcolor;         
+  int backgroundcolor;
   /** pointe sur un ID de la table des couleur Scilab */
   int foregroundcolor;
   /** type of the font */
@@ -226,28 +228,28 @@ typedef struct
   /** specify if the font size must be stucks to Scilab font sizes 0:6 or might be any double */
   BOOL useFractionalMetrics;
   /** Gets the width of the character in tenth of point */
-  double fontSize;             
+  double fontSize;
   /** this is coded in radian*/
-  double textorientation;              
+  double textorientation;
 }/** */
-sciFont;  
+sciFont;
 
 
 /**@name scigMode
  * Used to determine all the mode that can be used. Only some entity can sets this itself
  */
 typedef struct
-{ 
+{
   /** Are new Plot added to the old plot on the graphics window        */
-  BOOL addplot;               
+  BOOL addplot;
   /** The min max ranges of the the graphics window is given by users  */
-  BOOL autoscaling;    
+  BOOL autoscaling;
   /** Is zooming allowed                                               */
-  BOOL zooming;   
+  BOOL zooming;
   /** drawing xor mode                                                         */
   int xormode;
-                      
-  
+
+
 }/** */
 scigMode;
 
@@ -270,7 +272,7 @@ typedef struct
   /** */
   double zmax;
 }/** */
-sciRange;  
+sciRange;
 
 
 /**
@@ -293,10 +295,10 @@ typedef struct
 FigureModelData ;
 
 /**
- * Structure used to specify Figure (different to XGC) 
+ * Structure used to specify Figure (different to XGC)
  */
 typedef struct
-{      
+{
   scigMode gmode;
   sciGraphicContext graphiccontext; /* the only property used here is background */
   sciPointObj * originalsubwin0011;
@@ -307,9 +309,9 @@ typedef struct
   int number;
 
   int numcolors;
-     
+
   /** specifies if this window is selected             */
-  BOOL isselected; 
+  BOOL isselected;
   int rotstyle;
   /** specifies if this object is visble             */
   BOOL visible;
@@ -318,22 +320,22 @@ typedef struct
   int numsubwinselected;
   /** specifies the current pixmap status         */
   int pixmapMode ;
-  
+
   BOOL allredraw;
-  
+
   sciFont fontcontext; /* F.Leray 08.04.04 */
 
   char * eventHandler         ; /**< Name of the EventHandler function */
   BOOL   isEventHandlerEnable ; /**< flag enabling or disabling eventhandler */
-  
+
   FigureModelData * pModelData ; /**< To be used by figure model */
 
   int * user_data; /* adding 27.06.05 */
   int size_of_user_data;
-  
+
   char * tag;
 }/** */
-sciFigure;  
+sciFigure;
 
 typedef enum { ALIGN_NONE = 0, ALIGN_LEFT = 1, ALIGN_CENTER = 2, ALIGN_RIGHT = 3 } sciTextAlignment ;
 
@@ -345,7 +347,7 @@ typedef struct
   /** */
   sciFont fontcontext;
   sciGraphicContext graphiccontext; /* the only properties used by Text are foreground and background */
-  
+
   /** the displayed text */
   StringMatrix * pStrings ;
 
@@ -362,17 +364,17 @@ typedef struct
                    /* automatically computed. */
 
   double userSize[2] ; /**< Width and height of the displayed string array defined by user */
-  
+
   sciTextAlignment stringsAlign ; /**< Alignment of the strings inside the array */
-  
+
   BOOL centeredPos ; /**< to know wether the (x,y) position is the point in the middle of the
                         string or the lower-left point */
   BOOL isboxed  ;
   /** */
   /** specifies the text scilab code for the callback associated with this entity */
-  char *callback; 
+  char *callback;
   /** the length of the callback code */
-  int callbacklen; 
+  int callbacklen;
   int callbackevent;
 
   double corners[4][3]; /**< position of the text bounding box corners */
@@ -382,12 +384,12 @@ typedef struct
   int isclip;
   double clip_region[4];
   int clip_region_set;
-  
+
   int * user_data; /* adding 27.06.05 */
   int size_of_user_data;
 
 }
-sciText;  
+sciText;
 
 
 
@@ -427,7 +429,7 @@ sciLegendPlace;
 
 
 /**@name Legend
- * Structure used to specify Legend 
+ * Structure used to specify Legend
  */
 typedef struct
 {
@@ -441,27 +443,27 @@ typedef struct
   /** */
   POINT2D pos;
   /** specifies the frame's width */
-  int width;        
+  int width;
   /** specifies the frame's height */
-  int height;       
+  int height;
   /** */
   BOOL isselected;
   /** specifies if the legend is surrounded */
-  BOOL issurround;          
+  BOOL issurround;
   /* void    *associetedentity;  get the associated entity by asking parents.relation.sons */
   /* the subwindow dimension is get by asking relation     */
   sciLegendPlace place;
   /** pointer on the labelled objects */
   long long *tabofhandles;
   /** specifies if this object is visble             */
-  BOOL visible; 
+  BOOL visible;
   int isclip;
   double clip_region[4];
   int clip_region_set;
   int * user_data; /* adding 27.06.05 */
   int size_of_user_data;
 }/** */
-sciLegend;  
+sciLegend;
 
 
 /**@name Titre
@@ -620,8 +622,8 @@ typedef enum {LEFT_ALIGNMENT, CENTER_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT,
 /* the part of the drawn box for 3d axis */
 typedef enum { BT_OFF = FALSE, BT_ON = TRUE, BT_HIDDEN_AXES, BT_BACK_HALF } EAxesBoxType ;
 
-typedef struct 
-{  
+typedef struct
+{
   /* tics data from algo */
   double  xgrads[20], ygrads[20], zgrads[20];                   /* Here they are  */
   int nxgrads, nygrads, nzgrads;                         /* with their size <=> nber of tics */
@@ -629,39 +631,39 @@ typedef struct
   /* tics data from user (=> u_...)*/
   double *u_xgrads, *u_ygrads, *u_zgrads;                       /* Here they are  */
   int u_nxgrads, u_nygrads, u_nzgrads;                   /* with their size <=> nber of tics */
-  
+
   int  ticscolor;
   /*  int  fontsize;
       int  textcolor;*/
   sciFont fontcontext;
-  
+
   int  subint[3]; /* Dj.A 17/12/03 */
   EAxesBoxType  rect ; /**< to know the part of the box we have to draw */
   BOOL filled; /**< Specify wether the axis background should be drawn or not.
                     graphic_context is not used because otherwise all the children would inherit the value.*/
 
-  char xdir;   /**<  xdir  = 'u' | 'd'  : gives the xy-axes positions */ 
-  char ydir;   /**<  ydir  = 'r' | 'l' : gives the xy-axes positions */ 
+  char xdir;   /**<  xdir  = 'u' | 'd'  : gives the xy-axes positions */
+  char ydir;   /**<  ydir  = 'r' | 'l' : gives the xy-axes positions */
+
 
   /* flags for switching from auto to manual ticks */
   BOOL auto_ticks[3]; /* if on, it means that the ticks are taken from computation (see theticks algo. by Francois D.) */
-  
+
   char **u_xlabels,  **u_ylabels,  **u_zlabels; /* label string corresponding to each specified u_xyzgrads */
-    
+
   int hiddenAxisColor ; /* the color and style of the hidden axis */
 
   double  limits[7]; /* = 1 set tight limits = 0 set axes auto shape */
   int flag[3]; /* 3d options */
-  
+
   /* F.Leray 07.10.04 REMOVE AAINT*/
   int nbsubtics[3]; /* Don't touch to subint because also deals with drawaxis: AXES structure has multiple uses... */ /* F.Leray 07.10.04 */
 
   BOOL reverse[3]; /* if TRUE, it means that the corresponding axe is reversed */
   BOOL axes_visible[3]; /* if TRUE, it means that the corresponding axes is drawn */
-  
+
 }
-AXES; 
+AXES;
 
 /**@name SubWindow
  * Structure used to specify SubWindow wich is a subplot
@@ -674,7 +676,7 @@ typedef struct
   /** */
   sciGraphicContext graphiccontext;
   /** specifies if this subwindow is selected                */
-      
+
   double SRect[6]; /* [xmin xmax ymin ymax zmin zmax] : Strict rect. coming from update_specification_bounds function or from a set(a,"data_bounds",[...]) */
   double FRect[6]; /* real data_bounds */
   double WRect[4]; /* size of the subplot */
@@ -695,12 +697,12 @@ typedef struct
   double alpha_kp;
   /* viewing angles */
   double theta;
-  double alpha;          
+  double alpha;
   /** specifies the text scilab code for the callback associated with this entity */
-  char *callback; 
+  char *callback;
   /** the length of the callback code */
-  int callbacklen;  
-  int callbackevent; 
+  int callbacklen;
+  int callbackevent;
   /** specifies if this object is visble             */
   BOOL visible;
 
@@ -711,7 +713,7 @@ typedef struct
   int clip_region_set;
   /**DJ.Abdemouche 2003**/
   int project[3];
-  BOOL isoview; 
+  BOOL isoview;
   int hiddencolor;
   BOOL cube_scaling; /* Matlab like view in 3D when one or two range is/are preferential */
   BOOL FirstPlot; /* An internal state used to indicated that high level functions must not use SRect*/
@@ -729,16 +731,16 @@ typedef struct
 
 
 }/** */
-sciSubWindow;  
+sciSubWindow;
 
 
 /**@name Arc
- * Structure used to specify 
+ * Structure used to specify
  * @author Matthieu PHILIPPE /MAJ D.ABDEMOUCHE
  * @version 0.1
- * @args 
- * @return 
- * @see 
+ * @args
+ * @return
+ * @see
  */
 typedef struct
 {
@@ -753,15 +755,15 @@ typedef struct
   /** */
   double height;
   /** begin at alpha1 */
-  double alphabegin;           
+  double alphabegin;
   /** end at alpha2   */
   double alphaend;
   /** */
   BOOL isselected;
   /** specifies the text scilab code for the callback associated with this entity */
-  char *callback; 
+  char *callback;
   /** the length of the callback code */
-  int callbacklen;   
+  int callbacklen;
   int callbackevent;
   /** specifies if this object is visble             */
   BOOL visible;
@@ -780,12 +782,12 @@ sciArc;
 
 
 /**@name Polyline
- * Structure used to specify 
+ * Structure used to specify
  * @author Matthieu PHILIPPE /MAJ D.ABDEMOUCHE
  * @version 0.1
- * @args 
- * @return 
- * @see 
+ * @args
+ * @return
+ * @see
  */
 typedef struct
 {
@@ -798,7 +800,7 @@ typedef struct
   int plot;                     /** defines the polyline_style (interpolated, staircase, bar_plot,...) : is it simple poly or a plot (Plot2d /Plot2d1/.../Plot2d4) */
   BOOL isselected;
   char *callback;              /** specifies the text scilab code for the callback associated with this entity */
-  int callbacklen;             /** the length of the callback code */  
+  int callbacklen;             /** the length of the callback code */
   int callbackevent;
   /** specifies if this object is visble             */
   BOOL visible;
@@ -814,16 +816,16 @@ typedef struct
   double * x_shift;
   double * y_shift;
   double * z_shift;
-  
+
   double bar_width;
-  
+
   double arsize_factor; /* to be able to enlarge arrow size without changing the line thickness */
 }
 sciPolyline;  /** */
 
 
 /**@name Rectangle
- * Structure used to specify 
+ * Structure used to specify
  */
 typedef struct
 {
@@ -834,7 +836,7 @@ typedef struct
   double height;
   BOOL isselected;
   char *callback; /** specifies the text scilab code for the callback associated with this entity */
-  int callbacklen; /** the length of the callback code */  
+  int callbacklen; /** the length of the callback code */
   int callbackevent;
   /** specifies if this object is visble             */
   BOOL visible;
@@ -861,7 +863,7 @@ sciTypeOf3D;
 
 
 /**@name Surface
- * Structure used to specify 
+ * Structure used to specify
  */
 typedef struct
 {
@@ -903,14 +905,14 @@ typedef struct
 
   int flag[3]; /* only the first value is used as color_mode */
   double ebox[6]; /* apparently unused */
-  int flagcolor; /* this flag indicates the type of the color of how the facet have to be colored 
+  int flagcolor; /* this flag indicates the type of the color of how the facet have to be colored
                    0: uniformed color
                    1: facet's color are computed with z*/ /* in case of a simple plot...!!! F.Leray 19.03.04 */
   sciTypeOf3D typeof3d; /* Fac3d or Plot3d */
   int hiddencolor;
   BOOL isselected;
   char *callback; /** specifies the text scilab code for the callback associated with this entity */
-  int callbacklen; /** the length of the callback code */  
+  int callbacklen; /** the length of the callback code */
   int callbackevent;
   /** specifies if this object is visble             */
   BOOL visible;
@@ -922,7 +924,7 @@ typedef struct
   int isclip; /**< Clipping state of the object */
   double clip_region[4]; /**< Clipping region */
   int clip_region_set; /**< To know if the clippign region is set */
-  
+
   int * user_data; /* adding 27.06.05 */
   int size_of_user_data;
 }
@@ -930,22 +932,22 @@ sciSurface;  /** */
 
 
 /**@name Axes
- * Structure used to specify axes feature 
- * @author Djalel Abdemouche 
+ * Structure used to specify axes feature
+ * @author Djalel Abdemouche
  * @version 0.1
- * @args 
- * @return 
- * @see 
+ * @args
+ * @return
+ * @see
  */
+
 typedef struct
 {
   sciGraphicContext graphiccontext;
   sciFont fontcontext;
-  char dir;   /** dir = 'r' | 'l' | 'u' | 'd' : gives the tics directions **/  
+  char dir;   /** dir = 'r' | 'l' | 'u' | 'd' : gives the tics directions **/
   char tics;  /** tics = 'v' (for vector) or 'r' (for range) or i **/
   double *vx;  /** vx vector of size nx **/
-  double *vy;  /** vy vector of size ny **/ 
+  double *vy;  /** vy vector of size ny **/
   /**DJ.Abdemouche 2003**/
   double *vz; /* not used */
   int nx;
@@ -954,11 +956,11 @@ typedef struct
   /***/
   int nz;
   char **str ;  /** string vector **/
-  int subint;  /** subints : number of sub intervals **/ 
+  int subint;  /** subints : number of sub intervals **/
   char *format; /** format for tick marks **/
   int seg;      /**0 or 1, flag which control the drawing of the segment associated to the axes **/
   char *callback; /** specifies the text scilab code for the callback associated with this entity */
-  int callbacklen; /** the length of the callback code */  
+  int callbacklen; /** the length of the callback code */
   int callbackevent;
   /** specifies if this object is visble             */
   BOOL visible;
@@ -969,25 +971,25 @@ typedef struct
   int * user_data; /* adding 27.06.05 */
   int size_of_user_data;
 }
-sciAxes;  
+sciAxes;
 
 /**@name Segs
- * Structure used to specify axes feature 
- * @author Djalel Abdemouche 
+ * Structure used to specify axes feature
+ * @author Djalel Abdemouche
  * @version 0.1
- * @args 
- * @return 
- * @see 
+ * @args
+ * @return
+ * @see
  */
-  
+
 typedef struct
 {
-  sciGraphicContext graphiccontext; 
+  sciGraphicContext graphiccontext;
   double *vx;  /** vx vector of size Nbr **/ /*F.Leray 18.02.04 ...of size Nbr1 ? No depending on the type ptype*/
   double *vy;  /** vy vector of size Nbr **/ /*F.Leray 18.02.04 ...of size Nbr2 ? No depending on the type ptype*/
   double *vfx; /* size Nbr1 * Nbr2 */
   double *vfy; /* size Nbr1 * Nbr2 */
-  int Nbr1; /**< size of vx and vy id segs handle, or size of vx if champ */ 
+  int Nbr1; /**< size of vx and vy id segs handle, or size of vx if champ */
   int Nbr2; /**< size of vy if champ handle */
   int *pstyle;
   int iflag;      /**0 or 1, flag which control the drawing of the segment  **/
@@ -996,7 +998,7 @@ typedef struct
   int typeofchamp; /* when ptype=0, if typeofchamp=0 => champ is invoked else champ1 is invoked (typeofchamp==1) */
   BOOL isselected;
   char *callback; /** specifies the text scilab code for the callback associated with this entity */
-  int callbacklen; /** the length of the callback code */  
+  int callbacklen; /** the length of the callback code */
   int callbackevent;
   /** specifies if this object is visble             */
   BOOL visible;
@@ -1009,34 +1011,34 @@ typedef struct
   int * user_data; /* adding 27.06.05 */
   int size_of_user_data;
 }
-sciSegs; 
+sciSegs;
+
 
 
 
 /**@name Grayplot
- * Structure used to specify axes feature 
- * @author Djalel Abdemouche 
+ * Structure used to specify axes feature
+ * @author Djalel Abdemouche
  * @version 0.1
- * @args 
- * @return 
- * @see 
+ * @args
+ * @return
+ * @see
  */
+
 typedef struct
 {
-  sciGraphicContext graphiccontext; 
-  
+  sciGraphicContext graphiccontext;
+
   double *pvecx;  /** vx vector of size nx **/
-  double *pvecy;  /** vy vector of size ny **/ 
-  double *pvecz;  /** vz vector of size nx*ny **/  
-  int nx; 
+  double *pvecy;  /** vy vector of size ny **/
+  double *pvecz;  /** vz vector of size nx*ny **/
+  int nx;
   int ny;
-  int type;   /** 0 if a grayplot, 1if a matplot, 2 if matplot 1 **/  
+  int type;   /** 0 if a grayplot, 1if a matplot, 2 if matplot 1 **/
   char datamapping[7]; /* "scaled" or "direct" */
   BOOL isselected;
   char *callback; /** specifies the text scilab code for the callback associated with this entity */
-  int callbacklen; /** the length of the callback code */   
+  int callbacklen; /** the length of the callback code */
   int callbackevent;
   /** specifies if this object is visble             */
   BOOL visible;
@@ -1048,22 +1050,22 @@ typedef struct
   int * user_data; /* adding 27.06.05 */
   int size_of_user_data;
 }
-sciGrayplot;  
+sciGrayplot;
 /** */
 
 /**@name Fec
- * Structure used to specify fec feature 
- * @author Djalel Abdemouche 
+ * Structure used to specify fec feature
+ * @author Djalel Abdemouche
  * @version 0.1
- * @args 
- * @return 
- * @see 
+ * @args
+ * @return
+ * @see
  */
+
 typedef struct
 {
-  sciGraphicContext graphiccontext; 
-  
+  sciGraphicContext graphiccontext;
+
   double *pvecx; /* X coordinates of nodes */
   double *pvecy; /* Y coordinates of nodes */
   double *pnoeud; /* indices of nodes */
@@ -1075,7 +1077,7 @@ typedef struct
   int colout[2]; /* color to use when outside zmin/zmax */
   BOOL isselected;
   char *callback; /** specifies the text scilab code for the callback associated with this entity */
-  int callbacklen; /** the length of the callback code */ 
+  int callbacklen; /** the length of the callback code */
   int callbackevent;
   /** specifies if this object is visble             */
   BOOL visible;
@@ -1092,7 +1094,7 @@ sciFec;  /** */
 
 
 /**@name Panner
- * Structure used to specify 
+ * Structure used to specify
  */
 typedef struct
 {
@@ -1102,7 +1104,7 @@ typedef struct
   double ymax;
   BOOL isselected;
   char *callback; /** specifies the text scilab code for the callback associated with this entity */
-  int callbacklen; /** the length of the callback code */ 
+  int callbacklen; /** the length of the callback code */
   int callbackevent;
   /** specifies if this object is visble             */
   BOOL visible;
index 99b6588..0b14b5f 100644 (file)
@@ -23,42 +23,42 @@ function %h_p(h)
             t="Handle of type """+h.type+""" with properties:"
             t=[t;part('=',ones(1,length(t)))]
         end
-        
+
         select h.type
-        
+
         // Polyline
         // =====================================================================
-        
+
         case "Polyline"
-            
-            if size(h.data,'*') > 10 then 
+
+            if size(h.data,'*') > 10 then
                 d="matrix "+strcat(string(size(h.data)),'x')
             else
                 d=sci2exp(h.data,0)
                 if length(d)>70 then d="matrix "+strcat(string(size(h.data)),'x'),end
             end
-            
-            if size(h.x_shift,'*') > 10 then 
+
+            if size(h.x_shift,'*') > 10 then
                 bxs="matrix "+strcat(string(size(h.x_shift)),'x')
             else
                 bxs=sci2exp(h.x_shift,0)
                 if length(bxs)>70 then bxs="matrix "+strcat(string(size(h.x_shift)),'x'),end
             end
-            
-            if size(h.y_shift,'*') > 10 then 
+
+            if size(h.y_shift,'*') > 10 then
                 bys="matrix "+strcat(string(size(h.y_shift)),'x')
             else
                 bys=sci2exp(h.y_shift,0)
                 if length(bys)>70 then bys="matrix "+strcat(string(size(h.y_shift)),'x'),end
             end
-            
-            if size(h.z_shift,'*') > 10 then 
+
+            if size(h.z_shift,'*') > 10 then
                 bzs="matrix "+strcat(string(size(h.z_shift)),'x')
             else
                 bzs=sci2exp(h.z_shift,0)
                 if length(bzs)>70 then bzs="matrix "+strcat(string(size(h.z_shift)),'x'),end
             end
-            
+
             u=h.user_data;
             t=[t;
                 "parent: "+h.parent.type
@@ -90,10 +90,10 @@ function %h_p(h)
                 "clip_box = "+sci2exp(h.clip_box)
                 "user_data = "+fmtuser_data(u)
             ]
-        
+
         // Compound
         // =====================================================================
-        
+
         case "Compound"
             u=h.user_data
             t=[t;
@@ -101,12 +101,12 @@ function %h_p(h)
             "children: "+fmtchildren(h.children)
             "visible = "+sci2exp(h.visible)
             "user_data = "+fmtuser_data(u)]
-        
+
         // Axes
         // =====================================================================
-        
+
         case "Axes"
-    
+
             T=h.x_ticks
             if size(T.locations,'*')>9 then
                 locx="matrix "+strcat(string(size(T.locations)),'x')
@@ -117,7 +117,7 @@ function %h_p(h)
                 if length(locx)>70 then locx="matrix "+strcat(string(size(T.locations)),'x'), end
                 if length(labx)>70 then labx="matrix "+strcat(string(size(T.labels)),'x'), end
             end
-            
+
             T=h.y_ticks
             if size(T.locations,'*')>9 then
                 locy="matrix "+strcat(string(size(T.locations)),'x')
@@ -128,7 +128,7 @@ function %h_p(h)
                 if length(locy)>70 then locx="matrix "+strcat(string(size(T.locations)),'x'), end
                 if length(laby)>70 then labx="matrix "+strcat(string(size(T.labels)),'x'), end
             end
-            
+
             T=h.z_ticks
             if size(T.locations,'*')>9 then
                 locz="matrix "+strcat(string(size(T.locations)),'x')
@@ -139,7 +139,7 @@ function %h_p(h)
                 if length(locz)>70 then locx="matrix "+strcat(string(size(T.locations)),'x'), end
                 if length(labz)>70 then labx="matrix "+strcat(string(size(T.labels)),'x'), end
             end
-            
+
             u=h.user_data
             t=[t;
                 "parent: "+h.parent.type
@@ -203,10 +203,10 @@ function %h_p(h)
                 "clip_box = "+sci2exp(h.clip_box,0)
                 "user_data = "+fmtuser_data(h.user_data)
             ]
-        
+
         // Legend
         // =====================================================================
-        
+
         case "Legend"
          t=[t;
             "parent: "+h.parent.type
@@ -217,7 +217,7 @@ function %h_p(h)
             "font_size = "+string(h.font_size)
             "font_color = "+string(h.font_color)
             "fractional_font = " + sci2exp(h.fractional_font)
-            "links = " +  fmtchildren(h.links) 
+            "links = " +  fmtchildren(h.links)
             "legend_location = " + sci2exp(h.legend_location)
             "position = " + sci2exp(h.position)
             "line_mode = "+sci2exp(h.line_mode)
@@ -229,10 +229,10 @@ function %h_p(h)
             "clip_box = "+sci2exp(h.clip_box,0)
             "user_data = "+fmtuser_data(h.user_data)
              ]
-        
+
         // Rectangle
         // =====================================================================
-        
+
         case "Rectangle"
             u=h.user_data
             t=[t;
@@ -256,10 +256,10 @@ function %h_p(h)
                 "clip_box = "+sci2exp(h.clip_box,0)
                 "user_data = "+fmtuser_data(u)
             ]
-        
+
         // Arc
         // =====================================================================
-        
+
         case "Arc"
             u=h.user_data
             t=[t;
@@ -273,15 +273,15 @@ function %h_p(h)
                 "background = "+string(h.background)
                 "data = "+sci2exp(h.data,0)
                 "visible = "+sci2exp(h.visible)
-                "arc_drawing_method = " + sci2exp(h.arc_drawing_method) 
+                "arc_drawing_method = " + sci2exp(h.arc_drawing_method)
                 "clip_state = "+sci2exp(h.clip_state)
                 "clip_box = "+sci2exp(h.clip_box,0)
                 "user_data = "+fmtuser_data(u)
             ]
-        
+
         // Figure
         // =====================================================================
-        
+
         case "Figure"
             u=h.user_data
             t=[t;
@@ -306,39 +306,40 @@ function %h_p(h)
                 "event_handler_enable = " + sci2exp( h.event_handler_enable ) ;
                 "user_data = "+fmtuser_data(u)
                 "tag = "+sci2exp(h.tag)
+                "UID = "+sci2exp(h.UID)
             ]
-        
+
         // Grayplot
         // =====================================================================
-       
+
         case "Grayplot"
             Data = h.data
-            if size(Data.x,'*') > 10 then 
+            if size(Data.x,'*') > 10 then
                 dx="matrix "+strcat(string(size(Data.x)),'x')
             else
                 dx=sci2exp(Data.x,0)
                 if length(dx)>70 then d="matrix "+strcat(string(size(Data.x)),'x'),end
             end
-            
-            if size(Data.y,'*') > 10 then 
+
+            if size(Data.y,'*') > 10 then
                 dy="matrix "+strcat(string(size(Data.y)),'x')
             else
                 dy=sci2exp(Data.y,0)
                 if length(dy)>70 then d="matrix "+strcat(string(size(Data.y)),'x'),end
             end
-        
-            if size(Data.z,'*') > 10 then 
+
+            if size(Data.z,'*') > 10 then
                 dz="matrix "+strcat(string(size(Data.z)),'x')
             else
                 dz=sci2exp(Data.z,0)
                 if length(dz)>70 then d="matrix "+strcat(string(size(Data.z)),'x'),end
             end
-            
+
             u=h.user_data
             t=[t;
                 "parent: "+h.parent.type
                 "children: "+fmtchildren(h.children)
-                "visible = "+sci2exp(h.visible) 
+                "visible = "+sci2exp(h.visible)
                 "data.x = "+dx
                 "data.y = "+dy
                 "data.z = "+dz
@@ -347,15 +348,15 @@ function %h_p(h)
                 "clip_box = "+sci2exp(h.clip_box,0)
                 "user_data = "+fmtuser_data(u)
             ]
-        
+
         // Matplot
         // =====================================================================
-        
-        
+
+
         case "Matplot"
-            if size(h.data,'*') > 10 then 
+            if size(h.data,'*') > 10 then
                 d="matrix "+strcat(string(size(h.data)),'x')
-            else     
+            else
                 d=sci2exp(h.data,0)
                 if length(d)>70 then d="matrix "+strcat(string(size(h.data)),'x'),end
             end
@@ -369,29 +370,29 @@ function %h_p(h)
                 "clip_box = "+sci2exp(h.clip_box,0)
                 "user_data = "+fmtuser_data(u)
             ]
-        
+
         // Fec
         // =====================================================================
         case "Fec"
             u=h.user_data
-            if size(h.data,'*') > 10 then 
+            if size(h.data,'*') > 10 then
                 d="matrix "+strcat(string(size(h.data)),'x')
             else
                 d=sci2exp(h.data,0)
                 if length(d)>70 then d="matrix "+strcat(string(size(h.data)),'x'),end
             end
-            
-            if size(h.triangles,'*') > 10 then 
+
+            if size(h.triangles,'*') > 10 then
                 f="matrix "+strcat(string(size(h.triangles)),'x')
             else
                 f=sci2exp(h.triangles,0)
                 if length(f)>70 then f="matrix "+strcat(string(size(h.triangles)),'x'),end
             end
-            
+
             t=[t;
                 "parent: "+h.parent.type
                 "children: "+fmtchildren(h.children)
-                "visible = "+sci2exp(h.visible) 
+                "visible = "+sci2exp(h.visible)
                 "data = "+d
                 "triangles = "+f
                 "z_bounds = "+sci2exp(h.z_bounds,0)
@@ -406,27 +407,27 @@ function %h_p(h)
 
         // Segs
         // =====================================================================
-        
+
         case "Segs"
-            if size(h.data,'*') > 10 then 
+            if size(h.data,'*') > 10 then
                 d="matrix "+strcat(string(size(h.data)),'x')
             else
                 d=sci2exp(h.data,0)
                 if length(d)>70 then d="matrix "+strcat(string(size(h.data)),'x'),end
             end
-            
-            if size(h.segs_color,'*') > 10 then 
+
+            if size(h.segs_color,'*') > 10 then
                 c="matrix "+strcat(string(size(h.segs_color)),'x')
             else
                 c=sci2exp(h.segs_color,0)
                 if length(c)>70 then c="matrix "+strcat(string(size(h.segs_color)),'x'),end
             end
-            
+
             u=h.user_data
             t=[t;
                 "parent: "+h.parent.type
                 "children: "+fmtchildren(h.children)
-                "visible = "+sci2exp(h.visible) 
+                "visible = "+sci2exp(h.visible)
                 "data = "+d
                 "line_mode = "+sci2exp(h.line_mode)
                 "line_style = "+string(h.line_style)
@@ -446,42 +447,42 @@ function %h_p(h)
 
         // Champ
         // =====================================================================
-        
+
         case "Champ"
             Data = h.data
-            if size(Data.x,'*') > 10 then 
+            if size(Data.x,'*') > 10 then
                 dx="matrix "+strcat(string(size(Data.x)),'x')
             else
                 dx=sci2exp(Data.x,0)
                 if length(dx)>70 then d="matrix "+strcat(string(size(Data.x)),'x'),end
             end
-            
-            if size(Data.y,'*') > 10 then 
+
+            if size(Data.y,'*') > 10 then
                 dy="matrix "+strcat(string(size(Data.y)),'x')
             else
                 dy=sci2exp(Data.y,0)
                 if length(dy)>70 then d="matrix "+strcat(string(size(Data.y)),'x'),end
             end
-            
-            if size(Data.fx,'*') > 10 then 
+
+            if size(Data.fx,'*') > 10 then
                 dfx="matrix "+strcat(string(size(Data.fx)),'x')
             else
                 dfx=sci2exp(Data.fx,0)
                 if length(dfx)>70 then d="matrix "+strcat(string(size(Data.fx)),'x'),end
             end
-            
-            if size(Data.fy,'*') > 10 then 
+
+            if size(Data.fy,'*') > 10 then
                 dfy="matrix "+strcat(string(size(Data.fy)),'x')
             else
                 dfy=sci2exp(Data.fy,0)
                 if length(dfy)>70 then d="matrix "+strcat(string(size(Data.fy)),'x'),end
             end
-            
+
             u=h.user_data
             t=[t;
                 "parent: "+h.parent.type
                 "children: "+fmtchildren(h.children)
-                "visible = "+sci2exp(h.visible) 
+                "visible = "+sci2exp(h.visible)
                 "data.x = "+dx
                 "data.y = "+dy
                 "data.fx = "+dfx
@@ -494,10 +495,10 @@ function %h_p(h)
                 "clip_box = "+sci2exp(h.clip_box,0)
                 "user_data = "+fmtuser_data(u)
             ]
-        
+
         // Text
         // =====================================================================
-        
+
         case "Text"
             u=h.user_data
             T=sci2exp(h.text,0)
@@ -505,11 +506,11 @@ function %h_p(h)
             t=[t;
                 "parent: "+h.parent.type
                 "children: "+fmtchildren(h.children)
-                "visible = "+sci2exp(h.visible) 
+                "visible = "+sci2exp(h.visible)
                 "text = "+T
                 "alignment = "+sci2exp(h.alignment) ;
                 "data = "+sci2exp(h.data,0)
-                "box = "+sci2exp(h.box) 
+                "box = "+sci2exp(h.box)
                 "line_mode = " + sci2exp(h.line_mode);
                 "fill_mode = " + sci2exp(h.fill_mode);
                 "text_box = "+sci2exp(h.text_box,0)
@@ -526,17 +527,17 @@ function %h_p(h)
                 "clip_box = "+sci2exp(h.clip_box,0)
                 "user_data = "+fmtuser_data(u)
             ]
-        
+
         // Title
         // =====================================================================
-        
+
         case "Title"
             T=sci2exp(h.text,0)
             if length(T)>70 then T="string array "+strcat(string(size(h.text)),'x'),end
             t=[t;
                 "parent: "+h.parent.type
                 "children: "+fmtchildren(h.children)
-                "visible = "+sci2exp(h.visible) 
+                "visible = "+sci2exp(h.visible)
                 "text = "+T
                 "foreground = "+string(h.foreground)
                 "font_style = "+string(h.font_style)
@@ -544,7 +545,7 @@ function %h_p(h)
                 "fractional_font = " + sci2exp(h.fractional_font)
                 "font_angle = "+string(h.font_angle)
             ]
-        
+
         // Label
         // =====================================================================
 
@@ -553,7 +554,7 @@ function %h_p(h)
             if length(T)>70 then T="string array "+strcat(string(size(h.text)),'x'),end
             t=[t;
                 "parent: "+h.parent.type
-                "visible = "+sci2exp(h.visible) 
+                "visible = "+sci2exp(h.visible)
                 "text = "+T;
                 "font_foreground = " + string(h.font_foreground) ;
                 "foreground = "+string(h.foreground)
@@ -567,34 +568,34 @@ function %h_p(h)
                 "position = "+sci2exp(h.position,0)
                 "auto_rotation = "+sci2exp(h.auto_rotation)
             ]
-        
+
         // Plot3d
         // =====================================================================
         case "Plot3d"
             Data = h.data
-            if size(Data.x,'*') > 10 then 
+            if size(Data.x,'*') > 10 then
                 dx="matrix "+strcat(string(size(Data.x)),'x')
             else
                 dx=sci2exp(Data.x,0)
                 if length(dx)>70 then d="matrix "+strcat(string(size(Data.x)),'x'),end
             end
-            
-            if size(Data.y,'*') > 10 then 
+
+            if size(Data.y,'*') > 10 then
                 dy="matrix "+strcat(string(size(Data.y)),'x')
             else
                 dy=sci2exp(Data.y,0)
                 if length(dy)>70 then d="matrix "+strcat(string(size(Data.y)),'x'),end
             end
-            
-            if size(Data.z,'*') > 10 then 
+
+            if size(Data.z,'*') > 10 then
                 dz="matrix "+strcat(string(size(Data.z)),'x')
             else
                 dz=sci2exp(Data.z,0)
                 if length(dz)>70 then d="matrix "+strcat(string(size(Data.z)),'x'),end
             end
-            
+
             u=h.user_data
-            
+
             if size(Data) == 5 then // There is a color
                 if size(Data.color,'*') > 10 then
                     dcolor="matrix "+strcat(string(size(Data.color)),'x')
@@ -602,11 +603,11 @@ function %h_p(h)
                     dcolor=sci2exp(Data.color,0)
                     if length(dcolor)>70 then dcolor="matrix "+strcat(string(size(Data.color)),'x'),end
                 end
-                
+
                 t=[t;
                     "parent: "+h.parent.type
                     "children: "+fmtchildren(h.children)
-                    "visible = "+sci2exp(h.visible) 
+                    "visible = "+sci2exp(h.visible)
                     "surface_mode = "+sci2exp(h.surface_mode)
                     "foreground = "+string(h.foreground)
                     "thickness = "+string(h.thickness)
@@ -618,7 +619,7 @@ function %h_p(h)
                     "mark_background = "+string(h.mark_background)
                     "data.x = "+dx
                     "data.y = "+dy
-                    "data.z "+dz  
+                    "data.z "+dz
                     "data.color (not used) = "+dcolor
                     "color_mode = "+string(h.color_mode)
                     "color_flag = "+sci2exp(h.color_flag,0)
@@ -631,7 +632,7 @@ function %h_p(h)
                 t=[t;
                     "parent: "+h.parent.type
                     "children: "+fmtchildren(h.children)
-                    "visible = "+sci2exp(h.visible) 
+                    "visible = "+sci2exp(h.visible)
                     "surface_mode = "+sci2exp(h.surface_mode)
                     "foreground = "+string(h.foreground)
                     "thickness = "+string(h.thickness)
@@ -652,35 +653,35 @@ function %h_p(h)
                     "user_data = "+fmtuser_data(u)
                 ]
             end
-        
+
         // Fac3d
         // =====================================================================
-        
+
         case "Fac3d"
             Data = h.data
-            if size(Data.x,'*') > 10 then 
+            if size(Data.x,'*') > 10 then
                 dx="matrix "+strcat(string(size(Data.x)),'x')
             else
                 dx=sci2exp(Data.x,0)
                 if length(dx)>70 then d="matrix "+strcat(string(size(Data.x)),'x'),end
             end
-            
-            if size(Data.y,'*') > 10 then 
+
+            if size(Data.y,'*') > 10 then
                 dy="matrix "+strcat(string(size(Data.y)),'x')
             else
                 dy=sci2exp(Data.y,0)
                 if length(dy)>70 then d="matrix "+strcat(string(size(Data.y)),'x'),end
             end
-        
-            if size(Data.z,'*') > 10 then 
+
+            if size(Data.z,'*') > 10 then
                 dz="matrix "+strcat(string(size(Data.z)),'x')
             else
                 dz=sci2exp(Data.z,0)
                 if length(dz)>70 then d="matrix "+strcat(string(size(Data.z)),'x'),end
             end
-        
+
             u=h.user_data;
-        
+
             if size(Data) == 5 then // There is a color
                 if size(Data.color,'*') > 10 then
                     dcolor="matrix "+strcat(string(size(Data.color)),'x')
@@ -688,11 +689,11 @@ function %h_p(h)
                     dcolor=sci2exp(Data.color,0)
                     if length(dcolor)>70 then dcolor="matrix "+strcat(string(size(Data.color)),'x'),end
                 end
-                
+
                 t=[t;
                     "parent: "+h.parent.type
                     "children: "+fmtchildren(h.children)
-                    "visible = "+sci2exp(h.visible) 
+                    "visible = "+sci2exp(h.visible)
                     "surface_mode = "+sci2exp(h.surface_mode)
                     "foreground = "+string(h.foreground)
                     "thickness = "+string(h.thickness)
@@ -704,7 +705,7 @@ function %h_p(h)
                     "mark_background = "+string(h.mark_background)
                     "data.x = "+dx
                     "data.y = "+dy
-                    "data.z = "+dz  
+                    "data.z = "+dz
                     "data.color = "+dcolor
                     "color_mode = "+string(h.color_mode)
                     "color_flag = "+sci2exp(h.color_flag,0)
@@ -718,7 +719,7 @@ function %h_p(h)
                 t=[t;
                     "parent: "+h.parent.type
                     "children: "+fmtchildren(h.children)
-                    "visible = "+sci2exp(h.visible) 
+                    "visible = "+sci2exp(h.visible)
                     "surface_mode = "+sci2exp(h.surface_mode)
                     "foreground = "+string(h.foreground)
                     "thickness = "+string(h.thickness)
@@ -739,30 +740,30 @@ function %h_p(h)
                     "user_data = "+fmtuser_data(u)
                 ]
             end
-        
+
         // Param3d
         // =====================================================================
-        
+
         case "Param3d"
             u=h.user_data;
-            if size(h.data,'*') > 10 then 
+            if size(h.data,'*') > 10 then
                 d="matrix "+strcat(string(size(h.data)),'x')
             else
                 d=sci2exp(h.data,0)
                 if length(d)>70 then d="matrix "+strcat(string(size(h.data)),'x'),end
             end
-            
-            if size(h.surface_color,'*') > 10 then 
+
+            if size(h.surface_color,'*') > 10 then
                 c="matrix "+strcat(string(size(h.surface_color)),'x')
             else
                 c=sci2exp(h.surface_color,0)
                 if length(c)>70 then c="matrix "+strcat(string(size(h.surface_color)),'x'),end
             end
-            
+
             t=[t;
                 "parent: "+h.parent.type
                 "children: "+fmtchildren(h.children)
-                "visible = "+sci2exp(h.visible) 
+                "visible = "+sci2exp(h.visible)
                 "line_mode = "+sci2exp(h.line_mode)
                 "foreground = "+string(h.foreground)
                 "thickness = "+string(h.thickness)
@@ -779,10 +780,10 @@ function %h_p(h)
                 "surface_color = "+c
                 "user_data = "+fmtuser_data(u)
             ]
-        
+
         // Axis
         // =====================================================================
-    
+
         case "Axis"
             u=h.user_data;
             T=sci2exp(h.tics_labels,0)
@@ -806,17 +807,17 @@ function %h_p(h)
                 "clip_box = "+sci2exp(h.clip_box,0)
                 "user_data = "+fmtuser_data(u)
             ]
-        
+
         // uimenu
         // =====================================================================
-        
+
         case "uimenu"
             t=[t;
                 "Parent: "+h.parent.type
                 "Children: "+fmtchildren(h.children)
                "Enable = "+sci2exp(h.enable)
                 "Foregroundcolor = "+sci2exp(h.foregroundcolor,0)
-                "Label = "+h.label 
+                "Label = "+h.label
                 //"Handle_visible = "+sci2exp(h.handle_visible)
                 //"Position = "+sci2exp(h.position,0)
                 "Visible = "+sci2exp(h.visible)
@@ -825,10 +826,10 @@ function %h_p(h)
                "Checked: "+sci2exp(h.checked)
                "Tag = "+h.tag
             ]
-        
+
         // uicontextmenu
         // =====================================================================
-        
+
         case "uicontextmenu"
             t=[t;
                 "Parent: "+h.parent.type
@@ -837,7 +838,7 @@ function %h_p(h)
 
        // uicontrol
         // =====================================================================
-        
+
         case "uicontrol"
             u=h.user_data;
             t=[t;
@@ -870,7 +871,7 @@ function %h_p(h)
             "Userdata = "+fmtuser_data(u)
             "Tag = "+h.tag
             ]
-            
+
         end
     end
     write(%io(2),t)
@@ -880,14 +881,14 @@ endfunction
 
 
 function t=fmtchildren(c)
-    if c==[] then 
+    if c==[] then
         t='[]'
     else
         if size(c,'*')<10 then
             t=sci2exp(c.type,0)
-            if length(t)>70 then t="matrix "+strcat(string(size(c)),'x'),end 
+            if length(t)>70 then t="matrix "+strcat(string(size(c)),'x'),end
         else
-            t="matrix "+strcat(string(size(c)),'x')   
+            t="matrix "+strcat(string(size(c)),'x')
         end
     end
 endfunction
@@ -897,7 +898,7 @@ function t=fmtuser_data(d)
     td= type(d)
     if or(td==[1 2 3 4 8 10 15]) then
         t=sci2exp(d,0)
-        if length(t)>70 then t=typeof(d)+" "+strcat(string(size(d)),'x'),end 
+        if length(t)>70 then t=typeof(d)+" "+strcat(string(size(d)),'x'),end
     elseif or(td==16) then
         t=typeof(d)+" "+strcat(string(size(d)),'x'),
     elseif or(td==17) then
index 76e9d0f..89aef86 100644 (file)
@@ -5,6 +5,7 @@
  * Copyright (C) 2004-2006 - INRIA - Fabrice Leray
  * Copyright (C) 2005 - INRIA - Jean-Baptiste Silvy
  * Copyright (C) 2007 - INRIA - Vincent Couvert
+ * Copyright (C) 2010 - DIGITEO - Bruno JOFRET
  *
  * This file must be used under the terms of the CeCILL.
  * This source file is licensed as described in the file COPYING, which
 #include "MALLOC.h" /* MALLOC */
 #include "Scierror.h"
 
+#include "createGraphicObject.h"
+#include "returnType.h"
+#include "setGraphicObjectProperty.h"
+
 /*-----------------------------------------------------------------------------*/
 
 /**ConstructFigure
@@ -196,6 +201,9 @@ sciPointObj * ConstructFigure(sciPointObj * pparent, int * figureIndex)
   addNewFigureToList(pobj);
   endGraphicDataWriting();
 
+  // At least, should be only this call.
+  pobj->UID = createGraphicObject("figure");
+  setGraphicObjectProperty(pobj->UID, "Name", "MVC Name !!!", jni_string);
   return pobj;
 }
 
@@ -1080,7 +1088,7 @@ ConstructPolyline (sciPointObj * pparentsubwin, double *pvecx, double *pvecy, do
 
   /* allocatePolyline created a "fake" relationship, destroy it */
   FREE(pobj->relationShip);
-  
+
   if (sciStandardBuildOperations(pobj, pparentsubwin) == NULL)
   {
     FREE(pobj->pfeatures);
@@ -2509,7 +2517,7 @@ void createDefaultRelationShip(sciPointObj * pObj)
                /* labels have their relationShip stored in their text objects */
                return;
        }
-       
+
        relationShip = MALLOC(sizeof(sciRelationShip));
        if (relationShip == NULL)
        {
index 131eb13..01d4f75 100644 (file)
@@ -1,11 +1,11 @@
 /*
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) 2006 - INRIA - Jean-Baptiste Silvy
- * 
+ *
  * This file must be used under the terms of the CeCILL.
  * This source file is licensed as described in the file COPYING, which
  * you should have received as part of this distribution.  The terms
- * are also available at    
+ * are also available at
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  */
@@ -35,7 +35,7 @@ static GetPropertyHashTable * getHashTable = NULL ;
  * a couple of key (property name) and associated value
  * (accessor name)
  */
-typedef struct  
+typedef struct
 {
   char            * key ;
   getPropertyFunc   accessor ;
@@ -46,14 +46,14 @@ typedef struct
  * don't forget to modify it each time the propertyTable
  * is modified.
  */
-#define NB_PROPERTIES 159
+#define NB_PROPERTIES 160
 
 /**
  * list of all property names and associated functions in scilab
  * This is inserted in the hashTable
  */
 static getHashTableCouple propertyTable[NB_PROPERTIES] =
-{ 
+{
 { "figures_id"          , get_figures_id_property           },
 { "visible"             , get_visible_property              },
 { "pixel_drawing_mode"  , get_pixel_drawing_mode_property   },
@@ -183,8 +183,8 @@ static getHashTableCouple propertyTable[NB_PROPERTIES] =
 { "dimension"           , get_dimension_property            },
 { "event_handler_enable", get_event_handler_enable_property },
 { "event_handler"       , get_event_handler_property        },
-{ "label"               , GetUimenuLabel                    },  
-{ "string"              , GetUicontrolString                },  
+{ "label"               , GetUimenuLabel                    },
+{ "string"              , GetUicontrolString                },
 { "style"               , GetUicontrolStyle                 },
 { "backgroundcolor"     , GetUicontrolBackgroundColor       },
 { "foregroundcolor"     , GetUiobjectForegroundColor        },
@@ -212,7 +212,8 @@ static getHashTableCouple propertyTable[NB_PROPERTIES] =
 { "outside_colors"      , get_outside_colors_property       },
 { "color_range"         , get_color_range_property          },
 { "grid_position"       , get_grid_position_property        },
-{ "anti_aliasing"       , get_anti_aliasing_property        }
+{ "anti_aliasing"       , get_anti_aliasing_property        },
+{ "UID"                 , get_UID                           }
 } ;
 
 /*--------------------------------------------------------------------------*/
@@ -261,7 +262,7 @@ void destroyScilabGetHashTable( void )
   {
     return ;
   }
-  
+
   destroyGetHashTable( getHashTable ) ;
   getHashTableCreated = FALSE ;
 }
index 7040dd3..270a19f 100644 (file)
@@ -1,11 +1,11 @@
 /*
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) 2006 - INRIA - Jean-Baptiste Silvy
- * 
+ *
  * This file must be used under the terms of the CeCILL.
  * This source file is licensed as described in the file COPYING, which
  * you should have received as part of this distribution.  The terms
- * are also available at    
+ * are also available at
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  */
@@ -180,5 +180,6 @@ int get_color_range_property(          sciPointObj * pobj ) ;
 int get_outside_colors_property(       sciPointObj * pobj ) ;
 int get_grid_position_property(        sciPointObj * pobj ) ;
 int get_anti_aliasing_property(        sciPointObj * pobj ) ;
+int get_UID(                           sciPointObj * pobj ) ;
 
 #endif /* _GET_HANDLE_PROPERTY_H_ */
index 55a30b0..f81e91a 100644 (file)
@@ -3,11 +3,11 @@
  * Copyright (C) 2004-2006 - INRIA - Fabrice Leray
  * Copyright (C) 2006 - INRIA - Allan Cornet
  * Copyright (C) 2006 - INRIA - Jean-Baptiste Silvy
- * 
+ *
  * This file must be used under the terms of the CeCILL.
  * This source file is licensed as described in the file COPYING, which
  * you should have received as part of this distribution.  The terms
- * are also available at    
+ * are also available at
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  */
 /*        handle                                                          */
 /*------------------------------------------------------------------------*/
 
+#include <string.h>
+
 #include "getHandleProperty.h"
 #include "GetProperty.h"
 #include "returnProperty.h"
 #include "Scierror.h"
 #include "localization.h"
 
+#include "getGraphicObjectProperty.h"
+
 /*------------------------------------------------------------------------*/
 int get_figure_name_property( sciPointObj * pobj )
 {
@@ -32,7 +36,8 @@ int get_figure_name_property( sciPointObj * pobj )
     Scierror(999, _("'%s' property does not exist for this handle.\n"),"figure_name");
     return -1;
   }
-  return sciReturnString( sciGetName( pobj ) ) ;
+  //return sciReturnString( sciGetName( pobj ) ) ;
 
+  return sciReturnString( (char *) getGraphicObjectProperty(pobj->UID, "Name", jni_string));
 }
 /*------------------------------------------------------------------------*/
index e21bb16..aa48f08 100644 (file)
@@ -3,11 +3,11 @@
  * Copyright (C) 2004-2006 - INRIA - Fabrice Leray
  * Copyright (C) 2006 - INRIA - Allan Cornet
  * Copyright (C) 2006 - INRIA - Jean-Baptiste Silvy
- * 
+ *
  * This file must be used under the terms of the CeCILL.
  * This source file is licensed as described in the file COPYING, which
  * you should have received as part of this distribution.  The terms
- * are also available at    
+ * are also available at
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  */
@@ -43,4 +43,8 @@ int get_visible_property( sciPointObj * pobj )
   }
 }
 
+int get_UID(sciPointObj * pobj)
+{
+    return sciReturnString(pobj->UID);
+}
 /*------------------------------------------------------------------------*/