xget and xset rewrote to c++ 85/12585/3
Cedric Delamarre [Wed, 18 Sep 2013 12:44:49 +0000 (14:44 +0200)]
test_run("graphics",["xset_xget"],["no_check_error_output"]);

Change-Id: I130da334c059d355be61565d2e15c8e06a747024

15 files changed:
scilab/modules/graphics/Makefile.am
scilab/modules/graphics/Makefile.in
scilab/modules/graphics/graphics.vcxproj
scilab/modules/graphics/graphics.vcxproj.filters
scilab/modules/graphics/includes/graphics_gw.hxx
scilab/modules/graphics/includes/gw_graphics.h
scilab/modules/graphics/sci_gateway/c/sci_xget.c [deleted file]
scilab/modules/graphics/sci_gateway/c/sci_xset.c [deleted file]
scilab/modules/graphics/sci_gateway/cpp/graphics_gw.vcxproj
scilab/modules/graphics/sci_gateway/cpp/graphics_gw.vcxproj.filters
scilab/modules/graphics/sci_gateway/cpp/sci_xget.cpp [new file with mode: 0644]
scilab/modules/graphics/sci_gateway/cpp/sci_xset.cpp [new file with mode: 0644]
scilab/modules/graphics/src/c/getHandleProperty/getHandleProperty.h
scilab/modules/graphics/src/cpp/configgraphicvariable.cpp [new file with mode: 0644]
scilab/modules/graphics/src/cpp/configgraphicvariable.hxx [new file with mode: 0644]

index 21a30a6..8a120e5 100644 (file)
@@ -332,19 +332,20 @@ src/c/periEmpty.c \
 src/c/scitokenize.c \
 src/c/get_ticks_utils.c
 
+GRAPHICS_CXX_SOURCES = \
+src/cpp/configgraphicvariable.cpp
+
 GATEWAY_C_SOURCES = \
 sci_gateway/c/sci_swap_handles.c \
 sci_gateway/c/sci_grayplot.c \
 sci_gateway/c/sci_matplot1.c \
 sci_gateway/c/sci_xfpolys.c \
-sci_gateway/c/sci_xget.c \
 sci_gateway/c/sci_newaxes.c \
 sci_gateway/c/sci_xlfont.c \
 sci_gateway/c/sci_xgraduate.c \
 sci_gateway/c/sci_xgrid.c \
 sci_gateway/c/sci_xclick.c \
 sci_gateway/c/sci_geom3d.c \
-sci_gateway/c/sci_xset.c \
 sci_gateway/c/sci_unzoom.c \
 sci_gateway/c/sci_xsegs.c \
 sci_gateway/c/sci_glue.c \
@@ -396,6 +397,8 @@ sci_gateway/c/sci_Legend.c
 GATEWAY_CXX_SOURCES = \
 sci_gateway/cpp/graphics_gw.cpp \
 sci_gateway/cpp/sci_get.cpp \
+sci_gateway/cpp/sci_xget.cpp \
+sci_gateway/cpp/sci_xset.cpp \
 sci_gateway/cpp/sci_winsid.cpp
 
 
index 130bce8..8d1dfdf 100644 (file)
@@ -476,7 +476,8 @@ am__objects_1 = libscigraphics_algo_la-GetCommandArg.lo \
        libscigraphics_algo_la-periEmpty.lo \
        libscigraphics_algo_la-scitokenize.lo \
        libscigraphics_algo_la-get_ticks_utils.lo
-am_libscigraphics_algo_la_OBJECTS = $(am__objects_1)
+am__objects_2 = libscigraphics_algo_la-configgraphicvariable.lo
+am_libscigraphics_algo_la_OBJECTS = $(am__objects_1) $(am__objects_2)
 libscigraphics_algo_la_OBJECTS = $(am_libscigraphics_algo_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -490,15 +491,15 @@ am_libscigraphics_disable_la_OBJECTS =  \
 libscigraphics_disable_la_OBJECTS =  \
        $(am_libscigraphics_disable_la_OBJECTS)
 libscigraphics_la_DEPENDENCIES = libscigraphics-algo.la
-am__objects_2 = libscigraphics_la-sci_swap_handles.lo \
+am__objects_3 = libscigraphics_la-sci_swap_handles.lo \
        libscigraphics_la-sci_grayplot.lo \
        libscigraphics_la-sci_matplot1.lo \
-       libscigraphics_la-sci_xfpolys.lo libscigraphics_la-sci_xget.lo \
+       libscigraphics_la-sci_xfpolys.lo \
        libscigraphics_la-sci_newaxes.lo \
        libscigraphics_la-sci_xlfont.lo \
        libscigraphics_la-sci_xgraduate.lo \
        libscigraphics_la-sci_xgrid.lo libscigraphics_la-sci_xclick.lo \
-       libscigraphics_la-sci_geom3d.lo libscigraphics_la-sci_xset.lo \
+       libscigraphics_la-sci_geom3d.lo \
        libscigraphics_la-sci_unzoom.lo libscigraphics_la-sci_xsegs.lo \
        libscigraphics_la-sci_glue.lo libscigraphics_la-sci_xarc.lo \
        libscigraphics_la-sci_xpolys.lo \
@@ -537,9 +538,10 @@ am__objects_2 = libscigraphics_la-sci_swap_handles.lo \
        libscigraphics_la-sci_rotate_axes.lo \
        libscigraphics_la-sci_is_handle_valid.lo \
        libscigraphics_la-sci_Legend.lo
-am__objects_3 = libscigraphics_la-graphics_gw.lo \
-       libscigraphics_la-sci_get.lo libscigraphics_la-sci_winsid.lo
-am_libscigraphics_la_OBJECTS = $(am__objects_2) $(am__objects_3)
+am__objects_4 = libscigraphics_la-graphics_gw.lo \
+       libscigraphics_la-sci_get.lo libscigraphics_la-sci_xget.lo \
+       libscigraphics_la-sci_xset.lo libscigraphics_la-sci_winsid.lo
+am_libscigraphics_la_OBJECTS = $(am__objects_3) $(am__objects_4)
 libscigraphics_la_OBJECTS = $(am_libscigraphics_la_OBJECTS)
 @GUI_TRUE@am_libscigraphics_la_rpath = -rpath $(pkglibdir)
 AM_V_P = $(am__v_P_@AM_V@)
@@ -1216,19 +1218,20 @@ src/c/periEmpty.c \
 src/c/scitokenize.c \
 src/c/get_ticks_utils.c
 
+GRAPHICS_CXX_SOURCES = \
+src/cpp/configgraphicvariable.cpp
+
 GATEWAY_C_SOURCES = \
 sci_gateway/c/sci_swap_handles.c \
 sci_gateway/c/sci_grayplot.c \
 sci_gateway/c/sci_matplot1.c \
 sci_gateway/c/sci_xfpolys.c \
-sci_gateway/c/sci_xget.c \
 sci_gateway/c/sci_newaxes.c \
 sci_gateway/c/sci_xlfont.c \
 sci_gateway/c/sci_xgraduate.c \
 sci_gateway/c/sci_xgrid.c \
 sci_gateway/c/sci_xclick.c \
 sci_gateway/c/sci_geom3d.c \
-sci_gateway/c/sci_xset.c \
 sci_gateway/c/sci_unzoom.c \
 sci_gateway/c/sci_xsegs.c \
 sci_gateway/c/sci_glue.c \
@@ -1280,6 +1283,8 @@ sci_gateway/c/sci_Legend.c
 GATEWAY_CXX_SOURCES = \
 sci_gateway/cpp/graphics_gw.cpp \
 sci_gateway/cpp/sci_get.cpp \
+sci_gateway/cpp/sci_xget.cpp \
+sci_gateway/cpp/sci_xset.cpp \
 sci_gateway/cpp/sci_winsid.cpp
 
 libscigraphics_la_CPPFLAGS = \
@@ -1551,7 +1556,7 @@ clean-pkglibLTLIBRARIES:
        }
 
 libscigraphics-algo.la: $(libscigraphics_algo_la_OBJECTS) $(libscigraphics_algo_la_DEPENDENCIES) $(EXTRA_libscigraphics_algo_la_DEPENDENCIES) 
-       $(AM_V_CCLD)$(LINK) $(am_libscigraphics_algo_la_rpath) $(libscigraphics_algo_la_OBJECTS) $(libscigraphics_algo_la_LIBADD) $(LIBS)
+       $(AM_V_CXXLD)$(CXXLINK) $(am_libscigraphics_algo_la_rpath) $(libscigraphics_algo_la_OBJECTS) $(libscigraphics_algo_la_LIBADD) $(LIBS)
 
 libscigraphics-disable.la: $(libscigraphics_disable_la_OBJECTS) $(libscigraphics_disable_la_DEPENDENCIES) $(EXTRA_libscigraphics_disable_la_DEPENDENCIES) 
        $(AM_V_CXXLD)$(CXXLINK) -rpath $(pkglibdir) $(libscigraphics_disable_la_OBJECTS) $(libscigraphics_disable_la_LIBADD) $(LIBS)
@@ -1592,6 +1597,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscigraphics_algo_la-StringMatrix.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscigraphics_algo_la-TerminateGraphics.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscigraphics_algo_la-axesScale.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscigraphics_algo_la-configgraphicvariable.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscigraphics_algo_la-getPropertyAssignedValue.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscigraphics_algo_la-get_alignment_property.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscigraphics_algo_la-get_anti_aliasing_property.Plo@am__quote@
@@ -4126,13 +4132,6 @@ libscigraphics_la-sci_xfpolys.lo: sci_gateway/c/sci_xfpolys.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphics_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libscigraphics_la-sci_xfpolys.lo `test -f 'sci_gateway/c/sci_xfpolys.c' || echo '$(srcdir)/'`sci_gateway/c/sci_xfpolys.c
 
-libscigraphics_la-sci_xget.lo: sci_gateway/c/sci_xget.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphics_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libscigraphics_la-sci_xget.lo -MD -MP -MF $(DEPDIR)/libscigraphics_la-sci_xget.Tpo -c -o libscigraphics_la-sci_xget.lo `test -f 'sci_gateway/c/sci_xget.c' || echo '$(srcdir)/'`sci_gateway/c/sci_xget.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libscigraphics_la-sci_xget.Tpo $(DEPDIR)/libscigraphics_la-sci_xget.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='sci_gateway/c/sci_xget.c' object='libscigraphics_la-sci_xget.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphics_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libscigraphics_la-sci_xget.lo `test -f 'sci_gateway/c/sci_xget.c' || echo '$(srcdir)/'`sci_gateway/c/sci_xget.c
-
 libscigraphics_la-sci_newaxes.lo: sci_gateway/c/sci_newaxes.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphics_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libscigraphics_la-sci_newaxes.lo -MD -MP -MF $(DEPDIR)/libscigraphics_la-sci_newaxes.Tpo -c -o libscigraphics_la-sci_newaxes.lo `test -f 'sci_gateway/c/sci_newaxes.c' || echo '$(srcdir)/'`sci_gateway/c/sci_newaxes.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libscigraphics_la-sci_newaxes.Tpo $(DEPDIR)/libscigraphics_la-sci_newaxes.Plo
@@ -4175,13 +4174,6 @@ libscigraphics_la-sci_geom3d.lo: sci_gateway/c/sci_geom3d.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphics_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libscigraphics_la-sci_geom3d.lo `test -f 'sci_gateway/c/sci_geom3d.c' || echo '$(srcdir)/'`sci_gateway/c/sci_geom3d.c
 
-libscigraphics_la-sci_xset.lo: sci_gateway/c/sci_xset.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphics_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libscigraphics_la-sci_xset.lo -MD -MP -MF $(DEPDIR)/libscigraphics_la-sci_xset.Tpo -c -o libscigraphics_la-sci_xset.lo `test -f 'sci_gateway/c/sci_xset.c' || echo '$(srcdir)/'`sci_gateway/c/sci_xset.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libscigraphics_la-sci_xset.Tpo $(DEPDIR)/libscigraphics_la-sci_xset.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='sci_gateway/c/sci_xset.c' object='libscigraphics_la-sci_xset.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphics_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libscigraphics_la-sci_xset.lo `test -f 'sci_gateway/c/sci_xset.c' || echo '$(srcdir)/'`sci_gateway/c/sci_xset.c
-
 libscigraphics_la-sci_unzoom.lo: sci_gateway/c/sci_unzoom.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphics_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libscigraphics_la-sci_unzoom.lo -MD -MP -MF $(DEPDIR)/libscigraphics_la-sci_unzoom.Tpo -c -o libscigraphics_la-sci_unzoom.lo `test -f 'sci_gateway/c/sci_unzoom.c' || echo '$(srcdir)/'`sci_gateway/c/sci_unzoom.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libscigraphics_la-sci_unzoom.Tpo $(DEPDIR)/libscigraphics_la-sci_unzoom.Plo
@@ -4532,6 +4524,13 @@ libscigraphics_la-sci_Legend.lo: sci_gateway/c/sci_Legend.c
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
 
+libscigraphics_algo_la-configgraphicvariable.lo: src/cpp/configgraphicvariable.cpp
+@am__fastdepCXX_TRUE@  $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphics_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libscigraphics_algo_la-configgraphicvariable.lo -MD -MP -MF $(DEPDIR)/libscigraphics_algo_la-configgraphicvariable.Tpo -c -o libscigraphics_algo_la-configgraphicvariable.lo `test -f 'src/cpp/configgraphicvariable.cpp' || echo '$(srcdir)/'`src/cpp/configgraphicvariable.cpp
+@am__fastdepCXX_TRUE@  $(AM_V_at)$(am__mv) $(DEPDIR)/libscigraphics_algo_la-configgraphicvariable.Tpo $(DEPDIR)/libscigraphics_algo_la-configgraphicvariable.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     $(AM_V_CXX)source='src/cpp/configgraphicvariable.cpp' object='libscigraphics_algo_la-configgraphicvariable.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphics_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libscigraphics_algo_la-configgraphicvariable.lo `test -f 'src/cpp/configgraphicvariable.cpp' || echo '$(srcdir)/'`src/cpp/configgraphicvariable.cpp
+
 libscigraphics_disable_la-nographics_gw.lo: src/nographics/nographics_gw.cpp
 @am__fastdepCXX_TRUE@  $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphics_disable_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libscigraphics_disable_la-nographics_gw.lo -MD -MP -MF $(DEPDIR)/libscigraphics_disable_la-nographics_gw.Tpo -c -o libscigraphics_disable_la-nographics_gw.lo `test -f 'src/nographics/nographics_gw.cpp' || echo '$(srcdir)/'`src/nographics/nographics_gw.cpp
 @am__fastdepCXX_TRUE@  $(AM_V_at)$(am__mv) $(DEPDIR)/libscigraphics_disable_la-nographics_gw.Tpo $(DEPDIR)/libscigraphics_disable_la-nographics_gw.Plo
