Figure properties set functions updated: properties names strings 42/1342/3
Manuel Juliachs [Fri, 16 Jul 2010 09:43:05 +0000 (11:43 +0200)]
replaced by the corresponding pre-defined constants.

Change-Id: I40aa49538928a043aa65bc37653502171244a506

14 files changed:
scilab/modules/graphics/src/c/getHandleProperty/set_anti_aliasing_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_background_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_color_map_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_event_handler_enable_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_event_handler_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_figure_size_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_immediate_drawing_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_info_message_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_pixel_drawing_mode_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_pixmap_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_rotation_style_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_screen_position_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_user_data_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_visible_property.c

index afeb28c..3b24811 100644 (file)
@@ -30,6 +30,7 @@
 #include "GraphicSynchronizerInterface.h"
 
 #include "setGraphicObjectProperty.h"
+#include "graphicObjectProperties.h"
 
 /*------------------------------------------------------------------------*/
 int set_anti_aliasing_property( sciPointObj * pobj, size_t stackPointer, int valueType, int nbRow, int nbCol )
@@ -52,7 +53,7 @@ int set_anti_aliasing_property( sciPointObj * pobj, size_t stackPointer, int val
 
   if ( isStringParamEqual( stackPointer, "off" ) )
   {
-               quality = 0;
+    quality = 0;
   }
   else if ( isStringParamEqual( stackPointer, "2x" ) )
   {
@@ -76,7 +77,7 @@ int set_anti_aliasing_property( sciPointObj * pobj, size_t stackPointer, int val
     return SET_PROPERTY_ERROR ;
   }
 
-  status = setGraphicObjectProperty(pobj->UID, "Antialiasing", &quality, jni_int, 1);
+  status = setGraphicObjectProperty(pobj->UID, __GO_ANTIALIASING__, &quality, jni_int, 1);
 
   if (status == TRUE)
   {
index ba151b2..d371816 100644 (file)
@@ -28,6 +28,7 @@
 #include "SetPropertyStatus.h"
 
 #include "setGraphicObjectProperty.h"
+#include "graphicObjectProperties.h"
 
 /*------------------------------------------------------------------------*/
 int set_background_property( sciPointObj * pobj, size_t stackPointer, int valueType, int nbRow, int nbCol )
@@ -43,7 +44,7 @@ int set_background_property( sciPointObj * pobj, size_t stackPointer, int valueT
 
   value = (int)getDoubleFromStack(stackPointer);
 
-  status = setGraphicObjectProperty(pobj->UID, "Background", &value, jni_int, 1);
+  status = setGraphicObjectProperty(pobj->UID, __GO_BACKGROUND__, &value, jni_int, 1);
 
   if (status == TRUE)
   {
index ec4000c..027ee31 100644 (file)
@@ -28,6 +28,7 @@
 #include "SetPropertyStatus.h"
 
 #include "setGraphicObjectProperty.h"
+#include "graphicObjectProperties.h"
 
 /*------------------------------------------------------------------------*/
 int set_color_map_property( sciPointObj * pobj, size_t stackPointer, int valueType, int nbRow, int nbCol )
@@ -40,7 +41,7 @@ int set_color_map_property( sciPointObj * pobj, size_t stackPointer, int valueTy
     return SET_PROPERTY_ERROR ;
   }
 
-  status = setGraphicObjectProperty(pobj->UID, "ColorMap", getDoubleMatrixFromStack(stackPointer), jni_double_vector, nbRow*nbCol);
+  status = setGraphicObjectProperty(pobj->UID, __GO_COLORMAP__, getDoubleMatrixFromStack(stackPointer), jni_double_vector, nbRow*nbCol);
 
   if (status == TRUE)
   {
index 653df10..d5fc7e0 100644 (file)
@@ -27,6 +27,7 @@
 #include "localization.h"
 
 #include "setGraphicObjectProperty.h"
+#include "graphicObjectProperties.h"
 
 /*------------------------------------------------------------------------*/
 int set_event_handler_enable_property( sciPointObj * pobj, size_t stackPointer, int valueType, int nbRow, int nbCol )
@@ -43,7 +44,7 @@ int set_event_handler_enable_property( sciPointObj * pobj, size_t stackPointer,
        b =  tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "event_handler_enable");
        if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
 
-       status = setGraphicObjectProperty(pobj->UID, "EventHandlerEnable", &b, jni_bool, 1);
+       status = setGraphicObjectProperty(pobj->UID, __GO_EVENTHANDLER_ENABLE__, &b, jni_bool, 1);
 
        if (status == TRUE)
        {
index eb77689..3d07058 100644 (file)
@@ -27,6 +27,7 @@
 #include "localization.h"
 
 #include "setGraphicObjectProperty.h"
+#include "graphicObjectProperties.h"
 
 /*------------------------------------------------------------------------*/
 int set_event_handler_property( sciPointObj * pobj, size_t stackPointer, int valueType, int nbRow, int nbCol )
@@ -45,7 +46,7 @@ int set_event_handler_property( sciPointObj * pobj, size_t stackPointer, int val
     return SET_PROPERTY_ERROR ;
   }
 
-  status = setGraphicObjectProperty(pobj->UID, "EventHandlerName", getStringFromStack(stackPointer), jni_string, 1);
+  status = setGraphicObjectProperty(pobj->UID, __GO_EVENTHANDLER_NAME__, getStringFromStack(stackPointer), jni_string, 1);
 
   if (status == TRUE)
   {
index 500bcb7..985de4a 100644 (file)
@@ -30,6 +30,7 @@
 #include "GraphicSynchronizerInterface.h"
 
 #include "setGraphicObjectProperty.h"
+#include "graphicObjectProperties.h"
 
 /*------------------------------------------------------------------------*/
 int set_figure_size_property( sciPointObj * pobj, size_t stackPointer, int valueType, int nbRow, int nbCol )
@@ -58,7 +59,7 @@ int set_figure_size_property( sciPointObj * pobj, size_t stackPointer, int value
   intValues[0] = (int)values[0];
   intValues[1] = (int)values[1];
 
-  status = setGraphicObjectProperty(pobj->UID, "Size", intValues, jni_int_vector, 2);
+  status = setGraphicObjectProperty(pobj->UID, __GO_SIZE__, intValues, jni_int_vector, 2);
 
   if (status == TRUE)
   {
index 0408278..e45f903 100644 (file)
@@ -28,6 +28,7 @@
 #include "SetPropertyStatus.h"
 
 #include "setGraphicObjectProperty.h"
+#include "graphicObjectProperties.h"
 
 /*------------------------------------------------------------------------*/
 int set_immediate_drawing_property( sciPointObj * pobj, size_t stackPointer, int valueType, int nbRow, int nbCol )
@@ -37,14 +38,14 @@ int set_immediate_drawing_property( sciPointObj * pobj, size_t stackPointer, int
 
        if ( sciGetEntityType (pobj) != SCI_FIGURE )
        {
-    Scierror(999, _("'%s' property does not exist for this handle.\n"),"immediate_drawing");
+               Scierror(999, _("'%s' property does not exist for this handle.\n"),"immediate_drawing");
                return SET_PROPERTY_ERROR ;
        }
 
        b = tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "immediate_drawing");
        if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
 
-       status = setGraphicObjectProperty(pobj->UID, "ImmediateDrawing", &b, jni_bool, 1);
+       status = setGraphicObjectProperty(pobj->UID, __GO_IMMEDIATE_DRAWING__, &b, jni_bool, 1);
 
        if (status == TRUE)
        {
index ee3a9fa..7519950 100644 (file)
@@ -29,6 +29,7 @@
 #include "GraphicSynchronizerInterface.h"
 
 #include "setGraphicObjectProperty.h"
+#include "graphicObjectProperties.h"
 
 /*------------------------------------------------------------------------*/
 int set_info_message_property( sciPointObj * pobj, size_t stackPointer, int valueType, int nbRow, int nbCol )
@@ -46,7 +47,7 @@ int set_info_message_property( sciPointObj * pobj, size_t stackPointer, int valu
     return SET_PROPERTY_ERROR ;
   }
 
-  status = setGraphicObjectProperty(pobj->UID, "InfoMessage", getStringFromStack( stackPointer ), jni_string, 1);
+  status = setGraphicObjectProperty(pobj->UID, __GO_INFO_MESSAGE__, getStringFromStack( stackPointer ), jni_string, 1);
 
   if (status == TRUE)
   {
index d4fbf94..f8b9283 100644 (file)
@@ -29,6 +29,7 @@
 #include "SetPropertyStatus.h"
 
 #include "setGraphicObjectProperty.h"
+#include "graphicObjectProperties.h"
 
 /*------------------------------------------------------------------------*/
 int set_pixel_drawing_mode_property( sciPointObj * pobj, size_t stackPointer, int valueType, int nbRow, int nbCol )
@@ -55,7 +56,7 @@ int set_pixel_drawing_mode_property( sciPointObj * pobj, size_t stackPointer, in
          return SET_PROPERTY_ERROR ;
   }
 
-  status = setGraphicObjectProperty(pobj->UID, "PixelDrawingMode", &v, jni_int, 1);
+  status = setGraphicObjectProperty(pobj->UID, __GO_PIXEL_DRAWING_MODE__, &v, jni_int, 1);
 
   if (status == TRUE)
   {
index 78a855b..f994412 100644 (file)
@@ -28,6 +28,7 @@
 #include "SetPropertyStatus.h"
 
 #include "setGraphicObjectProperty.h"
+#include "graphicObjectProperties.h"
 
 /*------------------------------------------------------------------------*/
 int set_pixmap_property( sciPointObj * pobj, size_t stackPointer, int valueType, int nbRow, int nbCol )
@@ -44,7 +45,7 @@ int set_pixmap_property( sciPointObj * pobj, size_t stackPointer, int valueType,
        b = tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "pixmap");
        if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
 
-       status = setGraphicObjectProperty(pobj->UID, "Pixmap", &b, jni_bool, 1);
+       status = setGraphicObjectProperty(pobj->UID, __GO_PIXMAP__, &b, jni_bool, 1);
 
        if (status == TRUE)
        {
index 4039738..0fa0205 100644 (file)
@@ -28,6 +28,7 @@
 #include "SetPropertyStatus.h"
 
 #include "setGraphicObjectProperty.h"
+#include "graphicObjectProperties.h"
 
 /*------------------------------------------------------------------------*/
 int set_rotation_style_property( sciPointObj * pobj, size_t stackPointer, int valueType, int nbRow, int nbCol )
@@ -65,7 +66,7 @@ int set_rotation_style_property( sciPointObj * pobj, size_t stackPointer, int va
   }
 
 
-  status = setGraphicObjectProperty(pobj->UID, "RotationType", &rotationStyle, jni_int, 1);
+  status = setGraphicObjectProperty(pobj->UID, __GO_ROTATION_TYPE__, &rotationStyle, jni_int, 1);
 
   if (status == TRUE)
   {
index a306fa3..a43cae7 100644 (file)
@@ -29,6 +29,7 @@
 #include "GraphicSynchronizerInterface.h"
 
 #include "setGraphicObjectProperty.h"
+#include "graphicObjectProperties.h"
 
 /*------------------------------------------------------------------------*/
 int set_screen_position_property( sciPointObj * pobj, size_t stackPointer, int valueType, int nbRow, int nbCol )
@@ -61,7 +62,7 @@ int set_screen_position_property( sciPointObj * pobj, size_t stackPointer, int v
   intValues[0] = (int)values[0];
   intValues[1] = (int)values[1];
 
-  status = setGraphicObjectProperty(pobj->UID, "Position", intValues, jni_int_vector, 2);
+  status = setGraphicObjectProperty(pobj->UID, __GO_POSITION__, intValues, jni_int_vector, 2);
 
   if(status == TRUE)
   {
index 29287af..3a8c318 100644 (file)
@@ -30,6 +30,7 @@
 #include "BasicAlgos.h"
 
 #include "getGraphicObjectProperty.h"
+#include "graphicObjectProperties.h"
 
 /*------------------------------------------------------------------------*/
 int set_user_data_property( sciPointObj * pobj, size_t stackPointer,  int valueType, int nbRow, int nbCol )
@@ -62,7 +63,7 @@ int set_user_data_property( sciPointObj * pobj, size_t stackPointer,  int valueT
                }
        }
 
-       status = setGraphicObjectProperty(pobj->UID, "UserData", data_ptr, jni_int_vector, data_size);
+       status = setGraphicObjectProperty(pobj->UID, __GO_USER_DATA__, data_ptr, jni_int_vector, data_size);
 
        if (status == TRUE)
        {
index 0dd1643..c966307 100644 (file)
@@ -30,6 +30,7 @@
 #include "BOOL.h"
 
 #include "setGraphicObjectProperty.h"
+#include "graphicObjectProperties.h"
 
 /*------------------------------------------------------------------------*/
 int set_visible_property( sciPointObj * pobj, size_t stackPointer, int valueType, int nbRow, int nbCol )
@@ -45,7 +46,7 @@ int set_visible_property( sciPointObj * pobj, size_t stackPointer, int valueType
        b =  tryGetBooleanValueFromStack(stackPointer, valueType, nbRow, nbCol, "visible");
        if(b == NOT_A_BOOLEAN_VALUE) return SET_PROPERTY_ERROR;
 
-       status = setGraphicObjectProperty(pobj->UID, "Visible", &b, jni_bool, 1);
+       status = setGraphicObjectProperty(pobj->UID, __GO_VISIBLE__, &b, jni_bool, 1);
 
        if (status == TRUE)
        {