@@ -4553,6 +4552,20 @@ libscigraphics_la-sci_get.lo: sci_gateway/cpp/sci_get.cpp
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphics_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libscigraphics_la-sci_get.lo `test -f 'sci_gateway/cpp/sci_get.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_get.cpp
 
+libscigraphics_la-sci_xget.lo: sci_gateway/cpp/sci_xget.cpp
+@am__fastdepCXX_TRUE@  $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphics_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libscigraphics_la-sci_xget.lo -MD -MP -MF $(DEPDIR)/libscigraphics_la-sci_xget.Tpo -c -o libscigraphics_la-sci_xget.lo `test -f 'sci_gateway/cpp/sci_xget.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_xget.cpp
+@am__fastdepCXX_TRUE@  $(AM_V_at)$(am__mv) $(DEPDIR)/libscigraphics_la-sci_xget.Tpo $(DEPDIR)/libscigraphics_la-sci_xget.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     $(AM_V_CXX)source='sci_gateway/cpp/sci_xget.cpp' object='libscigraphics_la-sci_xget.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphics_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libscigraphics_la-sci_xget.lo `test -f 'sci_gateway/cpp/sci_xget.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_xget.cpp
+
+libscigraphics_la-sci_xset.lo: sci_gateway/cpp/sci_xset.cpp
+@am__fastdepCXX_TRUE@  $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphics_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libscigraphics_la-sci_xset.lo -MD -MP -MF $(DEPDIR)/libscigraphics_la-sci_xset.Tpo -c -o libscigraphics_la-sci_xset.lo `test -f 'sci_gateway/cpp/sci_xset.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_xset.cpp
+@am__fastdepCXX_TRUE@  $(AM_V_at)$(am__mv) $(DEPDIR)/libscigraphics_la-sci_xset.Tpo $(DEPDIR)/libscigraphics_la-sci_xset.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     $(AM_V_CXX)source='sci_gateway/cpp/sci_xset.cpp' object='libscigraphics_la-sci_xset.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphics_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libscigraphics_la-sci_xset.lo `test -f 'sci_gateway/cpp/sci_xset.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_xset.cpp
+
 libscigraphics_la-sci_winsid.lo: sci_gateway/cpp/sci_winsid.cpp
 @am__fastdepCXX_TRUE@  $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphics_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libscigraphics_la-sci_winsid.lo -MD -MP -MF $(DEPDIR)/libscigraphics_la-sci_winsid.Tpo -c -o libscigraphics_la-sci_winsid.lo `test -f 'sci_gateway/cpp/sci_winsid.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_winsid.cpp
 @am__fastdepCXX_TRUE@  $(AM_V_at)$(am__mv) $(DEPDIR)/libscigraphics_la-sci_winsid.Tpo $(DEPDIR)/libscigraphics_la-sci_winsid.Plo
index 5400594..401581d 100644 (file)
@@ -238,6 +238,7 @@ lib /DEF:"$(ProjectDir)elementary_functions_f_Import.def" /SUBSYSTEM:WINDOWS /MA
     </Link>
   </ItemDefinitionGroup>
   <ItemGroup>
+    <ClCompile Include="src\cpp\configgraphicvariable.cpp" />
     <ClCompile Include="src\c\Axes.c" />
     <ClCompile Include="src\c\axesScale.c" />
     <ClCompile Include="src\c\BasicAlgos.c" />
@@ -450,7 +451,6 @@ lib /DEF:"$(ProjectDir)elementary_functions_f_Import.def" /SUBSYSTEM:WINDOWS /MA
     <ClCompile Include="sci_gateway\c\sci_xfarcs.c" />
     <ClCompile Include="sci_gateway\c\sci_xfpoly.c" />
     <ClCompile Include="sci_gateway\c\sci_xfpolys.c" />
-    <ClCompile Include="sci_gateway\c\sci_xget.c" />
     <ClCompile Include="sci_gateway\c\sci_xgetmouse.c" />
     <ClCompile Include="sci_gateway\c\sci_xgraduate.c" />
     <ClCompile Include="sci_gateway\c\sci_xgrid.c" />
@@ -461,7 +461,6 @@ lib /DEF:"$(ProjectDir)elementary_functions_f_Import.def" /SUBSYSTEM:WINDOWS /MA
     <ClCompile Include="sci_gateway\c\sci_xrect.c" />
     <ClCompile Include="sci_gateway\c\sci_xrects.c" />
     <ClCompile Include="sci_gateway\c\sci_xsegs.c" />
-    <ClCompile Include="sci_gateway\c\sci_xset.c" />
     <ClCompile Include="sci_gateway\c\sci_xstring.c" />
     <ClCompile Include="sci_gateway\c\sci_xstringb.c" />
     <ClCompile Include="sci_gateway\c\sci_xtitle.c" />
@@ -611,6 +610,7 @@ lib /DEF:"$(ProjectDir)elementary_functions_f_Import.def" /SUBSYSTEM:WINDOWS /MA
     <ClInclude Include="includes\BasicAlgos.h" />
     <ClInclude Include="includes\BuildObjects.h" />
     <ClInclude Include="includes\Champ.h" />
+    <ClInclude Include="src\cpp\configgraphicvariable.hxx" />
     <ClInclude Include="src\c\CheckScilabXgc.h" />
     <ClInclude Include="src\c\getHandleProperty\CheckTicksProperty.h" />
     <ClInclude Include="includes\CloneObjects.h" />
index ad73f8b..07a6147 100644 (file)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup>
     <Filter Include="Source Files">
     <ClCompile Include="sci_gateway\c\sci_xfpolys.c">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="sci_gateway\c\sci_xget.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="sci_gateway\c\sci_xgetmouse.c">
       <Filter>Source Files</Filter>
     </ClCompile>
     <ClCompile Include="sci_gateway\c\sci_xsegs.c">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="sci_gateway\c\sci_xset.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="sci_gateway\c\sci_xstring.c">
       <Filter>Source Files</Filter>
     </ClCompile>
     <ClCompile Include="src\c\getHandleProperty\get_image_type_property.c">
       <Filter>Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="src\cpp\configgraphicvariable.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="includes\Axes.h">
     <ClInclude Include="src\c\loadTextRenderingAPI.h">
       <Filter>Header Files</Filter>
     </ClInclude>
+    <ClInclude Include="src\cpp\configgraphicvariable.hxx">
+      <Filter>Header Files</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <None Include="Gui_Import.def">
       <Filter>Libraries Dependencies\Imports</Filter>
     </None>
     <None Include="locales\graphics.pot" />
+    <None Include="locales\graphics.pot" />
   </ItemGroup>
   <ItemGroup>
     <ResourceCompile Include="graphic.rc">
index 28d4fc8..f0ee50e 100644 (file)
@@ -32,5 +32,7 @@ public :
 
 
 CPP_GATEWAY_PROTOTYPE_EXPORT(sci_get, GRAPHICS_GW_IMPEXP);
+CPP_GATEWAY_PROTOTYPE_EXPORT(sci_xget, GRAPHICS_GW_IMPEXP);
+CPP_GATEWAY_PROTOTYPE_EXPORT(sci_xset, GRAPHICS_GW_IMPEXP);
 CPP_GATEWAY_PROTOTYPE_EXPORT(sci_winsid, GRAPHICS_GW_IMPEXP);
 #endif /* !__GUI_GW_HXX__ */
index a89e85b..1cf22a1 100644 (file)
@@ -32,7 +32,7 @@ GRAPHICS_IMPEXP int sci_xtitle(char *fname, void *pvApiCtx);
 GRAPHICS_IMPEXP int sci_xstringb(char *fname, void *pvApiCtx);
 GRAPHICS_IMPEXP int sci_xstring(char *fname, void *pvApiCtx);
 GRAPHICS_IMPEXP int sci_xsetech(char *fname, void *pvApiCtx);
-GRAPHICS_IMPEXP int sci_xset(char *fname, void *pvApiCtx);
+//GRAPHICS_IMPEXP int sci_xset(char *fname, void *pvApiCtx); => c++
 GRAPHICS_IMPEXP int sci_xsegs(char *fname, void *pvApiCtx);
 GRAPHICS_IMPEXP int sci_xrects(char *fname, void *pvApiCtx);
 GRAPHICS_IMPEXP int sci_xrect(char *fname, void *pvApiCtx);
@@ -44,7 +44,7 @@ GRAPHICS_IMPEXP int sci_xgrid(char *fname, void *pvApiCtx);
 GRAPHICS_IMPEXP int sci_xgraduate(char *fname, void *pvApiCtx);
 GRAPHICS_IMPEXP int sci_xgetmouse(char *fname, void *pvApiCtx);
 GRAPHICS_IMPEXP int sci_xgetech(char *fname, void *pvApiCtx);
-GRAPHICS_IMPEXP int sci_xget(char *fname, void *pvApiCtx);
+//GRAPHICS_IMPEXP int sci_xget(char *fname, void *pvApiCtx); => c++
 GRAPHICS_IMPEXP int sci_xfpolys(char *fname, void *pvApiCtx);
 GRAPHICS_IMPEXP int sci_xfpoly(char *fname, void *pvApiCtx);
 GRAPHICS_IMPEXP int sci_xfarcs(char *fname, void *pvApiCtx);
diff --git a/scilab/modules/graphics/sci_gateway/c/sci_xget.c b/scilab/modules/graphics/sci_gateway/c/sci_xget.c
deleted file mode 100644 (file)
index d077fef..0000000
+++ /dev/null
@@ -1,493 +0,0 @@
-/*
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2006 - INRIA - Fabrice Leray
- * Copyright (C) 2006 - INRIA - Jean-Baptiste Silvy
- * Copyright (C) 2011 - Scilab Enterprises - 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.1-en.txt
- *
- */
-
-/*------------------------------------------------------------------------*/
-/* file: sci_xset.c                                                       */
-/* desc : interface for xset routine                                      */
-/*------------------------------------------------------------------------*/
-
-#include <string.h>
-#include <stdio.h>
-#include "api_scilab.h"
-#include "gw_graphics.h"
-#include "XsetXgetParameters.h"
-#include "GetProperty.h"
-#include "Format.h"
-#include "Scierror.h"
-#include "localization.h"
-#include "returnProperty.h"
-#include "HandleManagement.h"
-#include "CurrentSubwin.h"
-#include "getGraphicObjectProperty.h"
-#include "graphicObjectProperties.h"
-#include "BuildObjects.h"
-
-#include "getHandleProperty.h"
-#include "CurrentFigure.h"
-/*--------------------------------------------------------------------------*/
-int xgetg(char * str, char * str1, int * len, int  lx0, int lx1);
-/*--------------------------------------------------------------------------*/
-int sci_xget(char *fname, void *pvApiCtx)
-{
-    SciErr sciErr;
-
-    int* piAddrl1 = NULL;
-    char* l1 = NULL;
-    int* piAddrl2 = NULL;
-    double* l2 = NULL;
-    char* l3 = NULL;
-
-    int m1 = 0, m2 = 0, n2 = 0, i = 0;
-    int one = 1;
-
-    BOOL keyFound = FALSE;
-
-    if (nbInputArgument(pvApiCtx) <= 0)
-    {
-        sci_demo(fname, pvApiCtx);
-        return 0;
-    }
-
-    CheckInputArgument(pvApiCtx, 1, 2);
-    CheckOutputArgument(pvApiCtx, 0, 1);
-
-    sciErr = getVarAddressFromPosition(pvApiCtx, 1, &piAddrl1);
-    if (sciErr.iErr)
-    {
-        printError(&sciErr, 0);
-        return 1;
-    }
-
-    // Retrieve a matrix of double at position 1.
-    if (getAllocatedSingleString(pvApiCtx, piAddrl1, &l1))
-    {
-        Scierror(202, _("%s: Wrong type for argument #%d: A string expected.\n"), fname, 1);
-        return 1;
-    }
-
-    /* check if key is valid */
-    for (i = 0; i < NUMSETFONC ; i++)
-    {
-        if (strcmp((l1), KeyTab_[i]) == 0)
-        {
-            keyFound = TRUE;
-            break;
-        }
-    }
-
-    if (!keyFound)
-    {
-        Scierror(999, _("%s: Unrecognized input argument: '%s'.\n"), fname, (l1));
-        return -1;
-    }
-
-    if (nbInputArgument(pvApiCtx) == 2)
-    {
-        sciErr = getVarAddressFromPosition(pvApiCtx, 2, &piAddrl2);
-        if (sciErr.iErr)
-        {
-            printError(&sciErr, 0);
-            return 1;
-        }
-
-        // Retrieve a matrix of double at position 2.
-        sciErr = getMatrixOfDouble(pvApiCtx, piAddrl2, &m2, &n2, &l2);
-        if (sciErr.iErr)
-        {
-            printError(&sciErr, 0);
-            Scierror(202, _("%s: Wrong type for argument %d: A real expected.\n"), fname, 2);
-            return 1;
-        }
-
-        //CheckScalar
-        if (m2 != 1 || n2 != 1)
-        {
-            Scierror(999, _("%s: Wrong size for input argument #%d: A real scalar expected.\n"), fname, 2);
-            return 1;
-        }
-
-    }
-
-    if (strcmp(l1, "fpf") == 0 || strcmp(l1, "auto clear") == 0)
-    {
-        int bufl;
-        char buf[4096];
-        /*     special case for global variables set */
-        xgetg((l1), buf, &bufl, m1, bsiz);
-        if (allocSingleString(pvApiCtx, nbInputArgument(pvApiCtx) + 1, bufl * one, (const char **)&l3))
-        {
-            Scierror(999, _("%s: Memory allocation error.\n"), fname);
-            return 1;
-        }
-
-        strncpy((l3), buf, bufl);
-        AssignOutputVariable(pvApiCtx, 1) = nbInputArgument(pvApiCtx) + 1;
-        ReturnArguments(pvApiCtx);
-        return 0;
-    }
-    else if (strcmp(l1, "colormap") == 0)
-    {
-        char *pobjUID = NULL;
-        // Force figure creation if none exists.
-        getOrCreateDefaultSubwin();
-        pobjUID = (char*)getCurrentFigure();
-
-        get_color_map_property(pvApiCtx, pobjUID);
-
-        AssignOutputVariable(pvApiCtx, 1) = nbInputArgument(pvApiCtx) + 1;
-        ReturnArguments(pvApiCtx);
-
-        return 0;
-    }
-    else if (strcmp(l1, "mark") == 0)
-    {
-        char *pobjUID = (char*)getOrCreateDefaultSubwin();
-        int iMarkStyle = 0;
-        int* piMarkStyle = &iMarkStyle;
-        int iMarkSize = 0;
-        int* piMarkSize = &iMarkSize;
-        double pdblResult[2];
-
-        getGraphicObjectProperty(pobjUID, __GO_MARK_STYLE__, jni_int, (void**)&piMarkStyle);
-        getGraphicObjectProperty(pobjUID, __GO_MARK_SIZE__, jni_int, (void**)&piMarkSize);
-        pdblResult[0] = iMarkStyle;
-        pdblResult[1] = iMarkSize;
-
-        createMatrixOfDouble(pvApiCtx, nbInputArgument(pvApiCtx) + 1, 1, 2, pdblResult);
-        AssignOutputVariable(pvApiCtx, 1) = nbInputArgument(pvApiCtx) + 1;
-        ReturnArguments(pvApiCtx);
-
-        return 0;
-    }
-    else if (strcmp(l1, "mark size") == 0)
-    {
-        char *pobjUID = (char*)getOrCreateDefaultSubwin();
-        get_mark_size_property(pvApiCtx, pobjUID);
-
-        AssignOutputVariable(pvApiCtx, 1) = nbInputArgument(pvApiCtx) + 1;
-        ReturnArguments(pvApiCtx);
-
-        return 0;
-    }
-    else if (strcmp(l1, "line style") == 0)
-    {
-        get_line_style_property(pvApiCtx, (char*)getOrCreateDefaultSubwin());
-
-        AssignOutputVariable(pvApiCtx, 1) = nbInputArgument(pvApiCtx) + 1;
-        ReturnArguments(pvApiCtx);
-        return 0;
-    }
-    else if (strcmp(l1, "clipping") == 0)
-    {
-        double *clipBox = NULL;
-        char* pobjUID = (char*)getOrCreateDefaultSubwin();
-
-        getGraphicObjectProperty(pobjUID, __GO_CLIP_BOX__, jni_double_vector, (void **)&clipBox);
-
-        createMatrixOfDouble(pvApiCtx, nbInputArgument(pvApiCtx) + 1, 1, 4, clipBox);
-        AssignOutputVariable(pvApiCtx, 1) = nbInputArgument(pvApiCtx) + 1;
-        ReturnArguments(pvApiCtx);
-        return 0;
-    }
-    else if (strcmp(l1, "font") == 0)
-    {
-        char *pobjUID = (char*)getOrCreateDefaultSubwin();
-        double dblFontSize = 0;
-        double* pdblFontSize = &dblFontSize;
-        int iFontStyle = 0;
-        int* piFontStyle = &iFontStyle;
-        double pdblResult[2];
-
-        getGraphicObjectProperty(pobjUID, __GO_FONT_SIZE__, jni_double, (void **)&pdblFontSize);
-        getGraphicObjectProperty(pobjUID, __GO_FONT_STYLE__, jni_int, (void**)&piFontStyle);
-
-        pdblResult[0] = iFontStyle;
-        pdblResult[1] = dblFontSize;
-
-
-        createMatrixOfDouble(pvApiCtx, nbInputArgument(pvApiCtx) + 1, 1, 2, pdblResult);
-        AssignOutputVariable(pvApiCtx, 1) = nbInputArgument(pvApiCtx) + 1;
-        ReturnArguments(pvApiCtx);
-        return 0;
-    }
-    else if (strcmp(l1, "font size") == 0)
-    {
-        double dblFontSize = 0;
-        double* pdblFontSize = &dblFontSize;
-        getGraphicObjectProperty(getOrCreateDefaultSubwin(), __GO_FONT_SIZE__, jni_double, (void **)&pdblFontSize);
-
-        createScalarDouble(pvApiCtx, nbInputArgument(pvApiCtx) + 1, dblFontSize);
-        AssignOutputVariable(pvApiCtx, 1) = nbInputArgument(pvApiCtx) + 1;
-        ReturnArguments(pvApiCtx);
-
-        return 0;
-    }
-    else if (strcmp(l1, "dashes") == 0)
-    {
-        int iLineStyle = 0;
-        int* piLineStyle = &iLineStyle;
-
-        getGraphicObjectProperty(getOrCreateDefaultSubwin(), __GO_LINE_STYLE__, jni_int, (void**)&piLineStyle);
-
-        createScalarDouble(pvApiCtx, nbInputArgument(pvApiCtx) + 1, iLineStyle);
-        AssignOutputVariable(pvApiCtx, 1) = nbInputArgument(pvApiCtx) + 1;
-        ReturnArguments(pvApiCtx);
-
-        return 0;
-    }
-    else if (strcmp(l1, "hidden3d") == 0)
-    {
-        get_hidden_color_property(pvApiCtx, (char*)getOrCreateDefaultSubwin());
-
-        AssignOutputVariable(pvApiCtx, 1) = nbInputArgument(pvApiCtx) + 1;
-        ReturnArguments(pvApiCtx);
-
-        return 0;
-    }
-    else if (strcmp(l1, "window") == 0 || strcmp(l1, "figure") == 0)
-    {
-        int iFigureId = 0;
-        int* piFigureId = &iFigureId;
-
-        getOrCreateDefaultSubwin();
-        getGraphicObjectProperty(getCurrentFigure(), __GO_ID__, jni_int, (void**)&piFigureId);
-        createScalarDouble(pvApiCtx, nbInputArgument(pvApiCtx) + 1, iFigureId);
-        AssignOutputVariable(pvApiCtx, 1) = nbInputArgument(pvApiCtx) + 1;
-        ReturnArguments(pvApiCtx);
-        return 0;
-    }
-    else if (strcmp(l1, "thickness") == 0)
-    {
-        get_thickness_property(pvApiCtx, (char*)getOrCreateDefaultSubwin());
-
-        AssignOutputVariable(pvApiCtx, 1) = nbInputArgument(pvApiCtx) + 1;
-        ReturnArguments(pvApiCtx);
-
-        return 0;
-    }
-    else if (strcmp(l1, "wdim") == 0 || strcmp(l1, "wpdim") == 0)
-    {
-        int *piFigureSize = NULL;
-        double pdblFigureSize[2];
-
-        getOrCreateDefaultSubwin();
-        getGraphicObjectProperty(getCurrentFigure(), __GO_SIZE__, jni_int_vector, (void **) &piFigureSize);
-        pdblFigureSize[0] = (double) piFigureSize[0];
-        pdblFigureSize[1] = (double) piFigureSize[1];
-
-        createMatrixOfDouble(pvApiCtx, nbInputArgument(pvApiCtx) + 1, 1, 2, pdblFigureSize);
-        AssignOutputVariable(pvApiCtx, 1) = nbInputArgument(pvApiCtx) + 1;
-        ReturnArguments(pvApiCtx);
-
-        return 0;
-    }
-    else if (strcmp(l1, "wpos") == 0)
-    {
-        int *piFigurePosition = NULL;
-        double pdblFigurePosition[2];
-
-        getOrCreateDefaultSubwin();
-        getGraphicObjectProperty(getCurrentFigure(), __GO_POSITION__, jni_int_vector, (void **) &piFigurePosition);
-        pdblFigurePosition[0] = piFigurePosition[0];
-        pdblFigurePosition[1] = piFigurePosition[1];
-
-        createMatrixOfDouble(pvApiCtx, nbInputArgument(pvApiCtx) + 1, 1, 2, pdblFigurePosition);
-        AssignOutputVariable(pvApiCtx, 1) = nbInputArgument(pvApiCtx) + 1;
-        ReturnArguments(pvApiCtx);
-
-        return 0;
-    }
-    else if (strcmp(l1, "viewport") == 0)
-    {
-        int* viewport = NULL;
-        double pdblViewport[2];
-
-        getOrCreateDefaultSubwin();
-        getGraphicObjectProperty(getCurrentFigure(), __GO_VIEWPORT__, jni_int_vector, (void **)&viewport);
-        pdblViewport[0] = viewport[0];
-        pdblViewport[1] = viewport[1];
-
-        createMatrixOfDouble(pvApiCtx, nbInputArgument(pvApiCtx) + 1, 1, 2, pdblViewport);
-        AssignOutputVariable(pvApiCtx, 1) = nbInputArgument(pvApiCtx) + 1;
-        ReturnArguments(pvApiCtx);
-
-        return 0;
-    }
-    else if (strcmp(l1, "background") == 0)
-    {
-        get_background_property(pvApiCtx, (char*)getOrCreateDefaultSubwin());
-
-        AssignOutputVariable(pvApiCtx, 1) = nbInputArgument(pvApiCtx) + 1;
-        ReturnArguments(pvApiCtx);
-
-        return 0;
-    }
-    else if (  strcmp(l1, "color") == 0
-               || strcmp(l1, "foreground") == 0
-               || strcmp(l1, "pattern") == 0)
-    {
-        get_foreground_property(pvApiCtx, (char*)getOrCreateDefaultSubwin());
-
-        AssignOutputVariable(pvApiCtx, 1) = nbInputArgument(pvApiCtx) + 1;
-        ReturnArguments(pvApiCtx);
-
-        return 0;
-    }
-    else if (strcmp(l1, "lastpattern") == 0)
-    {
-        int iNumColors = 0;
-        int* piNumColors = &iNumColors;
-
-        getOrCreateDefaultSubwin();
-        getGraphicObjectProperty(getCurrentFigure(), __GO_COLORMAP_SIZE__, jni_int, (void**)&piNumColors);
-
-        createScalarDouble(pvApiCtx, nbInputArgument(pvApiCtx) + 1, iNumColors);
-
-        AssignOutputVariable(pvApiCtx, 1) = nbInputArgument(pvApiCtx) + 1;
-        ReturnArguments(pvApiCtx);
-
-        return 0;
-    }
-    else if (strcmp(l1, "line mode") == 0)
-    {
-        int iLineMode = 0;
-        int* lineMode = &iLineMode;
-
-        getGraphicObjectProperty(getOrCreateDefaultSubwin(), __GO_LINE_MODE__, jni_bool, (void **)&lineMode);
-
-        createScalarDouble(pvApiCtx, nbInputArgument(pvApiCtx) + 1, iLineMode);
-
-        AssignOutputVariable(pvApiCtx, 1) = nbInputArgument(pvApiCtx) + 1;
-        ReturnArguments(pvApiCtx);
-
-        return 0;
-    }
-    else if (strcmp(l1, "pixmap") == 0)
-    {
-        int iPixmap = 0;
-        int *piPixmap = &iPixmap;
-
-        getOrCreateDefaultSubwin();
-        getGraphicObjectProperty(getCurrentFigure(), __GO_PIXMAP__, jni_bool, (void **)&piPixmap);
-
-        createScalarDouble(pvApiCtx, nbInputArgument(pvApiCtx) + 1, iPixmap);
-        AssignOutputVariable(pvApiCtx, 1) = nbInputArgument(pvApiCtx) + 1;
-        ReturnArguments(pvApiCtx);
-
-        return 0;
-    }
-    else if (strcmp(l1, "white") == 0)
-    {
-        int iNumColors = 0;
-        int* piNumColors = &iNumColors;
-
-        getOrCreateDefaultSubwin();
-        getGraphicObjectProperty(getCurrentFigure(), __GO_COLORMAP_SIZE__, jni_int, (void**)&piNumColors);
-
-        /* White is lqst colormap index + 2 */
-        createScalarDouble(pvApiCtx, nbInputArgument(pvApiCtx) + 1, iNumColors + 2);
-
-        AssignOutputVariable(pvApiCtx, 1) = nbInputArgument(pvApiCtx) + 1;
-        ReturnArguments(pvApiCtx);
-
-        return 0;
-    }
-    else if (strcmp(l1, "wresize") == 0)
-    {
-        // autoresize property
-        int iAutoResize = 0;
-        int* piAutoResize =  &iAutoResize;
-
-        getOrCreateDefaultSubwin();
-        getGraphicObjectProperty(getCurrentFigure(), __GO_AUTORESIZE__, jni_bool, (void **)&piAutoResize);
-
-        createScalarDouble(pvApiCtx, nbInputArgument(pvApiCtx) + 1, iAutoResize);
-
-        AssignOutputVariable(pvApiCtx, 1) = nbInputArgument(pvApiCtx) + 1;
-        ReturnArguments(pvApiCtx);
-
-        return 0;
-    }
-    else if (strcmp(l1, "clipgrf") == 0)
-    {
-        /* clip_state : 0 = off, 1 = on */
-        int iClipState = 0;
-        int* piClipState = &iClipState;
-
-        getGraphicObjectProperty(getOrCreateDefaultSubwin(), __GO_CLIP_STATE__, jni_int, (void**)&piClipState);
-
-        createScalarDouble(pvApiCtx, nbInputArgument(pvApiCtx) + 1, iClipState);
-        AssignOutputVariable(pvApiCtx, 1) = nbInputArgument(pvApiCtx) + 1;
-        ReturnArguments(pvApiCtx);
-
-        return 0;
-    }
-    else if (strcmp(l1, "clipoff") == 0)
-    {
-        int iClipState = 0;
-        int* piClipState = &iClipState;
-
-        getGraphicObjectProperty(getOrCreateDefaultSubwin(), __GO_CLIP_STATE__, jni_int, (void**)&piClipState);
-
-        /* clip_state : 0 = off, 1 = on */
-        if (iClipState == 0)
-        {
-            createScalarDouble(pvApiCtx, nbInputArgument(pvApiCtx) + 1, 1);
-        }
-        else
-        {
-            createScalarDouble(pvApiCtx, nbInputArgument(pvApiCtx) + 1, 0);
-        }
-        AssignOutputVariable(pvApiCtx, 1) = nbInputArgument(pvApiCtx) + 1;
-        ReturnArguments(pvApiCtx);
-
-        return 0;
-    }
-    else
-    {
-        Scierror(999, _("%s: Unrecognized input argument: '%s'.\n"), fname, (l1));
-        return -1;
-    }
-
-    freeAllocatedSingleString(l1);
-    return 0;
-}
-/*--------------------------------------------------------------------------*/
-int xgetg(char * str, char * str1, int * len, int  lx0, int lx1)
-{
-    if (strcmp(str, "fpf") == 0)
-    {
-        strncpy(str1, getFPF(), 32);
-        *len = (int) strlen(str1);
-    }
-    else if (strcmp(str, "auto clear") == 0)
-    {
-        int iAutoClear = 0;
-        int* piAutoClear = &iAutoClear;
-
-        getGraphicObjectProperty(getOrCreateDefaultSubwin(), __GO_AUTO_CLEAR__, jni_bool, (void **)&piAutoClear);
-        if (iAutoClear == 1)
-        {
-            strncpy(str1, "on", 2);
-            *len = 2;
-        }
-        else
-        {
-            strncpy(str1, "off", 3);
-            *len = 3;
-        }
-    }
-    return 0;
-}
-/*--------------------------------------------------------------------------*/
diff --git a/scilab/modules/graphics/sci_gateway/c/sci_xset.c b/scilab/modules/graphics/sci_gateway/c/sci_xset.c
deleted file mode 100644 (file)
index c335727..0000000
+++ /dev/null
@@ -1,600 +0,0 @@
-/*
-* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-* Copyright (C) 2006 - INRIA - Fabrice Leray
-* Copyright (C) 2006 - INRIA - Jean-Baptiste Silvy
-* Copyright (C) 2012 - Scilab Enterprises - 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.1-en.txt
-*
-*/
-
-/*------------------------------------------------------------------------*/
-/* file: sci_xset.c                                                       */
-/* desc : interface for xset routine                                      */
-/*------------------------------------------------------------------------*/
-#include <stdio.h>
-#include <string.h>
-#include "gw_graphics.h"
-#include "api_scilab.h"
-#include "GetProperty.h"
-#include "SetProperty.h"
-#include "DrawObjects.h"
-#include "InitObjects.h"
-#include "XsetXgetParameters.h"
-#include "Format.h"
-#include "localization.h"
-#include "Scierror.h"
-#include "HandleManagement.h"
-
-#include "BuildObjects.h"
-#include "graphicObjectProperties.h"
-#include "setGraphicObjectProperty.h"
-#include "FigureList.h"
-#include "CurrentFigure.h"
-#include "CurrentSubwin.h"
-#include "AxesModel.h"
-#include "getGraphicObjectProperty.h"
-#include "deleteGraphicObject.h"
-//#include "warningmode.h"
-#include "warningmode.h"
-#include "sciprint.h"
-
-/*--------------------------------------------------------------------------*/
-int xsetg(char * str, char * str1, int lx0, int lx1);
-/*--------------------------------------------------------------------------*/
-int sci_xset(char *fname, void *pvApiCtx)
-{
-    SciErr sciErr;
-
-    int* piAddrl1 = NULL;
-    char* l1 = NULL;
-    int* piAddrl2 = NULL;
-    char* l2 = NULL;
-    int* piAddrlr = NULL;
-    double* lr = NULL;
-
-    int m1 = 0, m2 = 0, xm[5], xn[5], x[5] = {0, 0, 0, 0, 0}, i = 0, v = 0;
-    double  xx[5] = {0.0, 0.0, 0.0, 0.0, 0.0};
-    char * subwinUID = NULL;
-    BOOL keyFound = FALSE;
-
-    if (nbInputArgument(pvApiCtx) <= 0)
-    {
-        sci_demo(fname, pvApiCtx);
-        return 0;
-    }
-
-    CheckInputArgument(pvApiCtx, 1, 6);
-    CheckOutputArgument(pvApiCtx, 0, 1);
-
-    sciErr = getVarAddressFromPosition(pvApiCtx, 1, &piAddrl1);
-    if (sciErr.iErr)
-    {
-        printError(&sciErr, 0);
-        return 1;
-    }
-
-    // Retrieve a matrix of double at position 1.
-    if (getAllocatedSingleString(pvApiCtx, piAddrl1, &l1))
-    {
-        Scierror(202, _("%s: Wrong type for argument #%d: A string expected.\n"), fname, 1);
-        return 1;
-    }
-
-
-    for (i = 0 ; i < NUMSETFONC ; i++)
-    {
-        if (strcmp(l1, KeyTab_[i]) == 0)
-        {
-            keyFound = TRUE;
-            break;
-        }
-    }
-
-    if (!keyFound)
-    {
-        Scierror(999, _("%s: Unrecognized input argument: '%s'.\n"), fname, (l1));
-        return 0;
-    }
-
-    /* Allan CORNET Avril 2004 */
-    /* Bloque la commande xset('window') sans numero de fenetre */
-    if (nbInputArgument(pvApiCtx) == 1 && (strcmp((l1), "window") == 0))
-    {
-        Scierror(999, _("%s : '%s' must be set\n"), fname, "window-number");
-        return 0;
-    }
-
-    if (nbInputArgument(pvApiCtx) == 2 && (!checkInputArgumentType(pvApiCtx, 2, sci_matrix)))
-    {
-        /* second argument is not a scalar it must be a string */
-        sciErr = getVarAddressFromPosition(pvApiCtx, 2, &piAddrl2);
-        if (sciErr.iErr)
-        {
-            printError(&sciErr, 0);
-            return 1;
-        }
-
-        // Retrieve a matrix of double at position 2.
-        if (getAllocatedSingleString(pvApiCtx, piAddrl2, &l2))
-        {
-            Scierror(202, _("%s: Wrong type for argument #%d: A string expected.\n"), fname, 2);
-            return 1;
-        }
-
-        xsetg(l1, l2, m1, m2);
-        AssignOutputVariable(pvApiCtx, 1) = 0;
-        ReturnArguments(pvApiCtx);
-        return 0;
-    }
-
-    if (nbInputArgument(pvApiCtx) == 1 && strcmp((l1), "default") == 0)
-    {
-        /* first treatment for xsetg : then we continue */
-        xsetg((l1), "void", m1, 4L);
-    }
-
-    for (i = 2 ; i <= nbInputArgument(pvApiCtx) ; i++)
-    {
-        sciErr = getVarAddressFromPosition(pvApiCtx, i, &piAddrlr);
-        if (sciErr.iErr)
-        {
-            printError(&sciErr, 0);
-            return 1;
-        }
-
-        // Retrieve a matrix of double at position i.
-        sciErr = getMatrixOfDouble(pvApiCtx, piAddrlr, &xm[i - 2], &xn[i - 2], &lr);
-        if (sciErr.iErr)
-        {
-            printError(&sciErr, 0);
-            Scierror(202, _("%s: Wrong type for argument %d: A real expected.\n"), fname, i);
-            return 1;
-        }
-
-        x[i - 2] = (int)lr[0];
-        xx[i - 2] = lr[0];
-    }
-
-    if (strcmp((l1), "wdim") == 0 || strcmp((l1), "wpdim") == 0)
-    {
-        /* Xwindows limits dimensions to 2^16 */
-        if ((x[0] > 65535) || (x[1] > 65535))
-        {
-            x[0] = Min(x[0], 65535);
-            x[1] = Min(x[1], 65535);
-            i = 106;
-            v = 0;
-            //YaSp compilation
-            //C2F(msgs)(&i, &v);
-        }
-    }
-
-    if (strcmp((l1), "clipping") == 0)
-    {
-        int clipState = 2;
-        if (nbInputArgument(pvApiCtx) != 5 && nbInputArgument(pvApiCtx) != 2)
-        {
-            Scierror(999, _("%s: Wrong number of input arguments: %d or %d expected.\n"), fname, 2, 5);
-            return 1;
-        }
-
-        if (nbInputArgument(pvApiCtx) == 2)
-        {
-            int i = 0;
-            int iRows = 0;
-            int iCols = 0;
-
-            sciErr = getVarAddressFromPosition(pvApiCtx, 2, &piAddrlr);
-            if (sciErr.iErr)
-            {
-                printError(&sciErr, 0);
-                return 1;
-            }
-
-            // Retrieve a matrix of double at position 2.
-            sciErr = getMatrixOfDouble(pvApiCtx, piAddrlr, &iRows, &iCols, &lr);
-            if (sciErr.iErr)
-            {
-                printError(&sciErr, 0);
-                Scierror(202, _("%s: Wrong type for argument %d: A real expected.\n"), fname, 2);
-                return 1;
-            }
-
-
-            if (iRows * iCols != 4)
-            {
-                Scierror(999, _("%s: Wrong size for input argument #%d: A %d-element vector expected.\n"), fname, 2, 4);
-                return 1;
-            }
-
-            for (i = 0; i < 4 ; i++)
-            {
-                xx[i] = lr[i];
-            }
-        }
-        subwinUID = (char*)getOrCreateDefaultSubwin();
-        setGraphicObjectProperty(subwinUID, __GO_CLIP_BOX__, xx, jni_double_vector, 4);
-        setGraphicObjectProperty(subwinUID, __GO_CLIP_STATE__, &clipState, jni_int, 1);
-    }
-    else if (strcmp((l1), "colormap") == 0)
-    {
-        char *pFigureUID = NULL;
-        getOrCreateDefaultSubwin();
-        pFigureUID = (char*)getCurrentFigure();
-        setGraphicObjectProperty(pFigureUID, __GO_COLORMAP__, (lr), jni_double_vector, *xm * (*xn));
-    }
-    else if (strcmp((l1), "mark size") == 0)
-    {
-        int markSize = (int) xx[0];
-        int markSizeUnit = 1; /* force switch to tabulated mode : old syntax / 0 : point, 1 : tabulated */
-        char *subwinUID = (char*)getOrCreateDefaultSubwin();
-
-        setGraphicObjectProperty(subwinUID, __GO_MARK_SIZE_UNIT__, &markSizeUnit, jni_int, 1);
-        setGraphicObjectProperty(subwinUID, __GO_MARK_SIZE__, &markSize, jni_int, 1);
-    }
-    else if (strcmp((l1), "mark") == 0)
-    {
-        int markStyle = (int) xx[0];
-        int markSize = (int) xx[1];
-        int markSizeUnit = 1; /* force switch to tabulated mode : old syntax / 0 : point, 1 : tabulated */
-        char *subwinUID = NULL;
-        if (nbInputArgument(pvApiCtx) != 3)
-        {
-            Scierror(999, _("%s: Wrong number of input arguments: %d expected.\n"), fname, 3);
-            return -1;
-        }
-
-        subwinUID = (char*)getOrCreateDefaultSubwin();
-        setGraphicObjectProperty(subwinUID, __GO_MARK_SIZE_UNIT__, &markSizeUnit, jni_int, 1); /* force switch to tabulated mode : old syntax */
-        setGraphicObjectProperty(subwinUID, __GO_MARK_STYLE__, &markStyle, jni_int, 1);
-        setGraphicObjectProperty(subwinUID, __GO_MARK_SIZE__, &markSize, jni_int, 1);
-    }
-    else if (strcmp((l1), "font size") == 0)
-    {
-        double fontSize = xx[0];
-
-        setGraphicObjectProperty(getOrCreateDefaultSubwin(), __GO_FONT_SIZE__, &fontSize, jni_double, 1);
-    }
-    else if (strcmp((l1), "default") == 0)
-    {
-        // default color map
-        unsigned short defcolors[] =
-        {
-            0, 0, 0,                    /* Black: DEFAULTBLACK */
-            0, 0, 255,                  /* Blue */
-            0, 255, 0,                  /* Green */
-            0, 255, 255,                /* Cyan */
-            255, 0, 0,                  /* Red */
-            255, 0, 255,                /* Magenta */
-            255, 255, 0,                /* Yellow */
-            255, 255, 255,              /* White: DEFAULTWHITE */
-            0, 0, 144,                  /* Blue4 */
-            0, 0, 176,                  /* Blue3 */
-            0, 0, 208,                  /* Blue2 */
-            135, 206, 255,              /* LtBlue */
-            0, 144, 0,                  /* Green4 */
-            0, 176, 0,                  /* Green3 */
-            0, 208, 0,                  /* Green2 */
-            0, 144, 144,                /* Cyan4 */
-            0, 176, 176,                /* Cyan3 */
-            0, 208, 208,                /* Cyan2 */
-            144, 0, 0,                  /* Red4 */
-            176, 0, 0,                  /* Red3 */
-            208, 0, 0,                  /* Red2 */
-            144, 0, 144,                /* Magenta4 */
-            176, 0, 176,                /* Magenta3 */
-            208, 0, 208,                /* Magenta2 */
-            128, 48, 0,                 /* Brown4 */
-            160, 64, 0,                 /* Brown3 */
-            192, 96, 0,                 /* Brown2 */
-            255, 128, 128,              /* Pink4 */
-            255, 160, 160,              /* Pink3 */
-            255, 192, 192,              /* Pink2 */
-            255, 224, 224,              /* Pink */
-            255, 215, 0                 /* Gold */
-        };
-
-        int piFigurePosition[2] = {200, 200};
-        int piFigureSize[2]     = {500, 500};
-        int piAxesSize[2]       = {498, 366};
-        int piViewPort[2]       = {0, 0};
-        int piEmptyMatrix[4]    = {1, 0, 0, 0};
-
-        // Create new axes and set it in current figure
-        char* pSubWinUID = (char*)getCurrentSubWin();
-
-        // init variables
-        int iZero   = 0;
-        BOOL bTrue  = TRUE;
-        BOOL bFalse = FALSE;
-        int m       = NUMCOLORS_SCI;
-        int i       = 0;
-        int iCopy   = 3;
-
-        int defaultBackground = -2;
-        char error_message[70];
-
-        double* pdblColorMap = (double*)malloc(m * 3 * sizeof(double));
-
-        // Create figure if it not exist.
-        char* pFigureUID = (char*)getCurrentFigure();
-        if (pFigureUID == NULL)
-        {
-            pFigureUID = createNewFigureWithAxes();
-            setCurrentFigure(pFigureUID);
-            AssignOutputVariable(pvApiCtx, 1) = 0;
-            ReturnArguments(pvApiCtx);
-            free(pdblColorMap);
-            return 0;
-        }
-
-        if (pdblColorMap == NULL)
-        {
-            sprintf(error_message, _("%s: No more memory.\n"), "xset");
-            return 0;
-        }
-
-        if (pSubWinUID != NULL)
-        {
-            int iChildrenCount  = 0;
-            int* childrencount  = &iChildrenCount;
-            char** childrenUID  = NULL;
-            int iHidden         = 0;
-            int *piHidden       = &iHidden;
-
-            getGraphicObjectProperty(pFigureUID, __GO_CHILDREN_COUNT__, jni_int, (void **)&childrencount);
-            getGraphicObjectProperty(pFigureUID, __GO_CHILDREN__, jni_string_vector, (void **)&childrenUID);
-
-            for (i = 0; i < childrencount[0]; ++i)
-            {
-                getGraphicObjectProperty(childrenUID[i], __GO_HIDDEN__, jni_bool, (void **)&piHidden);
-                if (iHidden == 0)
-                {
-                    deleteGraphicObject(childrenUID[i]);
-                }
-            }
-        }
-
-        cloneAxesModel(pFigureUID);
-
-        // Set default figure properties
-        setGraphicObjectProperty(pFigureUID, __GO_POSITION__, piFigurePosition, jni_int_vector, 2);
-        setGraphicObjectProperty(pFigureUID, __GO_SIZE__, piFigureSize, jni_int_vector, 2);
-        setGraphicObjectProperty(pFigureUID, __GO_AXES_SIZE__, piAxesSize, jni_int_vector, 2);
-        setGraphicObjectProperty(pFigureUID, __GO_AUTORESIZE__, &bTrue, jni_bool, 1);
-        setGraphicObjectProperty(pFigureUID, __GO_VIEWPORT__, piViewPort, jni_int_vector, 2);
-        setGraphicObjectProperty(pFigureUID, __GO_NAME__, _("Figure n°%d"), jni_string, 1);
-        setGraphicObjectProperty(pFigureUID, __GO_INFO_MESSAGE__, "", jni_string, 1);
-        setGraphicObjectProperty(pFigureUID, __GO_PIXMAP__, &bFalse, jni_bool, 1);
-        setGraphicObjectProperty(pFigureUID, __GO_PIXEL_DRAWING_MODE__, &iCopy, jni_int, 1);
-        setGraphicObjectProperty(pFigureUID, __GO_ANTIALIASING__, &iZero, jni_int, 1);
-        setGraphicObjectProperty(pFigureUID, __GO_IMMEDIATE_DRAWING__, &bTrue, jni_bool, 1);
-        setGraphicObjectProperty(pFigureUID, __GO_BACKGROUND__, &defaultBackground, jni_int, 1);
-        setGraphicObjectProperty(pFigureUID, __GO_VISIBLE__, &bTrue, jni_bool, 1);
-        setGraphicObjectProperty(pFigureUID, __GO_ROTATION_TYPE__, &iZero, jni_int, 1);
-        setGraphicObjectProperty(pFigureUID, __GO_EVENTHANDLER__, "", jni_string, 1);
-        setGraphicObjectProperty(pFigureUID, __GO_EVENTHANDLER_ENABLE__, &bFalse, jni_bool, 1);
-        setGraphicObjectProperty(pFigureUID, __GO_USER_DATA__, piEmptyMatrix, jni_int_vector, 4);
-        setGraphicObjectProperty(pFigureUID, __GO_RESIZEFCN__, "", jni_string, 1);
-        setGraphicObjectProperty(pFigureUID, __GO_TAG__, "", jni_string, 1);
-
-        for (i = 0; i < m; i++)
-        {
-            pdblColorMap[i]         = (double)(defcolors[3 * i] / 255.0);
-            pdblColorMap[i + m]     = (double)(defcolors[3 * i + 1] / 255.0);
-            pdblColorMap[i + 2 * m] = (double)(defcolors[3 * i + 2] / 255.0);
-        }
-
-        setGraphicObjectProperty(pFigureUID, __GO_COLORMAP__, pdblColorMap, jni_double_vector, 3 * m);
-        setGraphicObjectProperty(pFigureUID, __GO_PARENT__, "", jni_string, 1);
-
-    }
-    else if (strcmp((l1), "clipgrf") == 0)
-    {
-        int clipState = 1;
-        /* special treatement for xset("cligrf") */
-        setGraphicObjectProperty(getOrCreateDefaultSubwin(), __GO_CLIP_STATE__, &clipState, jni_int, 1);
-    }
-    else if (strcmp((l1), "clipoff") == 0)
-    {
-        int clipState = 0;
-        /* special treatement for xset("clipoff") */
-        setGraphicObjectProperty(getOrCreateDefaultSubwin(), __GO_CLIP_STATE__, &clipState, jni_int, 1);
-    }
-    else if (strcmp((l1), "hidden3d") == 0)
-    {
-        /* special treatement for xset("hidden3d") */
-        int hiddenColor = (int) x[0];
-
-        setGraphicObjectProperty(getOrCreateDefaultSubwin(), __GO_HIDDEN_COLOR__, &hiddenColor, jni_int, 1);
-    }
-    else if (strcmp((l1), "font") == 0)
-    {
-        int fontStyle = (int) xx[0];
-        double fontSize = xx[1];
-        if (nbInputArgument(pvApiCtx) != 3)
-        {
-            Scierror(999, _("%s: Wrong number of input arguments: %d expected.\n"), fname, 3);
-            return -1;
-        }
-
-        setGraphicObjectProperty(getOrCreateDefaultSubwin(), __GO_FONT_SIZE__, &fontSize, jni_double, 1);
-        setGraphicObjectProperty(getOrCreateDefaultSubwin(), __GO_FONT_STYLE__, &fontStyle, jni_int, 1);
-    }
-    else if (strcmp((l1), "window") == 0 || strcmp((l1), "figure") == 0)
-    {
-        // Find if window already exists, if not create a new one
-        int iID = x[0];
-        char *pFigureUID = (char*)getFigureFromIndex(iID);
-        if (pFigureUID == NULL)
-        {
-            pFigureUID = createNewFigureWithAxes();
-            setGraphicObjectProperty(pFigureUID, __GO_ID__, &iID, jni_int, 1);
-            setCurrentFigure(pFigureUID);
-        }
-        setCurrentFigure(pFigureUID);
-    }
-    else if ((strcmp((l1), "foreground") == 0) || (strcmp((l1), "color") == 0) || (strcmp((l1), "pattern") == 0))
-    {
-        int iColor = (int) x[0];
-
-        setGraphicObjectProperty(getOrCreateDefaultSubwin(), __GO_LINE_COLOR__, &iColor, jni_int, 1);
-    }
-    else if (strcmp((l1), "background") == 0)
-    {
-        int iColor = (int) x[0];
-
-        setGraphicObjectProperty(getOrCreateDefaultSubwin(), __GO_BACKGROUND__, &iColor, jni_int, 1);
-    }
-    else if (strcmp((l1), "thickness") == 0)
-    {
-        sciSetLineWidth((char*)getOrCreateDefaultSubwin(), x[0]);
-    }
-    else if (strcmp((l1), "line style") == 0)
-    {
-        int lineStyle = (int) x[0];
-        setGraphicObjectProperty(getOrCreateDefaultSubwin(), __GO_LINE_STYLE__, &lineStyle, jni_int, 1);
-    }
-    else if (strcmp((l1), "mark") == 0)
-    {
-        int markMode = 1;
-
-        setGraphicObjectProperty(getOrCreateDefaultSubwin(), __GO_MARK_MODE__, &markMode, jni_bool, 1);
-        setGraphicObjectProperty(getOrCreateDefaultSubwin(), __GO_MARK_STYLE__, x, jni_int, 1);
-    }
-    else if (strcmp((l1), "colormap") == 0)
-    {
-        getOrCreateDefaultSubwin();
-        setGraphicObjectProperty(getCurrentFigure(), __GO_COLORMAP__, (lr), jni_double_vector, xm[0] * xn[0]);
-    }
-    else if (strcmp((l1), "dashes") == 0)
-    {
-        int lineStyle = (int) x[0];
-        setGraphicObjectProperty(getOrCreateDefaultSubwin(), __GO_LINE_STYLE__, &lineStyle, jni_int, 1);
-    }
-    else if (strcmp((l1), "wresize") == 0)
-    {
-        int iAutoResizeMode = x[0];
-
-        setGraphicObjectProperty(getOrCreateDefaultSubwin(), __GO_AUTORESIZE__, &iAutoResizeMode, jni_bool, 1);
-    }
-    else if (strcmp((l1), "wpos") == 0)
-    {
-        int figurePosition[2];
-        if (nbInputArgument(pvApiCtx) != 2)
-        {
-            Scierror(999, _("%s: Wrong number of input arguments: %d expected.\n"), fname, 2);
-            return -1;
-        }
-        getOrCreateDefaultSubwin();
-
-        figurePosition[0] = x[0];
-        figurePosition[1] = x[1];
-        setGraphicObjectProperty(getCurrentFigure(), __GO_POSITION__, figurePosition, jni_int_vector, 2);
-    }
-    else if (strcmp((l1), "wpdim") == 0 || strcmp((l1), "wdim") == 0)
-    {
-        int figureSize[2];
-        if (nbInputArgument(pvApiCtx) != 2 && nbInputArgument(pvApiCtx) != 3)
-        {
-            Scierror(999, _("%s: Wrong number of input arguments: %d or %d expected.\n"), fname, 2, 3);
-            return -1;
-        }
-        getOrCreateDefaultSubwin();
-
-        figureSize[0] = x[0];
-        figureSize[1] = x[1];
-        setGraphicObjectProperty(getCurrentFigure(), __GO_SIZE__, figureSize, jni_int_vector, 2);
-    } /*Ajout A.Djalel le 10/11/03 */
-    else if (strcmp((l1), "pixmap") == 0)
-    {
-        int iPixmapMode = x[0];
-        getOrCreateDefaultSubwin();
-
-        setGraphicObjectProperty(getCurrentFigure(), __GO_PIXMAP__, &iPixmapMode, jni_bool, 1);
-    }
-    else if (strcmp((l1), "wshow") == 0)
-    {
-        //        if (getWarningMode())
-        {
-            sciprint(_("WARNING: %s\n"), _("xset(\"wshow\") is obsolete."));
-            sciprint(_("WARNING: %s\n"), _("It will be removed after Scilab 5.4.0."));
-            sciprint(_("WARNING: %s\n"), _("Please use drawlater/drawnow instead."));
-        }
-    }
-    else if (strcmp((l1), "viewport") == 0)
-    {
-        int viewport[4] = {x[0], x[1], 0, 0};
-        getOrCreateDefaultSubwin();
-        setGraphicObjectProperty(getCurrentFigure(), __GO_VIEWPORT__, viewport, jni_int_vector, 2);
-    }
-    else if (strcmp((l1), "wwpc") == 0)
-    {
-        if (getWarningMode())
-        {
-            sciprint(_("WARNING: %s\n"), _("xset(\"wwpc\") is obsolete."));
-            sciprint(_("WARNING: %s\n"), _("It will be removed after Scilab 5.4.0."));
-            sciprint(_("WARNING: %s\n"), _("Please use drawlater/drawnow instead."));
-        }
-    }
-    else if (strcmp((l1), "line mode") == 0)
-    {
-        char *pstSubwinUID = (char*)getOrCreateDefaultSubwin();
-        int iZero = 0;
-        int iOne = 1;
-        if (x[0] == 0)
-        {
-            setGraphicObjectProperty(pstSubwinUID, __GO_LINE_MODE__, &iZero, jni_bool, 1);
-        }
-        else
-        {
-            setGraphicObjectProperty(pstSubwinUID, __GO_LINE_MODE__, &iOne, jni_bool, 1);
-        }
-    }
-    else
-    {
-        Scierror(999, _("%s: Unrecognized input argument: '%s'.\n"), fname, (l1));
-        return 0;
-    }
-
-    AssignOutputVariable(pvApiCtx, 1) = 0;
-    ReturnArguments(pvApiCtx);
-    freeAllocatedSingleString(l1);
-    freeAllocatedSingleString(l2);
-    return 0;
-}
-/*--------------------------------------------------------------------------*/
-int xsetg(char * str, char * str1, int lx0, int lx1)
-{
-    if (strcmp(str, "fpf") == 0)
-    {
-        strcpy(getFPF(), str1);
-    }
-    else if (strcmp(str, "auto clear") == 0)
-    {
-        int bAutoClear = (int) FALSE;
-
-        if (strcmp(str1, "on") == 0)
-        {
-            bAutoClear = (int) TRUE;
-        }
-
-        setGraphicObjectProperty(getOrCreateDefaultSubwin(), __GO_AUTO_CLEAR__, &bAutoClear, jni_bool, 1);
-    }
-    else if (strcmp(str, "default") == 0)
-    {
-        getFPF()[0] = '\0';
-    }
-    else
-    {
-        Scierror(999, _("%s: Unrecognized input argument '%s'.\n"), "xset(arg,<string>)", str);
-        return -1;
-    }
-    return 0;
-}
-/*--------------------------------------------------------------------------*/
index 309a75d..1466558 100644 (file)
@@ -26,6 +26,8 @@
     <ClCompile Include="graphics_gw.cpp" />
     <ClCompile Include="sci_get.cpp" />
     <ClCompile Include="sci_winsid.cpp" />
+    <ClCompile Include="sci_xget.cpp" />
+    <ClCompile Include="sci_xset.cpp" />
   </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="..\..\..\..\Visual-Studio-settings\rename-vc-files\rename-vc-files.vcxproj">
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>../../includes;../../src/c/getHandleProperty;../../../operations/includes;../../../types/includes;../../../core/includes;../../../ast/includes;../../../symbol/includes;../../../localization/includes;../../../../libs/intl;../../../jvm/includes;../../../output_stream/includes;../../../api_scilab/includes;../../../graphic_objects/includes;../../../system_env/includes;../../../threads/includes;../../../string/includes;../../../console/includes;../../../../libs/Eigen/includes;../../../dynamic_link/includes</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>../../includes;../../src/c/getHandleProperty;../../../operations/includes;../../../types/includes;../../../core/includes;../../../ast/includes;../../../symbol/includes;../../../localization/includes;../../../../libs/intl;../../../jvm/includes;../../../output_stream/includes;../../../api_scilab/includes;../../../graphic_objects/includes;../../../system_env/includes;../../../threads/includes;../../../string/includes;../../../console/includes;../../../../libs/Eigen/includes;../../../dynamic_link/includes;../../../gui/includes;../../src/cpp</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;GRAPHICS_GW_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
     </Midl>
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>../../includes;../../src/c/getHandleProperty;../../../operations/includes;../../../types/includes;../../../core/includes;../../../ast/includes;../../../symbol/includes;../../../localization/includes;../../../../libs/intl;../../../jvm/includes;../../../output_stream/includes;../../../api_scilab/includes;../../../graphic_objects/includes;../../../system_env/includes;../../../threads/includes;../../../string/includes;../../../console/includes;../../../../libs/Eigen/includes;../../../dynamic_link/includes</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>../../includes;../../src/c/getHandleProperty;../../../operations/includes;../../../types/includes;../../../core/includes;../../../ast/includes;../../../symbol/includes;../../../localization/includes;../../../../libs/intl;../../../jvm/includes;../../../output_stream/includes;../../../api_scilab/includes;../../../graphic_objects/includes;../../../system_env/includes;../../../threads/includes;../../../string/includes;../../../console/includes;../../../../libs/Eigen/includes;../../../dynamic_link/includes;../../../gui/includes;../../src/cpp</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;GRAPHICS_GW_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
     <ClCompile>
       <Optimization>MaxSpeed</Optimization>
       <IntrinsicFunctions>true</IntrinsicFunctions>
-      <AdditionalIncludeDirectories>../../includes;../../src/c/getHandleProperty;../../../operations/includes;../../../types/includes;../../../core/includes;../../../ast/includes;../../../symbol/includes;../../../localization/includes;../../../../libs/intl;../../../jvm/includes;../../../output_stream/includes;../../../api_scilab/includes;../../../graphic_objects/includes;../../../system_env/includes;../../../threads/includes;../../../string/includes;../../../console/includes;../../../../libs/Eigen/includes;../../../dynamic_link/includes</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>../../includes;../../src/c/getHandleProperty;../../../operations/includes;../../../types/includes;../../../core/includes;../../../ast/includes;../../../symbol/includes;../../../localization/includes;../../../../libs/intl;../../../jvm/includes;../../../output_stream/includes;../../../api_scilab/includes;../../../graphic_objects/includes;../../../system_env/includes;../../../threads/includes;../../../string/includes;../../../console/includes;../../../../libs/Eigen/includes;../../../dynamic_link/includes;../../../gui/includes;../../src/cpp</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;GRAPHICS_GW_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <FunctionLevelLinking>true</FunctionLevelLinking>
     <ClCompile>
       <Optimization>MaxSpeed</Optimization>
       <IntrinsicFunctions>true</IntrinsicFunctions>
-      <AdditionalIncludeDirectories>../../includes;../../src/c/getHandleProperty;../../../operations/includes;../../../types/includes;../../../core/includes;../../../ast/includes;../../../symbol/includes;../../../localization/includes;../../../../libs/intl;../../../jvm/includes;../../../output_stream/includes;../../../api_scilab/includes;../../../graphic_objects/includes;../../../system_env/includes;../../../threads/includes;../../../string/includes;../../../console/includes;../../../../libs/Eigen/includes;../../../dynamic_link/includes</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>../../includes;../../src/c/getHandleProperty;../../../operations/includes;../../../types/includes;../../../core/includes;../../../ast/includes;../../../symbol/includes;../../../localization/includes;../../../../libs/intl;../../../jvm/includes;../../../output_stream/includes;../../../api_scilab/includes;../../../graphic_objects/includes;../../../system_env/includes;../../../threads/includes;../../../string/includes;../../../console/includes;../../../../libs/Eigen/includes;../../../dynamic_link/includes;../../../gui/includes;../../src/cpp</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;GRAPHICS_GW_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <FunctionLevelLinking>true</FunctionLevelLinking>
index 2144f15..ab2782f 100644 (file)
     <ClCompile Include="sci_winsid.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="sci_xset.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="sci_xget.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
   </ItemGroup>
 </Project>
\ No newline at end of file
diff --git a/scilab/modules/graphics/sci_gateway/cpp/sci_xget.cpp b/scilab/modules/graphics/sci_gateway/cpp/sci_xget.cpp
new file mode 100644 (file)
index 0000000..af3f2c0
--- /dev/null
@@ -0,0 +1,389 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2006 - INRIA - Fabrice Leray
+ * Copyright (C) 2006 - INRIA - Jean-Baptiste Silvy
+ * Copyright (C) 2011 - Scilab Enterprises - Bruno JOFRET
+ * Copyright (C) 2013 - Scilab Enterprises - Cedric Delamarre
+ *
+ * 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.1-en.txt
+ *
+ */
+
+/*------------------------------------------------------------------------*/
+/* file: sci_xget.cpp                                                       */
+/* desc : interface for xget routine                                      */
+/*------------------------------------------------------------------------*/
+
+#include "graphics_gw.hxx"
+#include "function.hxx"
+#include "double.hxx"
+#include "configgraphicvariable.hxx"
+#include "overload.hxx"
+#include "execvisitor.hxx"
+#include "internal.hxx"
+
+extern "C"
+{
+#include <string.h>
+#include "GetProperty.h"
+#include "Scierror.h"
+#include "localization.h"
+#include "returnProperty.h"
+#include "HandleManagement.h"
+#include "CurrentSubwin.h"
+#include "getGraphicObjectProperty.h"
+#include "graphicObjectProperties.h"
+#include "BuildObjects.h"
+#include "MALLOC.h"
+#include "getHandleProperty.h"
+#include "CurrentFigure.h"
+}
+/*--------------------------------------------------------------------------*/
+types::Function::ReturnValue sci_xget(types::typed_list &in, int _iRetCount, types::typed_list &out)
+{
+    double dValue = 0;
+    wchar_t* pwcsWhat = NULL;
+    void* pvApiCtx = NULL;
+
+    if (in.size() == 0)
+    {
+        return Overload::call(L"%_xget", in, _iRetCount, out, new ExecVisitor());
+    }
+
+    if (in.size() > 2)
+    {
+        Scierror(77, _("%s: Wrong number of input argument(s): %d to %d expected.\n"), "xget", 1, 2);
+        return types::Function::Error;
+    }
+
+    if (_iRetCount > 1)
+    {
+        Scierror(78, _("%s: Wrong number of output argument(s): %d expected.\n"), "xget", 1);
+        return types::Function::Error;
+    }
+
+    if(in[0]->isString() == false)
+    {
+        Scierror(999, _("%s: Wrong type for input argument #%d: A single string expected.\n"), "xget", 1);
+        return types::Function::Error;
+    }
+
+    types::String* pStr = in[0]->getAs<types::String>();
+
+    if(pStr->isScalar() == false)
+    {
+        Scierror(999, _("%s: Wrong type for input argument #%d: A single string expected.\n"), "xget", 1);
+        return types::Function::Error;
+    }
+
+    pwcsWhat = pStr->get(0);
+
+    if (ConfigGraphicVariable::bPropertyFound(pwcsWhat) == false)
+    {
+        char* pstWhat = wide_string_to_UTF8(pwcsWhat);
+        Scierror(999, _("%s: Unrecognized input argument: '%s'.\n"), "xget", pstWhat);
+        FREE(pstWhat);
+        return types::Function::Error;
+    }
+
+    if (in.size() == 2)
+    {
+        if(in[1]->isDouble() == false)
+        {
+            Scierror(202, _("%s: Wrong type for argument %d: A real expected.\n"), "xget", 2);
+            return types::Function::Error;
+        }
+
+        types::Double* pDbl = in[1]->getAs<types::Double>();
+
+        //CheckScalar
+        if (pDbl->isScalar())
+        {
+            Scierror(999, _("%s: Wrong size for input argument #%d: A real scalar expected.\n"), "xget", 2);
+            return types::Function::Error;
+        }
+
+        dValue = pDbl->get(0);
+    }
+
+    switch(ConfigGraphicVariable::getPropertyValue(pwcsWhat))
+    {
+        case 15 : // fpf
+        {
+            out.push_back(new types::String(ConfigGraphicVariable::getFPF().c_str()));
+        }
+        break;
+        case 2 : // auto clear
+        {
+            int iAutoClear = 0;
+            int* piAutoClear = &iAutoClear;
+            getGraphicObjectProperty(getOrCreateDefaultSubwin(), __GO_AUTO_CLEAR__, jni_bool, (void **)&piAutoClear);
+            if (iAutoClear == 1)
+            {
+                out.push_back(new types::String(L"on"));
+            }
+            else
+            {
+                out.push_back(new types::String(L"off"));
+            }
+        }
+        break;
+        case 8 : // colormap
+        {
+            char *pobjUID = NULL;
+            // Force figure creation if none exists.
+            getOrCreateDefaultSubwin();
+            pobjUID = (char*)getCurrentFigure();
+
+            out.push_back((types::InternalType*)get_color_map_property(pvApiCtx, pobjUID));
+        }
+        break;
+        case 20 : // mark
+        {
+            char *pobjUID = (char*)getOrCreateDefaultSubwin();
+            int iMarkStyle = 0;
+            int* piMarkStyle = &iMarkStyle;
+            int iMarkSize = 0;
+            int* piMarkSize = &iMarkSize;
+            types::Double* pDbl = new types::Double(1, 2);
+
+            getGraphicObjectProperty(pobjUID, __GO_MARK_STYLE__, jni_int, (void**)&piMarkStyle);
+            getGraphicObjectProperty(pobjUID, __GO_MARK_SIZE__, jni_int, (void**)&piMarkSize);
+
+            pDbl->set(0, (double)iMarkStyle);
+            pDbl->set(1, (double)iMarkSize);
+            out.push_back(pDbl);
+        }
+        break;
+        case 21 : // mark size
+        {
+            char *pobjUID = (char*)getOrCreateDefaultSubwin();
+            out.push_back((types::InternalType*)get_mark_size_property(pvApiCtx, pobjUID));
+        }
+        break;
+        case 19 : // line style
+        {
+            out.push_back((types::InternalType*)get_line_style_property(pvApiCtx, (char*)getOrCreateDefaultSubwin()));
+        }
+        break;
+        case 5 : // clipping
+        {
+            types::Double* pDblClipBox = new types::Double(1, 4);
+            double *clipBox = NULL;
+            char* pobjUID = (char*)getOrCreateDefaultSubwin();
+            getGraphicObjectProperty(pobjUID, __GO_CLIP_BOX__, jni_double_vector, (void **)&clipBox);
+            memcpy(pDblClipBox->get(), clipBox, 4 * sizeof(double));
+            out.push_back(pDblClipBox);
+        }
+        break;
+        case 12 : // font
+        {
+            char *pobjUID = (char*)getOrCreateDefaultSubwin();
+            double dblFontSize = 0;
+            double* pdblFontSize = &dblFontSize;
+            int iFontStyle = 0;
+            int* piFontStyle = &iFontStyle;
+            types::Double* pDbl = new types::Double(1, 2);
+
+            getGraphicObjectProperty(pobjUID, __GO_FONT_SIZE__, jni_double, (void **)&pdblFontSize);
+            getGraphicObjectProperty(pobjUID, __GO_FONT_STYLE__, jni_int, (void**)&piFontStyle);
+
+            pDbl->set(0, (double)iFontStyle);
+            pDbl->set(1, dblFontSize);
+            out.push_back(pDbl);
+        }
+        break;
+        case 13 : // font size
+        {
+            double dblFontSize = 0;
+            double* pdblFontSize = &dblFontSize;
+            getGraphicObjectProperty(getOrCreateDefaultSubwin(), __GO_FONT_SIZE__, jni_double, (void **)&pdblFontSize);
+
+            out.push_back(new types::Double(dblFontSize));
+        }
+        break;
+        case 9 : // dashes
+        {
+            int iLineStyle = 0;
+            int* piLineStyle = &iLineStyle;
+
+            getGraphicObjectProperty(getOrCreateDefaultSubwin(), __GO_LINE_STYLE__, jni_int, (void**)&piLineStyle);
+
+            out.push_back(new types::Double((double)iLineStyle));
+        }
+        break;
+        case 16 : // hidden3d
+        {
+            out.push_back((types::InternalType*)get_hidden_color_property(pvApiCtx, (char*)getOrCreateDefaultSubwin()));
+        }
+        break;
+        case 30 : // window
+        case 11 : // figure
+        {
+            int iFigureId = 0;
+            int* piFigureId = &iFigureId;
+
+            getOrCreateDefaultSubwin();
+            getGraphicObjectProperty(getCurrentFigure(), __GO_ID__, jni_int, (void**)&piFigureId);
+
+            out.push_back(new types::Double((double)iFigureId));
+        }
+        break;
+        case 25 : // thickness
+        {
+            out.push_back((types::InternalType*)get_thickness_property(pvApiCtx, (char*)getOrCreateDefaultSubwin()));
+        }
+        break;
+        case 28 : // wdim
+        case 31 : // wpdim
+        {
+            int *piFigureSize = NULL;
+            types::Double* pDblFigureSize = new types::Double(1, 2);
+
+            getOrCreateDefaultSubwin();
+            getGraphicObjectProperty(getCurrentFigure(), __GO_SIZE__, jni_int_vector, (void **) &piFigureSize);
+
+            pDblFigureSize->set(0, (double) piFigureSize[0]);
+            pDblFigureSize->set(1, (double) piFigureSize[1]);
+            out.push_back(pDblFigureSize);
+        }
+        break;
+        case 32 : // wpos
+        {
+            int *piFigurePosition = NULL;
+            types::Double* pDblFigurePos = new types::Double(1, 2);
+
+            getOrCreateDefaultSubwin();
+            getGraphicObjectProperty(getCurrentFigure(), __GO_POSITION__, jni_int_vector, (void **) &piFigurePosition);
+
+            pDblFigurePos->set(0, (double) piFigurePosition[0]);
+            pDblFigurePos->set(1, (double) piFigurePosition[1]);
+            out.push_back(pDblFigurePos);
+        }
+        break;
+        case 27 : // viewport
+        {
+            int *piViewport = NULL;
+            types::Double* pDblViewport = new types::Double(1, 2);
+
+            getOrCreateDefaultSubwin();
+            getGraphicObjectProperty(getCurrentFigure(), __GO_VIEWPORT__, jni_int_vector, (void **)&piViewport);
+
+            pDblViewport->set(0, (double) piViewport[0]);
+            pDblViewport->set(1, (double) piViewport[1]);
+            out.push_back(pDblViewport);
+        }
+        break;
+        case 3 : // background
+        {
+            out.push_back((types::InternalType*)get_background_property(pvApiCtx, (char*)getOrCreateDefaultSubwin()));
+        }
+        break;
+        case 7 : // color
+        case 14 : // foreground
+        case 23 : // pattern
+        {
+            out.push_back((types::InternalType*)get_foreground_property(pvApiCtx, (char*)getOrCreateDefaultSubwin()));
+        }
+        break;
+        case 17 : // lastpattern
+        {
+            int iNumColors = 0;
+            int* piNumColors = &iNumColors;
+
+            getOrCreateDefaultSubwin();
+            getGraphicObjectProperty(getCurrentFigure(), __GO_COLORMAP_SIZE__, jni_int, (void**)&piNumColors);
+
+            out.push_back(new types::Double((double)iNumColors));
+        }
+        break;
+        case 18 : // line mode
+        {
+            int iLineMode = 0;
+            int* lineMode = &iLineMode;
+
+            getGraphicObjectProperty(getOrCreateDefaultSubwin(), __GO_LINE_MODE__, jni_bool, (void **)&lineMode);
+
+            out.push_back(new types::Double((double)iLineMode));
+        }
+        break;
+        case 24 : // pixmap
+        {
+            int iPixmap = 0;
+            int *piPixmap = &iPixmap;
+
+            getOrCreateDefaultSubwin();
+            getGraphicObjectProperty(getCurrentFigure(), __GO_PIXMAP__, jni_bool, (void **)&piPixmap);
+
+            out.push_back(new types::Double((double)iPixmap));
+        }
+        break;
+        case 29 : // white
+        {
+            int iNumColors = 0;
+            int* piNumColors = &iNumColors;
+
+            getOrCreateDefaultSubwin();
+            getGraphicObjectProperty(getCurrentFigure(), __GO_COLORMAP_SIZE__, jni_int, (void**)&piNumColors);
+
+            /* White is lqst colormap index + 2 */
+            out.push_back(new types::Double((double)(iNumColors+ 2)));
+        }
+        break;
+        case 33 : // wresize
+        {
+            // autoresize property
+            int iAutoResize = 0;
+            int* piAutoResize =  &iAutoResize;
+
+            getOrCreateDefaultSubwin();
+            getGraphicObjectProperty(getCurrentFigure(), __GO_AUTORESIZE__, jni_bool, (void **)&piAutoResize);
+
+            out.push_back(new types::Double((double)iAutoResize));
+        }
+        break;
+        case 6 : // clipgrf
+        {
+            /* clip_state : 0 = off, 1 = on */
+            int iClipState = 0;
+            int* piClipState = &iClipState;
+
+            getGraphicObjectProperty(getOrCreateDefaultSubwin(), __GO_CLIP_STATE__, jni_int, (void**)&piClipState);
+
+            out.push_back(new types::Double((double)iClipState));
+        }
+        break;
+        case 4 : // clipoff
+        {
+            int iClipState = 0;
+            int* piClipState = &iClipState;
+
+            getGraphicObjectProperty(getOrCreateDefaultSubwin(), __GO_CLIP_STATE__, jni_int, (void**)&piClipState);
+
+            /* clip_state : 0 = off, 1 = on */
+            if (iClipState == 0)
+            {
+                out.push_back(new types::Double(1));
+            }
+            else
+            {
+                out.push_back(new types::Double(0));
+            }
+        }
+        break;
+        default :
+        {
+            char* pstWhat = wide_string_to_UTF8(pwcsWhat);
+            Scierror(999, _("%s: Unrecognized input argument: '%s'.\n"), "xget", pstWhat);
+            FREE(pstWhat);
+            return types::Function::Error;
+        }
+    }
+
+    return types::Function::OK;
+}
+/*--------------------------------------------------------------------------*/
diff --git a/scilab/modules/graphics/sci_gateway/cpp/sci_xset.cpp b/scilab/modules/graphics/sci_gateway/cpp/sci_xset.cpp
new file mode 100644 (file)
index 0000000..11fe163
--- /dev/null
@@ -0,0 +1,596 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) 2006 - INRIA - Fabrice Leray
+* Copyright (C) 2006 - INRIA - Jean-Baptiste Silvy
+* Copyright (C) 2012 - Scilab Enterprises - Bruno JOFRET
+* Copyright (C) 2013 - Scilab Enterprises - Cedric Delamarre
+*
+* 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.1-en.txt
+*
+*/
+
+/*------------------------------------------------------------------------*/
+/* file: sci_xset.cpp                                                      */
+/* desc : interface for xset routine                                      */
+/*------------------------------------------------------------------------*/
+#include "graphics_gw.hxx"
+#include "function.hxx"
+#include "double.hxx"
+#include "configvariable.hxx"
+#include "configgraphicvariable.hxx"
+#include "overload.hxx"
+#include "execvisitor.hxx"
+#include "internal.hxx"
+
+extern "C"
+{
+#include "GetProperty.h"
+#include "SetProperty.h"
+#include "DrawObjects.h"
+#include "localization.h"
+#include "Scierror.h"
+#include "HandleManagement.h"
+
+#include "BuildObjects.h"
+#include "graphicObjectProperties.h"
+#include "setGraphicObjectProperty.h"
+#include "FigureList.h"
+#include "CurrentFigure.h"
+#include "CurrentSubwin.h"
+#include "AxesModel.h"
+#include "getGraphicObjectProperty.h"
+#include "deleteGraphicObject.h"
+#include "warningmode.h"
+#include "sciprint.h"
+}
+/*--------------------------------------------------------------------------*/
+types::Function::ReturnValue sci_xset(types::typed_list &in, int _iRetCount, types::typed_list &out)
+{
+    wchar_t* pwcsWhat = NULL;
+    std::list<types::Double*> lpDblInputs;
+    char * subwinUID = NULL;
+
+    if (in.size() == 0)
+    {
+        return Overload::call(L"%_xset", in, _iRetCount, out, new ExecVisitor());
+    }
+
+    if (in.size() > 6)
+    {
+        Scierror(77, _("%s: Wrong number of input argument(s): %d to %d expected.\n"), "xset", 1, 6);
+        return types::Function::Error;
+    }
+
+    if (_iRetCount > 1)
+    {
+        Scierror(78, _("%s: Wrong number of output argument(s): %d expected.\n"), "xset", 1);
+        return types::Function::Error;
+    }
+
+    if (in[0]->isString() == false)
+    {
+        Scierror(999, _("%s: Wrong type for input argument #%d: A single string expected.\n"), "xset", 1);
+        return types::Function::Error;
+    }
+
+    types::String* pStr = in[0]->getAs<types::String>();
+
+    if (pStr->isScalar() == false)
+    {
+        Scierror(999, _("%s: Wrong type for input argument #%d: A single string expected.\n"), "xset", 1);
+        return types::Function::Error;
+    }
+
+    pwcsWhat = pStr->get(0);
+
+    if (ConfigGraphicVariable::bPropertyFound(pwcsWhat) == false)
+    {
+        char* pstWhat = wide_string_to_UTF8(pwcsWhat);
+        Scierror(999, _("%s: Unrecognized input argument: '%s'.\n"), "xset", pstWhat);
+        FREE(pstWhat);
+        return types::Function::Error;
+    }
+
+    if (in.size() == 2)
+    {
+        if (in[1]->isString())
+        {
+            types::String* pStrValue = in[1]->getAs<types::String>();
+
+            if (pStrValue->isScalar() == false)
+            {
+                Scierror(999, _("%s: Wrong type for input argument #%d: A single string expected.\n"), "xset", 2);
+                return types::Function::Error;
+            }
+
+            wchar_t* wcsValue = pStrValue->get(0);
+            switch (ConfigGraphicVariable::getPropertyValue(pwcsWhat))
+            {
+                case 15 : // fpf
+                {
+                    ConfigGraphicVariable::setFPF(wcsValue);
+                }
+                break;
+                case 2 : // auto clear
+                {
+                    int bAutoClear = 0;
+                    if (wcscmp(wcsValue, L"on") == 0)
+                    {
+                        bAutoClear = 1;
+                    }
+
+                    setGraphicObjectProperty(getOrCreateDefaultSubwin(), __GO_AUTO_CLEAR__, &bAutoClear, jni_bool, 1);
+                }
+                break;
+                default :
+                {
+                    char* pstWhat = wide_string_to_UTF8(pwcsWhat);
+                    Scierror(999, _("%s: Unrecognized input argument '%s'.\n"), "xset(arg,<string>)", pstWhat);
+                    FREE(pstWhat);
+                    return types::Function::Error;
+                }
+            }
+
+            return types::Function::OK;
+        }
+        else if (in[1]->isDouble() == false)
+        {
+            Scierror(999, _("%s: Wrong type for input argument #%d: A string or matrix expected.\n"), "xset", 2);
+            return types::Function::Error;
+        }
+    }
+
+    for (unsigned int i = 1 ; i < in.size() ; i++)
+    {
+        if (in[i]->isDouble() == false)
+        {
+            Scierror(202, _("%s: Wrong type for argument %d: A real expected.\n"), "xset", i + 1);
+        }
+    }
+
+    switch (ConfigGraphicVariable::getPropertyValue(pwcsWhat))
+    {
+        case 5 : // clipping
+        {
+            int clipState = 2;
+            double dvalues[4];
+            if (in.size() == 2)
+            {
+                types::Double* pDblArg = in[1]->getAs<types::Double>();
+                if (pDblArg->getSize() != 4)
+                {
+                    Scierror(999, _("%s: Wrong size for input argument #%d: A %d-element vector expected.\n"), "xset", 2, 4);
+                    return types::Function::Error;
+                }
+
+                memcpy(dvalues, pDblArg->get(), 4 * sizeof(double));
+            }
+            else if (in.size() != 5)
+            {
+                Scierror(999, _("%s: Wrong number of input arguments: %d or %d expected.\n"), "xset", 2, 5);
+                return types::Function::Error;
+            }
+            else
+            {
+                for (int i = 0; i < 4 ; i++)
+                {
+                    dvalues[i] = in[i + 1]->getAs<types::Double>()->get(0);
+                }
+            }
+
+            subwinUID = (char*)getOrCreateDefaultSubwin();
+            setGraphicObjectProperty(subwinUID, __GO_CLIP_BOX__, dvalues, jni_double_vector, 4);
+            setGraphicObjectProperty(subwinUID, __GO_CLIP_STATE__, &clipState, jni_int, 1);
+        }
+        break;
+        case 8 : // colormap
+        {
+            if (in.size() != 2)
+            {
+                Scierror(77, _("%s: Wrong number of input argument(s): %d expected.\n"), "xset", 2);
+                return types::Function::Error;
+            }
+
+            types::Double* pDblArg = in[1]->getAs<types::Double>();
+            getOrCreateDefaultSubwin();
+            setGraphicObjectProperty((char*)getCurrentFigure(), __GO_COLORMAP__, pDblArg->get(), jni_double_vector, pDblArg->getSize());
+        }
+        break;
+        case 21 : // mark size
+        {
+            if (in.size() != 2)
+            {
+                Scierror(77, _("%s: Wrong number of input argument(s): %d expected.\n"), "xset", 2);
+                return types::Function::Error;
+            }
+
+            int markSize = (int)in[1]->getAs<types::Double>()->get(0);
+            int markSizeUnit = 1; /* force switch to tabulated mode : old syntax / 0 : point, 1 : tabulated */
+
+            subwinUID = (char*)getOrCreateDefaultSubwin();
+            setGraphicObjectProperty(subwinUID, __GO_MARK_SIZE_UNIT__, &markSizeUnit, jni_int, 1);
+            setGraphicObjectProperty(subwinUID, __GO_MARK_SIZE__, &markSize, jni_int, 1);
+        }
+        break;
+        case 20 : // mark
+        {
+            if (in.size() != 3)
+            {
+                Scierror(999, _("%s: Wrong number of input arguments: %d expected.\n"), "xset", 3);
+                return types::Function::Error;
+            }
+
+            int markStyle = (int) in[1]->getAs<types::Double>()->get(0);
+            int markSize = (int) in[2]->getAs<types::Double>()->get(0);
+            int markSizeUnit = 1; /* force switch to tabulated mode : old syntax / 0 : point, 1 : tabulated */
+            int markMode = 1;
+
+            subwinUID = (char*)getOrCreateDefaultSubwin();
+            setGraphicObjectProperty(subwinUID, __GO_MARK_MODE__, &markMode, jni_bool, 1);
+            setGraphicObjectProperty(subwinUID, __GO_MARK_SIZE_UNIT__, &markSizeUnit, jni_int, 1); /* force switch to tabulated mode : old syntax */
+            setGraphicObjectProperty(subwinUID, __GO_MARK_STYLE__, &markStyle, jni_int, 1);
+            setGraphicObjectProperty(subwinUID, __GO_MARK_SIZE__, &markSize, jni_int, 1);
+        }
+        break;
+        case 13 : // font size
+        {
+            if (in.size() != 2)
+            {
+                Scierror(999, _("%s: Wrong number of input arguments: %d expected.\n"), "xset", 2);
+                return types::Function::Error;
+            }
+            double fontSize = in[1]->getAs<types::Double>()->get(0);
+            setGraphicObjectProperty(getOrCreateDefaultSubwin(), __GO_FONT_SIZE__, &fontSize, jni_double, 1);
+        }
+        break;
+        case 10 : // default
+        {
+            if (in.size() != 1)
+            {
+                Scierror(999, _("%s: Wrong number of input arguments: %d expected.\n"), "xset", 1);
+                return types::Function::Error;
+            }
+
+            unsigned short* defcolors = ConfigGraphicVariable::getDefaultColormap();
+
+            int piFigurePosition[2] = {200, 200};
+            int piFigureSize[2]     = {500, 500};
+            int piAxesSize[2]       = {498, 366};
+            int piViewPort[2]       = {0, 0};
+            int piEmptyMatrix[4]    = {1, 0, 0, 0};
+
+            // init variables
+            int iZero   = 0;
+            BOOL bTrue  = TRUE;
+            BOOL bFalse = FALSE;
+            int m       = NUMCOLORS_SCI;
+            int i       = 0;
+            int iCopy   = 3;
+            int defaultBackground = -2;
+
+            // reset format
+            ConfigGraphicVariable::setFPF(L'\0');
+
+            double* pdblColorMap = (double*)malloc(m * 3 * sizeof(double));
+            if (pdblColorMap == NULL)
+            {
+                Scierror(999, _("%s: No more memory.\n"), "xset");
+                return types::Function::Error;
+            }
+
+            // Create figure if it not exist.
+            char* pFigureUID = (char*)getCurrentFigure();
+            if (pFigureUID == NULL)
+            {
+                pFigureUID = createNewFigureWithAxes();
+                setCurrentFigure(pFigureUID);
+                return types::Function::OK;
+            }
+
+            // Create new axes and set it in current figure
+            char* pSubWinUID = (char*)getCurrentSubWin();
+            if (pSubWinUID != NULL)
+            {
+                int iChildrenCount  = 0;
+                int* childrencount  = &iChildrenCount;
+                char** childrenUID  = NULL;
+                int iHidden         = 0;
+                int *piHidden       = &iHidden;
+
+                getGraphicObjectProperty(pFigureUID, __GO_CHILDREN_COUNT__, jni_int, (void **)&childrencount);
+                getGraphicObjectProperty(pFigureUID, __GO_CHILDREN__, jni_string_vector, (void **)&childrenUID);
+
+                for (i = 0; i < childrencount[0]; ++i)
+                {
+                    getGraphicObjectProperty(childrenUID[i], __GO_HIDDEN__, jni_bool, (void **)&piHidden);
+                    if (iHidden == 0)
+                    {
+                        deleteGraphicObject(childrenUID[i]);
+                    }
+                }
+            }
+
+            cloneAxesModel(pFigureUID);
+
+            // Set default figure properties
+            setGraphicObjectProperty(pFigureUID, __GO_POSITION__, piFigurePosition, jni_int_vector, 2);
+            setGraphicObjectProperty(pFigureUID, __GO_SIZE__, piFigureSize, jni_int_vector, 2);
+            setGraphicObjectProperty(pFigureUID, __GO_AXES_SIZE__, piAxesSize, jni_int_vector, 2);
+            setGraphicObjectProperty(pFigureUID, __GO_AUTORESIZE__, &bTrue, jni_bool, 1);
+            setGraphicObjectProperty(pFigureUID, __GO_VIEWPORT__, piViewPort, jni_int_vector, 2);
+            setGraphicObjectProperty(pFigureUID, __GO_NAME__, _("Figure n°%d"), jni_string, 1);
+            setGraphicObjectProperty(pFigureUID, __GO_INFO_MESSAGE__, "", jni_string, 1);
+            setGraphicObjectProperty(pFigureUID, __GO_PIXMAP__, &bFalse, jni_bool, 1);
+            setGraphicObjectProperty(pFigureUID, __GO_PIXEL_DRAWING_MODE__, &iCopy, jni_int, 1);
+            setGraphicObjectProperty(pFigureUID, __GO_ANTIALIASING__, &iZero, jni_int, 1);
+            setGraphicObjectProperty(pFigureUID, __GO_IMMEDIATE_DRAWING__, &bTrue, jni_bool, 1);
+            setGraphicObjectProperty(pFigureUID, __GO_BACKGROUND__, &defaultBackground, jni_int, 1);
+            setGraphicObjectProperty(pFigureUID, __GO_VISIBLE__, &bTrue, jni_bool, 1);
+            setGraphicObjectProperty(pFigureUID, __GO_ROTATION_TYPE__, &iZero, jni_int, 1);
+            setGraphicObjectProperty(pFigureUID, __GO_EVENTHANDLER__, "", jni_string, 1);
+            setGraphicObjectProperty(pFigureUID, __GO_EVENTHANDLER_ENABLE__, &bFalse, jni_bool, 1);
+            setGraphicObjectProperty(pFigureUID, __GO_USER_DATA__, piEmptyMatrix, jni_int_vector, 4);
+            setGraphicObjectProperty(pFigureUID, __GO_RESIZEFCN__, "", jni_string, 1);
+            setGraphicObjectProperty(pFigureUID, __GO_TAG__, "", jni_string, 1);
+
+            for (i = 0; i < m; i++)
+            {
+                pdblColorMap[i]         = (double)(defcolors[3 * i] / 255.0);
+                pdblColorMap[i + m]     = (double)(defcolors[3 * i + 1] / 255.0);
+                pdblColorMap[i + 2 * m] = (double)(defcolors[3 * i + 2] / 255.0);
+            }
+
+            setGraphicObjectProperty(pFigureUID, __GO_COLORMAP__, pdblColorMap, jni_double_vector, 3 * m);
+            setGraphicObjectProperty(pFigureUID, __GO_PARENT__, "", jni_string, 1);
+        }
+        break;
+        case 6 : // clipgrf
+        {
+            int clipState = 1;
+            /* special treatement for xset("cligrf") */
+            setGraphicObjectProperty(getOrCreateDefaultSubwin(), __GO_CLIP_STATE__, &clipState, jni_int, 1);
+        }
+        break;
+        case 4 : // clipoff
+        {
+            int clipState = 0;
+            /* special treatement for xset("clipoff") */
+            setGraphicObjectProperty(getOrCreateDefaultSubwin(), __GO_CLIP_STATE__, &clipState, jni_int, 1);
+        }
+        break;
+        case 16 : // hidden3d
+        {
+            if (in.size() != 2)
+            {
+                Scierror(999, _("%s: Wrong number of input arguments: %d expected.\n"), "xset", 2);
+                return types::Function::Error;
+            }
+
+            int hiddenColor = (int) in[1]->getAs<types::Double>()->get(0);
+            setGraphicObjectProperty(getOrCreateDefaultSubwin(), __GO_HIDDEN_COLOR__, &hiddenColor, jni_int, 1);
+        }
+        break;
+        case 12 : // font
+        {
+            if (in.size() != 3)
+            {
+                Scierror(999, _("%s: Wrong number of input arguments: %d expected.\n"), "xset", 3);
+                return types::Function::Error;
+            }
+
+            int fontStyle = (int) in[1]->getAs<types::Double>()->get(0);
+            double fontSize = in[2]->getAs<types::Double>()->get(0);
+
+            setGraphicObjectProperty(getOrCreateDefaultSubwin(), __GO_FONT_SIZE__, &fontSize, jni_double, 1);
+            setGraphicObjectProperty(getOrCreateDefaultSubwin(), __GO_FONT_STYLE__, &fontStyle, jni_int, 1);
+        }
+        break;
+        case 11 : // window
+        case 30 : // figure
+        {
+            if (in.size() != 2)
+            {
+                Scierror(999, _("%s: Wrong number of input arguments: %d expected.\n"), "xset", 2);
+                return types::Function::Error;
+            }
+
+            // Find if window already exists, if not create a new one
+            int iID = (int)in[1]->getAs<types::Double>()->get(0);
+            char *pFigureUID = (char*)getFigureFromIndex(iID);
+
+            if (pFigureUID == NULL)
+            {
+                pFigureUID = createNewFigureWithAxes();
+                setGraphicObjectProperty(pFigureUID, __GO_ID__, &iID, jni_int, 1);
+                setCurrentFigure(pFigureUID);
+            }
+            setCurrentFigure(pFigureUID);
+        }
+        break;
+        case 14 : // foreground
+        case 7 : // color
+        case 23 : // pattern
+        {
+            if (in.size() != 2)
+            {
+                Scierror(999, _("%s: Wrong number of input arguments: %d expected.\n"), "xset", 2);
+                return types::Function::Error;
+            }
+
+            int iColor = (int) in[1]->getAs<types::Double>()->get(0);
+            setGraphicObjectProperty(getOrCreateDefaultSubwin(), __GO_LINE_COLOR__, &iColor, jni_int, 1);
+        }
+        break;
+        case 3 : // background
+        {
+            if (in.size() != 2)
+            {
+                Scierror(999, _("%s: Wrong number of input arguments: %d expected.\n"), "xset", 2);
+                return types::Function::Error;
+            }
+
+            int iColor = (int) in[1]->getAs<types::Double>()->get(0);
+            setGraphicObjectProperty(getOrCreateDefaultSubwin(), __GO_BACKGROUND__, &iColor, jni_int, 1);
+        }
+        break;
+        case 25 : // thickness
+        {
+            if (in.size() != 2)
+            {
+                Scierror(999, _("%s: Wrong number of input arguments: %d expected.\n"), "xset", 2);
+                return types::Function::Error;
+            }
+
+            sciSetLineWidth((char*)getOrCreateDefaultSubwin(), (int)in[1]->getAs<types::Double>()->get(0));
+        }
+        break;
+        case 19 : // line style
+        {
+            if (in.size() != 2)
+            {
+                Scierror(999, _("%s: Wrong number of input arguments: %d expected.\n"), "xset", 2);
+                return types::Function::Error;
+            }
+
+            int lineStyle = (int) in[1]->getAs<types::Double>()->get(0);
+            setGraphicObjectProperty(getOrCreateDefaultSubwin(), __GO_LINE_STYLE__, &lineStyle, jni_int, 1);
+        }
+        break;
+        case 9 : // dashes
+        {
+            if (in.size() != 2)
+            {
+                Scierror(999, _("%s: Wrong number of input arguments: %d expected.\n"), "xset", 2);
+                return types::Function::Error;
+            }
+
+            int lineStyle = (int) in[1]->getAs<types::Double>()->get(0);
+            setGraphicObjectProperty(getOrCreateDefaultSubwin(), __GO_LINE_STYLE__, &lineStyle, jni_int, 1);
+        }
+        break;
+        case 33 : // wresize
+        {
+            if (in.size() != 2)
+            {
+                Scierror(999, _("%s: Wrong number of input arguments: %d expected.\n"), "xset", 2);
+                return types::Function::Error;
+            }
+
+            int iAutoResizeMode = (int)in[1]->getAs<types::Double>()->get(0);
+            setGraphicObjectProperty(getOrCreateDefaultSubwin(), __GO_AUTORESIZE__, &iAutoResizeMode, jni_bool, 1);
+        }
+        break;
+        case 32 : // wpos
+        {
+            int figurePosition[2];
+            if (in.size() != 2)
+            {
+                Scierror(999, _("%s: Wrong number of input arguments: %d expected.\n"), "xset", 2);
+                return types::Function::Error;
+            }
+
+            getOrCreateDefaultSubwin();
+
+            figurePosition[0] = (int)in[1]->getAs<types::Double>()->get(0);
+            figurePosition[1] = (int)in[2]->getAs<types::Double>()->get(0);
+            setGraphicObjectProperty(getCurrentFigure(), __GO_POSITION__, figurePosition, jni_int_vector, 2);
+        }
+        break;
+        case 31 : // wpdim
+        case 28 : // wdim
+        {
+            int figureSize[2] = {0, 0};
+            if (in.size() != 2 && in.size() != 3)
+            {
+                Scierror(999, _("%s: Wrong number of input arguments: %d or %d expected.\n"), "xset", 2, 3);
+                return types::Function::Error;
+            }
+
+            figureSize[0] = (int)in[1]->getAs<types::Double>()->get(0);
+            if (in.size() == 3)
+            {
+                figureSize[1] = (int)in[2]->getAs<types::Double>()->get(0);
+            }
+
+            /* Xwindows limits dimensions to 2^16 */
+            if ((figureSize[0] > 65535) || (figureSize[1] > 65535))
+            {
+                figureSize[0] = Min(figureSize[0], 65535);
+                figureSize[1] = Min(figureSize[1], 65535);
+                if (ConfigVariable::getWarningMode())
+                {
+                    sciprint(_("%s: window dimensions have been set less than 2^16.\n"), "xset");
+                }
+            }
+
+            getOrCreateDefaultSubwin();
+            setGraphicObjectProperty(getCurrentFigure(), __GO_SIZE__, figureSize, jni_int_vector, 2);
+        }
+        break;
+        case 24 : // pixmap
+        {
+            if (in.size() != 2)
+            {
+                Scierror(999, _("%s: Wrong number of input arguments: %d expected.\n"), "xset", 2);
+                return types::Function::Error;
+            }
+
+            int iPixmapMode = (int)in[1]->getAs<types::Double>()->get(0);
+            getOrCreateDefaultSubwin();
+            setGraphicObjectProperty(getCurrentFigure(), __GO_PIXMAP__, &iPixmapMode, jni_bool, 1);
+        }
+        break;
+        case 27 : // viewport
+        {
+            if (in.size() != 3)
+            {
+                Scierror(999, _("%s: Wrong number of input arguments: %d expected.\n"), "xset", 3);
+                return types::Function::Error;
+            }
+
+            int viewport[4] = {0, 0, 0, 0};
+            viewport[0] = in[1]->getAs<types::Double>()->get(0);
+            viewport[1] = in[2]->getAs<types::Double>()->get(0);
+
+            getOrCreateDefaultSubwin();
+            setGraphicObjectProperty(getCurrentFigure(), __GO_VIEWPORT__, viewport, jni_int_vector, 2);
+        }
+        break;
+        case 18 : // line mode
+        {
+            if (in.size() != 2)
+            {
+                Scierror(999, _("%s: Wrong number of input arguments: %d expected.\n"), "xset", 2);
+                return types::Function::Error;
+            }
+
+            char *pstSubwinUID = (char*)getOrCreateDefaultSubwin();
+            int iZero = 0;
+            int iOne = 1;
+
+            if (in[1]->getAs<types::Double>()->get(0) == 0)
+            {
+                setGraphicObjectProperty(pstSubwinUID, __GO_LINE_MODE__, &iZero, jni_bool, 1);
+            }
+            else
+            {
+                setGraphicObjectProperty(pstSubwinUID, __GO_LINE_MODE__, &iOne, jni_bool, 1);
+            }
+        }
+        break;
+        default :
+        {
+            char* pstWhat = wide_string_to_UTF8(pwcsWhat);
+            Scierror(999, _("%s: Unrecognized input argument: '%s'.\n"), "xset", pstWhat);
+            FREE(pstWhat);
+            return types::Function::Error;
+        }
+    }
+
+    return types::Function::OK;
+}
+/*--------------------------------------------------------------------------*/
index 38df6c0..5f310eb 100644 (file)
@@ -20,6 +20,8 @@
 #ifndef _GET_HANDLE_PROPERTY_H_
 #define _GET_HANDLE_PROPERTY_H_
 
+#include "dynlib_graphics.h"
+
 #include "GetUimenuLabel.h"
 #include "GetUicontrolString.h"
 #include "GetUicontrolStyle.h"
 #include "GetConsoleShowHiddenHandles.h"
 #include "GetUicontrolTooltipString.h"
 
-void* get_figures_id_property(void* _pvCtx, char* pobjUID);
-void* get_visible_property(void* _pvCtx, char* pobjUID);
-void* get_pixel_drawing_mode_property(void* _pvCtx, char* pobjUID);
-void* get_old_style_property(void* _pvCtx, char* pobjUID);
-void* get_figure_style_property(void* _pvCtx, char* pobjUID);
-void* get_auto_resize_property(void* _pvCtx, char* pobjUID);
-void* get_figure_position_property(void* _pvCtx, char* pobjUID);
-void* get_axes_size_property(void* _pvCtx, char* pobjUID);
-void* get_figure_size_property(void* _pvCtx, char* pobjUID);
-void* get_figure_name_property(void* _pvCtx, char* pobjUID);
-void* get_figure_id_property(void* _pvCtx, char* pobjUID);
-void* get_figure_resizefcn_property(void* _pvCtx, char* pobjUID);
-void* get_figure_closerequestfcn_property(void* _pvCtx, char* pobjUID);
-void* get_rotation_style_property(void* _pvCtx, char* pobjUID);
-void* get_immediate_drawing_property(void* _pvCtx, char* pobjUID);
-void* get_pixmap_property(void* _pvCtx, char* pobjUID);
-void* get_type_property(void* _pvCtx, char* pobjUID);
-void* get_parent_property(void* _pvCtx, char* pobjUID);
-void* get_current_axes_property(void* _pvCtx, char* pobjUID);
-void* get_current_figure_property(void* _pvCtx, char* pobjUID);
-void* get_current_entity_property(void* _pvCtx, char* pobjUID);
-void* get_children_property(void* _pvCtx, char* pobjUID);
-void* get_default_figure_property(void* _pvCtx, char* pobjUID);
-void* get_default_axes_property(void* _pvCtx, char* pobjUID);
-void* get_color_map_property(void* _pvCtx, char* pobjUID);
-void* get_interp_color_vector_property(void* _pvCtx, char* pobjUID);
-void* get_interp_color_mode_property(void* _pvCtx, char* pobjUID);
-void* get_background_property(void* _pvCtx, char* pobjUID);
-void* get_foreground_property(void* _pvCtx, char* pobjUID);
-void* get_fill_mode_property(void* _pvCtx, char* pobjUID);
-void* get_thickness_property(void* _pvCtx, char* pobjUID);
-void* get_arrow_size_factor_property(void* _pvCtx, char* pobjUID);
-void* get_line_style_property(void* _pvCtx, char* pobjUID);
-void* get_line_mode_property(void* _pvCtx, char* pobjUID);
-void* get_surface_mode_property(void* _pvCtx, char* pobjUID);
-void* get_mark_style_property(void* _pvCtx, char* pobjUID);
-void* get_mark_mode_property(void* _pvCtx, char* pobjUID);
-void* get_mark_size_unit_property(void* _pvCtx, char* pobjUID);
-void* get_mark_size_property(void* _pvCtx, char* pobjUID);
-void* get_mark_foreground_property(void* _pvCtx, char* pobjUID);
-void* get_mark_background_property(void* _pvCtx, char* pobjUID);
-void* get_bar_layout_property(void* _pvCtx, char* pobjUID);
-void* get_bar_width_property(void* _pvCtx, char* pobjUID);
-void* get_x_shift_property(void* _pvCtx, char* pobjUID);
-void* get_y_shift_property(void* _pvCtx, char* pobjUID);
-void* get_z_shift_property(void* _pvCtx, char* pobjUID);
-void* get_polyline_style_property(void* _pvCtx, char* pobjUID);
-void* get_font_size_property(void* _pvCtx, char* pobjUID);
-void* get_font_angle_property(void* _pvCtx, char* pobjUID);
-void* get_font_foreground_property(void* _pvCtx, char* pobjUID);
-void* get_font_color_property(void* _pvCtx, char* pobjUID);
-void* get_font_style_property(void* _pvCtx, char* pobjUID);
-void* get_text_box_mode_property(void* _pvCtx, char* pobjUID);
-void* get_auto_dimensionning_property(void* _pvCtx, char* pobjUID);
-void* get_alignment_property(void* _pvCtx, char* pobjUID);
-void* get_text_box_property(void* _pvCtx, char* pobjUID);
-void* get_text_property(void* _pvCtx, char* pobjUID);
-void* get_auto_clear_property(void* _pvCtx, char* pobjUID);
-void* get_auto_scale_property(void* _pvCtx, char* pobjUID);
-void* get_zoom_box_property(void* _pvCtx, char* pobjUID);
-void* get_zoom_state_property(void* _pvCtx, char* pobjUID);
-void* get_clip_box_property(void* _pvCtx, char* pobjUID);
-void* get_clip_state_property(void* _pvCtx, char* pobjUID);
-void* get_data_property(void* _pvCtx, char* pobjUID);
-void* get_callback_property(void* _pvCtx, char* pobjUID);
-void* get_x_label_property(void* _pvCtx, char* pobjUID);
-void* get_y_label_property(void* _pvCtx, char* pobjUID);
-void* get_z_label_property(void* _pvCtx, char* pobjUID);
-void* get_title_property(void* _pvCtx, char* pobjUID);
-void* get_log_flags_property(void* _pvCtx, char* pobjUID);
-void* get_tics_direction_property(void* _pvCtx, char* pobjUID);
-void* get_x_location_property(void* _pvCtx, char* pobjUID);
-void* get_y_location_property(void* _pvCtx, char* pobjUID);
-void* get_tight_limits_property(void* _pvCtx, char* pobjUID);
-void* get_closed_property(void* _pvCtx, char* pobjUID);
-void* get_auto_position_property(void* _pvCtx, char* pobjUID);
-void* get_auto_rotation_property(void* _pvCtx, char* pobjUID);
-void* get_position_property(void* _pvCtx, char* pobjUID);
-void* get_auto_ticks_property(void* _pvCtx, char* pobjUID);
-void* get_axes_reverse_property(void* _pvCtx, char* pobjUID);
-void* get_view_property(void* _pvCtx, char* pobjUID);
-void* get_axes_bounds_property(void* _pvCtx, char* pobjUID);
-void* get_data_bounds_property(void* _pvCtx, char* pobjUID);
-void* get_margins_property(void* _pvCtx, char* pobjUID);
-void* get_tics_color_property(void* _pvCtx, char* pobjUID);
-void* get_tics_style_property(void* _pvCtx, char* pobjUID);
-void* get_sub_tics_property(void* _pvCtx, char* pobjUID);
-void* get_tics_segment_property(void* _pvCtx, char* pobjUID);
-void* get_labels_font_size_property(void* _pvCtx, char* pobjUID);
-void* get_labels_font_color_property(void* _pvCtx, char* pobjUID);
-void* get_labels_font_style_property(void* _pvCtx, char* pobjUID);
-void* get_format_n_property(void* _pvCtx, char* pobjUID);
-void* get_xtics_coord_property(void* _pvCtx, char* pobjUID);
-void* get_ytics_coord_property(void* _pvCtx, char* pobjUID);
-void* get_tics_labels_property(void* _pvCtx, char* pobjUID);
-void* get_box_property(void* _pvCtx, char* pobjUID);
-void* get_grid_property(void* _pvCtx, char* pobjUID);
-void* get_axes_visible_property(void* _pvCtx, char* pobjUID);
-void* get_hidden_color_property(void* _pvCtx, char* pobjUID);
-void* get_isoview_property(void* _pvCtx, char* pobjUID);
-void* get_cube_scaling_property(void* _pvCtx, char* pobjUID);
-void* get_arrow_size_property(void* _pvCtx, char* pobjUID);
-void* get_segs_color_property(void* _pvCtx, char* pobjUID);
-void* get_colored_property(void* _pvCtx, char* pobjUID);
-void* get_data_mapping_property(void* _pvCtx, char* pobjUID);
-void* get_rotation_angles_property(void* _pvCtx, char* pobjUID);
-void* get_color_mode_property(void* _pvCtx, char* pobjUID);
-void* get_color_flag_property(void* _pvCtx, char* pobjUID);
-void* get_cdata_mapping_property(void* _pvCtx, char* pobjUID);
-void* get_surface_color_property(void* _pvCtx, char* pobjUID);
-void* get_triangles_property(void* _pvCtx, char* pobjUID);
-void* get_z_bounds_property(void* _pvCtx, char* pobjUID);
-void* get_user_data_property(void* _pvCtx, char* pobjUID);
-void* get_handle_visible_property(void* _pvCtx, char* pobjUID);
-void* get_callback_type_property(void* _pvCtx, char* pobjUID);
-void* get_hidden_axis_color_property(void* _pvCtx, char* pobjUID);
-void* get_x_ticks_property(void* _pvCtx, char* pobjUID);
-void* get_y_ticks_property(void* _pvCtx, char* pobjUID);
-void* get_z_ticks_property(void* _pvCtx, char* pobjUID);
-void* get_viewport_property(void* _pvCtx, char* pobjUID);
-void* get_info_message_property(void* _pvCtx, char* pobjUID);
-void* get_screen_position_property(void* _pvCtx, char* pobjUID);
-void* get_event_handler_enable_property(void* _pvCtx, char* pobjUID);
-void* get_event_handler_property(void* _pvCtx, char* pobjUID);
-void* get_arc_drawing_method_property(void* _pvCtx, char* pobjUID);
-void* get_fractional_font_property(void* _pvCtx, char* pobjUID);
-void* get_links_property(void* _pvCtx, char* pobjUID);
-void* get_legend_location_property(void* _pvCtx, char* pobjUID);
-void* get_filled_property(void* _pvCtx, char* pobjUID);
-void* get_color_range_property(void* _pvCtx, char* pobjUID);
-void* get_outside_colors_property(void* _pvCtx, char* pobjUID);
-void* get_grid_position_property(void* _pvCtx, char* pobjUID);
-void* get_anti_aliasing_property(void* _pvCtx, char* pobjUID);
-void* get_tag_property(void* _pvCtx, char* pobjUID);
-void* get_UID(void* _pvCtx, char *pobjUID);
-void* get_image_type_property(void* _pvCtx, char* pobjUID);
-void* get_video_mode_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_figures_id_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_visible_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_pixel_drawing_mode_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_old_style_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_figure_style_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_auto_resize_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_figure_position_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_axes_size_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_figure_size_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_figure_name_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_figure_id_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_figure_resizefcn_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_figure_closerequestfcn_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_rotation_style_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_immediate_drawing_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_pixmap_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_type_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_parent_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_current_axes_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_current_figure_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_current_entity_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_children_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_default_figure_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_default_axes_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_color_map_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_interp_color_vector_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_interp_color_mode_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_background_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_foreground_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_fill_mode_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_thickness_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_arrow_size_factor_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_line_style_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_line_mode_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_surface_mode_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_mark_style_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_mark_mode_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_mark_size_unit_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_mark_size_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_mark_foreground_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_mark_background_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_bar_layout_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_bar_width_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_x_shift_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_y_shift_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_z_shift_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_polyline_style_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_font_size_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_font_angle_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_font_foreground_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_font_color_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_font_style_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_text_box_mode_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_auto_dimensionning_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_alignment_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_text_box_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_text_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_auto_clear_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_auto_scale_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_zoom_box_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_zoom_state_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_clip_box_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_clip_state_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_data_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_callback_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_x_label_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_y_label_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_z_label_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_title_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_log_flags_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_tics_direction_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_x_location_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_y_location_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_tight_limits_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_closed_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_auto_position_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_auto_rotation_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_position_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_auto_ticks_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_axes_reverse_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_view_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_axes_bounds_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_data_bounds_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_margins_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_tics_color_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_tics_style_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_sub_tics_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_tics_segment_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_labels_font_size_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_labels_font_color_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_labels_font_style_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_format_n_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_xtics_coord_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_ytics_coord_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_tics_labels_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_box_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_grid_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_axes_visible_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_hidden_color_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_isoview_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_cube_scaling_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_arrow_size_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_segs_color_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_colored_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_data_mapping_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_rotation_angles_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_color_mode_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_color_flag_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_cdata_mapping_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_surface_color_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_triangles_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_z_bounds_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_user_data_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_handle_visible_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_callback_type_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_hidden_axis_color_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_x_ticks_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_y_ticks_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_z_ticks_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_viewport_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_info_message_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_screen_position_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_event_handler_enable_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_event_handler_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_arc_drawing_method_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_fractional_font_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_links_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_legend_location_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_filled_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_color_range_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_outside_colors_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_grid_position_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_anti_aliasing_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_tag_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_UID(void* _pvCtx, char *pobjUID);
+GRAPHICS_IMPEXP void* get_image_type_property(void* _pvCtx, char* pobjUID);
+GRAPHICS_IMPEXP void* get_video_mode_property(void* _pvCtx, char* pobjUID);
 
 #endif /* _GET_HANDLE_PROPERTY_H_ */
diff --git a/scilab/modules/graphics/src/cpp/configgraphicvariable.cpp b/scilab/modules/graphics/src/cpp/configgraphicvariable.cpp
new file mode 100644 (file)
index 0000000..4fda7bf
--- /dev/null
@@ -0,0 +1,176 @@
+/*
+*  Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+*  Copyright (C) 2013 - Scilab Enterprises - Cedric Delamarre
+*
+*  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
+*
+*/
+#include <string.h> // memcpy
+#include "configgraphicvariable.hxx"
+
+/*
+** FPF
+** \{
+*/
+
+std::wstring ConfigGraphicVariable::m_wstFPF;
+
+void ConfigGraphicVariable::setFPF(std::wstring _wstFPF)
+{
+    m_wstFPF = _wstFPF;
+}
+
+std::wstring ConfigGraphicVariable::getFPF()
+{
+    return m_wstFPF;
+}
+
+/*
+** \}
+*/
+
+/*
+** Key Tab
+** \{
+*/
+
+std::map<std::wstring, int> ConfigGraphicVariable::m_mapProperties;
+
+void ConfigGraphicVariable::fillProperties()
+{
+    if(m_mapProperties.empty())
+    {
+        m_mapProperties[std::wstring(L"alufunction")]   = 1;
+        m_mapProperties[std::wstring(L"auto clear")]    = 2;
+        m_mapProperties[std::wstring(L"background")]    = 3;
+        m_mapProperties[std::wstring(L"clipoff")]       = 4;
+        m_mapProperties[std::wstring(L"clipping")]      = 5;
+        m_mapProperties[std::wstring(L"clipgrf")]       = 6;
+        m_mapProperties[std::wstring(L"color")]         = 7;
+        m_mapProperties[std::wstring(L"colormap")]      = 8;
+        m_mapProperties[std::wstring(L"dashes")]        = 9;
+        m_mapProperties[std::wstring(L"default")]       = 10;
+        m_mapProperties[std::wstring(L"figure")]        = 11;
+        m_mapProperties[std::wstring(L"font")]          = 12;
+        m_mapProperties[std::wstring(L"font size")]     = 13;
+        m_mapProperties[std::wstring(L"foreground")]    = 14;
+        m_mapProperties[std::wstring(L"fpf")]           = 15;
+        m_mapProperties[std::wstring(L"hidden3d")]      = 16;
+        m_mapProperties[std::wstring(L"lastpattern")]   = 17;
+        m_mapProperties[std::wstring(L"line mode")]     = 18;
+        m_mapProperties[std::wstring(L"line style")]    = 19;
+        m_mapProperties[std::wstring(L"mark")]          = 20;
+        m_mapProperties[std::wstring(L"mark size")]     = 21;
+        m_mapProperties[std::wstring(L"old_style")]     = 22;
+        m_mapProperties[std::wstring(L"pattern")]       = 23;
+        m_mapProperties[std::wstring(L"pixmap")]        = 24;
+        m_mapProperties[std::wstring(L"thickness")]     = 25;
+        m_mapProperties[std::wstring(L"use color")]     = 26;
+        m_mapProperties[std::wstring(L"viewport")]      = 27;
+        m_mapProperties[std::wstring(L"wdim")]          = 28;
+        m_mapProperties[std::wstring(L"white")]         = 29;
+        m_mapProperties[std::wstring(L"window")]        = 30;
+        m_mapProperties[std::wstring(L"wpdim")]         = 31;
+        m_mapProperties[std::wstring(L"wpos")]          = 32;
+        m_mapProperties[std::wstring(L"wresize")]       = 33;
+//        m_mapProperties[std::wstring(L" ")]             = 34; /* added */
+    }
+}
+
+int ConfigGraphicVariable::getPropertyValue(wchar_t* _wcsKey)
+{
+    fillProperties();
+    std::map<std::wstring, int>::iterator it;
+    it = m_mapProperties.find(_wcsKey);
+    if(it != m_mapProperties.end())
+    {
+        return it->second;
+    }
+
+    return 0;
+}
+
+bool ConfigGraphicVariable::bPropertyFound(wchar_t* _wcsKey)
+{
+    fillProperties();
+    if(m_mapProperties.find(_wcsKey) != m_mapProperties.end())
+    {
+        return true;
+    }
+
+    return false;
+}
+
+/*
+** \}
+*/
+
+
+/*
+** Colormap
+** \{
+*/
+
+unsigned short* ConfigGraphicVariable::m_siColormap = NULL;
+
+void ConfigGraphicVariable::initColormap()
+{
+    if(m_siColormap == NULL)
+    {
+        m_siColormap = new unsigned short[3 * NUMCOLORS_SCI];
+
+        // default color map
+        unsigned short defcolors[] =
+        {
+            0, 0, 0,                    /* Black: DEFAULTBLACK */
+            0, 0, 255,                  /* Blue */
+            0, 255, 0,                  /* Green */
+            0, 255, 255,                /* Cyan */
+            255, 0, 0,                  /* Red */
+            255, 0, 255,                /* Magenta */
+            255, 255, 0,                /* Yellow */
+            255, 255, 255,              /* White: DEFAULTWHITE */
+            0, 0, 144,                  /* Blue4 */
+            0, 0, 176,                  /* Blue3 */
+            0, 0, 208,                  /* Blue2 */
+            135, 206, 255,              /* LtBlue */
+            0, 144, 0,                  /* Green4 */
+            0, 176, 0,                  /* Green3 */
+            0, 208, 0,                  /* Green2 */
+            0, 144, 144,                /* Cyan4 */
+            0, 176, 176,                /* Cyan3 */
+            0, 208, 208,                /* Cyan2 */
+            144, 0, 0,                  /* Red4 */
+            176, 0, 0,                  /* Red3 */
+            208, 0, 0,                  /* Red2 */
+            144, 0, 144,                /* Magenta4 */
+            176, 0, 176,                /* Magenta3 */
+            208, 0, 208,                /* Magenta2 */
+            128, 48, 0,                 /* Brown4 */
+            160, 64, 0,                 /* Brown3 */
+            192, 96, 0,                 /* Brown2 */
+            255, 128, 128,              /* Pink4 */
+            255, 160, 160,              /* Pink3 */
+            255, 192, 192,              /* Pink2 */
+            255, 224, 224,              /* Pink */
+            255, 215, 0                 /* Gold */
+        };
+
+        memcpy(m_siColormap, defcolors, 3 * NUMCOLORS_SCI * sizeof(short));
+    }
+}
+
+unsigned short* ConfigGraphicVariable::getDefaultColormap()
+{
+    initColormap();
+    return m_siColormap;
+}
+
+/*
+** \}
+*/
+
diff --git a/scilab/modules/graphics/src/cpp/configgraphicvariable.hxx b/scilab/modules/graphics/src/cpp/configgraphicvariable.hxx
new file mode 100644 (file)
index 0000000..dab9aad
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+*  Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+*  Copyright (C) 2013 - Scilab Enterprises - Cedric Delamarre
+*
+*  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 __CONFIGGRAPHICVARIABLE_HXX__
+#define __CONFIGGRAPHICVARIABLE_HXX__
+
+#include <string>
+#include <map>
+
+#define NUMCOLORS_SCI 32
+
+extern "C"
+{
+#include "dynlib_graphics.h"
+}
+
+class GRAPHICS_IMPEXP ConfigGraphicVariable
+{
+    //FPF
+private :
+    static std::wstring m_wstFPF;
+
+public :
+    static void setFPF(std::wstring _wstFPF);
+    static std::wstring getFPF();
+
+    //KeyTab_, graphic properties
+private :
+    static std::map<std::wstring, int> m_mapProperties;
+    static void fillProperties();
+
+public :
+    static bool bPropertyFound(wchar_t* _wcsKey);
+    static int getPropertyValue(wchar_t* _wcsKey);
+
+    //color map
+private :
+    static unsigned short* m_siColormap;
+    static void initColormap();
+
+public :
+    static unsigned short* getDefaultColormap();
+
+
+};
+
+#endif /* !__CONFIGGRAPHICVARIABLE_HXX__ */