Crete new files for sci_set functions.
Jean-baptiste Silvy [Fri, 29 Sep 2006 08:02:59 +0000 (08:02 +0000)]
16 files changed:
scilab/modules/graphics/graphics.vcproj
scilab/modules/graphics/sci_gateway/sci_set.c
scilab/modules/graphics/src/c/getHandleProperty/setHandleProperty.h
scilab/modules/graphics/src/c/getHandleProperty/set_auto_position_property.c [new file with mode: 0644]
scilab/modules/graphics/src/c/getHandleProperty/set_auto_rotation_property.c [new file with mode: 0644]
scilab/modules/graphics/src/c/getHandleProperty/set_callback_property.c [new file with mode: 0644]
scilab/modules/graphics/src/c/getHandleProperty/set_callbackmevent_property.c [new file with mode: 0644]
scilab/modules/graphics/src/c/getHandleProperty/set_closed_property.c [new file with mode: 0644]
scilab/modules/graphics/src/c/getHandleProperty/set_tics_direction_property.c [new file with mode: 0644]
scilab/modules/graphics/src/c/getHandleProperty/set_tight_limits_property.c [new file with mode: 0644]
scilab/modules/graphics/src/c/getHandleProperty/set_title_property.c [new file with mode: 0644]
scilab/modules/graphics/src/c/getHandleProperty/set_x_label_property.c [new file with mode: 0644]
scilab/modules/graphics/src/c/getHandleProperty/set_x_location_property.c [new file with mode: 0644]
scilab/modules/graphics/src/c/getHandleProperty/set_y_label_property.c [new file with mode: 0644]
scilab/modules/graphics/src/c/getHandleProperty/set_y_location_property.c [new file with mode: 0644]
scilab/modules/graphics/src/c/getHandleProperty/set_z_label_property.c [new file with mode: 0644]

index 350453f..dc1d8a3 100644 (file)
@@ -40,7 +40,7 @@
                        <Tool
                                Name="VCCLCompilerTool"
                                Optimization="0"
-                               AdditionalIncludeDirectories="includes;../core/includes;../../libs/MALLOC/includes;../../libs/hashtable"
+                               AdditionalIncludeDirectories="includes;../core/includes;../../libs/MALLOC/includes;../../libs/hashtable;src/c"
                                PreprocessorDefinitions="_LIB;STRICT;WITH_TK;_DEBUG;_CRT_SECURE_NO_DEPRECATE"
                                BasicRuntimeChecks="3"
                                RuntimeLibrary="1"
                                Optimization="2"
                                InlineFunctionExpansion="1"
                                FavorSizeOrSpeed="1"
-                               AdditionalIncludeDirectories="includes;../core/includes;../../libs/MALLOC/includes;../../libs/hashtable"
+                               AdditionalIncludeDirectories="includes;../core/includes;../../libs/MALLOC/includes;../../libs/hashtable;src/c"
                                PreprocessorDefinitions="NDEBUG;_LIB;STRICT;WITH_TK;_CRT_SECURE_NO_DEPRECATE"
                                StringPooling="true"
                                RuntimeLibrary="0"
                                >
                        </File>
                        <File
+                               RelativePath=".\src\c\getHandleProperty\set_auto_position_property.c"
+                               >
+                       </File>
+                       <File
                                RelativePath=".\src\c\getHandleProperty\set_auto_resize_property.c"
                                >
                        </File>
                        <File
+                               RelativePath=".\src\c\getHandleProperty\set_auto_rotation_property.c"
+                               >
+                       </File>
+                       <File
                                RelativePath=".\src\c\getHandleProperty\set_auto_scale_property.c"
                                >
                        </File>
                                >
                        </File>
                        <File
+                               RelativePath=".\src\c\getHandleProperty\set_callback_property.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath=".\src\c\getHandleProperty\set_callbackmevent_property.c"
+                               >
+                       </File>
+                       <File
                                RelativePath=".\src\c\getHandleProperty\set_clip_box_property.c"
                                >
                        </File>
                                >
                        </File>
                        <File
+                               RelativePath=".\src\c\getHandleProperty\set_closed_property.c"
+                               >
+                       </File>
+                       <File
                                RelativePath=".\src\c\getHandleProperty\set_color_map_property.c"
                                >
                        </File>
                                >
                        </File>
                        <File
+                               RelativePath=".\src\c\getHandleProperty\set_tics_direction_property.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath=".\src\c\getHandleProperty\set_tight_limits_property.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath=".\src\c\getHandleProperty\set_title_property.c"
+                               >
+                       </File>
+                       <File
                                RelativePath=".\src\c\getHandleProperty\set_visible_property.c"
                                >
                        </File>
                        <File
+                               RelativePath=".\src\c\getHandleProperty\set_x_label_property.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath=".\src\c\getHandleProperty\set_x_location_property.c"
+                               >
+                       </File>
+                       <File
                                RelativePath=".\src\c\getHandleProperty\set_x_shift_property.c"
                                >
                        </File>
                        <File
+                               RelativePath=".\src\c\getHandleProperty\set_y_label_property.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath=".\src\c\getHandleProperty\set_y_location_property.c"
+                               >
+                       </File>
+                       <File
                                RelativePath=".\src\c\getHandleProperty\set_y_shift_property.c"
                                >
                        </File>
                        <File
+                               RelativePath=".\src\c\getHandleProperty\set_z_label_property.c"
+                               >
+                       </File>
+                       <File
                                RelativePath=".\src\c\getHandleProperty\set_z_shift_property.c"
                                >
                        </File>
index 7a8a4d9..35014e5 100644 (file)
@@ -790,149 +790,63 @@ int sciSet(sciPointObj *pobj, char *marker, int *value, int *numrow, int *numcol
   }            
   else if (strcmp(marker,"data") == 0)
   {
-    return set_data_property( pobj, *value, *numrow, *numcol ) ; 
+    return set_data_property( pobj, *value, *numrow, *numcol ) ;
   }
 
   /**************** callback *********************/
-  else if (strcmp(marker,"callbackmevent") == 0) {
-    sciSetCallbackMouseEvent((sciPointObj *)pobj,(int) *stk(*value));
+  else if (strcmp(marker,"callbackmevent") == 0)
+  {
+    return set_callbackmevent_property( pobj, *value, *numrow, *numcol ) ;
   }
-  else if (strcmp(marker,"callback") == 0) {
-    sciAddCallback((sciPointObj *)pobj, cstk(*value), (*numcol)*(*numrow),1);
+  else if (strcmp(marker,"callback") == 0)
+  {
+    return set_callback_property( pobj, *value, *numrow, *numcol ) ;
   }
-
-
-
-
   /******** AXES *******************************/
   else if (strcmp(marker,"x_label") == 0)
-    {
-      if (sciGetEntityType (pobj) != SCI_SUBWIN)
-       {strcpy(error_message,"x_label property undefined for this object");return -1;}
-      else{
-       {strcpy(error_message,"can not set directly a label object");return -1;}
-      }
-    }
+  {
+    return set_x_label_property( pobj, *value, *numrow, *numcol ) ;
+  }
   else if (strcmp(marker,"y_label") == 0)
-    {
-      if (sciGetEntityType (pobj) != SCI_SUBWIN)
-       {strcpy(error_message,"y_label property undefined for this object");return -1;}
-      else{
-       {strcpy(error_message,"can not set directly a label object");return -1;}
-      }
-    }
+  {
+    return set_y_label_property( pobj, *value, *numrow, *numcol ) ;
+  }
   else if (strcmp(marker,"z_label") == 0)
-    {
-      if (sciGetEntityType (pobj) != SCI_SUBWIN)
-       {strcpy(error_message,"z_label property undefined for this object");return -1;}
-      else{
-       {strcpy(error_message,"can not set directly a label object");return -1;}
-      }
-    }
+  {
+    return set_z_label_property( pobj, *value, *numrow, *numcol ) ;
+  }
   else if (strcmp(marker,"title") == 0)
-    {
-      if (sciGetEntityType (pobj) != SCI_SUBWIN)
-       {strcpy(error_message,"title property undefined for this object");return -1;}
-      else{
-       {strcpy(error_message,"can not set directly a label object");return -1;}
-      }
-    }
-
+  {
+    return set_title_property( pobj, *value, *numrow, *numcol ) ;
+  }
   else if (strcmp(marker,"tics_direction") == 0)
-    {   
-      if (pAXES_FEATURE (pobj)->ny == 1)
-       { 
-         if(strcmp(cstk(*value),"top") == 0) 
-           strncpy(&(pAXES_FEATURE (pobj)->dir),"u",1);
-         else if (strcmp(cstk(*value),"bottom") == 0)
-           strncpy(&(pAXES_FEATURE (pobj)->dir),"d",1);
-         else
-           {strcpy(error_message,"Second argument must be 'top' or 'bottom'");return -1;}
-       } 
-      else
-       {
-         if(strcmp(cstk(*value),"right") == 0)
-           strncpy(&(pAXES_FEATURE (pobj)->dir),"r",1);
-         else if  (strcmp(cstk(*value),"left") == 0)
-           strncpy(&(pAXES_FEATURE (pobj)->dir),"l",1);
-         else
-           {strcpy(error_message,"Second argument must be 'right' or 'left' ");return -1;}
-       }
-    }
+  {
+    return set_tics_direction_property( pobj, *value, *numrow, *numcol ) ;
+  }
   else if (strcmp(marker,"x_location") == 0)
-    {  
-      char loc;
-      if(strcmp(cstk(*value),"top") == 0)
-       loc='u';
-      else if  (strcmp(cstk(*value),"bottom") == 0)
-       loc='d';
-      else if (strcmp(cstk(*value),"middle") == 0)
-       loc='c';
-      else  
-       {strcpy(error_message,"Second argument must be 'top', 'bottom' or 'middle'");return -1;}
-      if (sciGetEntityType (pobj) == SCI_SUBWIN)
-       pSUBWIN_FEATURE (pobj)->axes.xdir = loc;
-      else
-       {strcpy(error_message,"x_location property does not exist for this handle");return -1;}
-    }
+  {
+    return set_x_location_property( pobj, *value, *numrow, *numcol ) ;
+  }
   else if (strcmp(marker,"y_location") == 0)
-    {   
-      char loc;
-      if(strcmp(cstk(*value),"left") == 0)
-       loc='l';
-      else if  (strcmp(cstk(*value),"right") == 0)
-       loc='r';
-      else if (strcmp(cstk(*value),"middle") == 0)
-       loc='c';
-      else  
-       {strcpy(error_message,"Second argument must be 'left', 'right' or 'middle'");return -1;}
-      if (sciGetEntityType (pobj) == SCI_SUBWIN)
-       pSUBWIN_FEATURE (pobj)->axes.ydir = loc;
-      else
-       {strcpy(error_message,"x_location property does not exist for this handle");return -1;}
-    }
+  {
+    return set_y_location_property( pobj, *value, *numrow, *numcol ) ;
+  }
   else if (strcmp(marker,"tight_limits") == 0) 
-    {                   
-      if ((strcmp(cstk(*value),"off") == 0)) 
-       pSUBWIN_FEATURE (pobj)->tight_limits=FALSE;
-      else if ((strcmp(cstk(*value),"on") == 0))
-       pSUBWIN_FEATURE (pobj)->tight_limits=TRUE;
-      else
-       {strcpy(error_message,"Second argument must be 'on' or 'off'");return -1;}
-    } 
+  {
+    return set_tight_limits_property( pobj, *value, *numrow, *numcol ) ;
+  }
   else if (strcmp(marker,"closed") == 0)
-    { 
-      if(sciGetEntityType(pobj) != SCI_POLYLINE)
-       {strcpy(error_message,"closed property does not exist for this handle");return -1;}
-
-      if (strcmp(cstk(*value),"on")==0 )
-       pPOLYLINE_FEATURE(pobj)->closed = 1;
-      else if (strcmp(cstk(*value),"off")==0 )
-       pPOLYLINE_FEATURE(pobj)->closed = 0;
-      else  {strcpy(error_message,"Nothing to do (value must be 'on/off')"); return -1;}
-    } 
+  {
+    return set_closed_property( pobj, *value, *numrow, *numcol ) ;
+  } 
   else if (strcmp(marker,"auto_position") == 0)
-    { 
-      if(sciGetEntityType(pobj) != SCI_LABEL)
-       {strcpy(error_message,"auto_position does not exist for this handle");return -1;}
-
-      if (strcmp(cstk(*value),"on")==0 )
-       pLABEL_FEATURE(pobj)->auto_position = TRUE;
-      else if (strcmp(cstk(*value),"off")==0 )
-       pLABEL_FEATURE(pobj)->auto_position = FALSE;
-      else  {strcpy(error_message,"Nothing to do (value must be 'on/off')"); return -1;}
-    }  
+  {
+    return set_auto_position_property( pobj, *value, *numrow, *numcol ) ;
+  }  
   else if (strcmp(marker,"auto_rotation") == 0)
-    { 
-      if(sciGetEntityType(pobj) != SCI_LABEL)
-       {strcpy(error_message,"auto_rotation does not exist for this handle");return -1;}
-
-      if (strcmp(cstk(*value),"on")==0 )
-       pLABEL_FEATURE(pobj)->auto_rotation = TRUE;
-      else if (strcmp(cstk(*value),"off")==0 )
-       pLABEL_FEATURE(pobj)->auto_rotation = FALSE;
-      else  {strcpy(error_message,"Nothing to do (value must be 'on/off')"); return -1;}
-    } 
+  {
+    return set_auto_rotation_property( pobj, *value, *numrow, *numcol ) ;
+  } 
   else if (strcmp(marker,"position") == 0)
     {
       if ( sciGetAutoPosition( pobj ) )
index 1f51ab6..d806cae 100644 (file)
@@ -74,5 +74,18 @@ int set_zoom_state_property( sciPointObj * pobj, int stackPointer, int nbRow, in
 int set_clip_box_property( sciPointObj * pobj, int stackPointer, int nbRow, int nbCol ) ;
 int set_clip_state_property( sciPointObj * pobj, int stackPointer, int nbRow, int nbCol ) ;
 int set_data_property( sciPointObj * pobj, int stackPointer, int nbRow, int nbCol ) ;
+int set_x_label_property( sciPointObj * pobj, int stackPointer, int nbRow, int nbCol ) ;
+int set_y_label_property( sciPointObj * pobj, int stackPointer, int nbRow, int nbCol ) ;
+int set_z_label_property( sciPointObj * pobj, int stackPointer, int nbRow, int nbCol ) ;
+int set_callbackmevent_property( sciPointObj * pobj, int stackPointer, int nbRow, int nbCol ) ;
+int set_callback_property( sciPointObj * pobj, int stackPointer, int nbRow, int nbCol ) ;
+int set_title_property( sciPointObj * pobj, int stackPointer, int nbRow, int nbCol ) ;
+int set_tics_direction_property( sciPointObj * pobj, int stackPointer, int nbRow, int nbCol ) ;
+int set_x_location_property( sciPointObj * pobj, int stackPointer, int nbRow, int nbCol ) ;
+int set_y_location_property( sciPointObj * pobj, int stackPointer, int nbRow, int nbCol ) ;
+int set_tight_limits_property( sciPointObj * pobj, int stackPointer, int nbRow, int nbCol ) ;
+int set_closed_property( sciPointObj * pobj, int stackPointer, int nbRow, int nbCol ) ;
+int set_auto_position_property( sciPointObj * pobj, int stackPointer, int nbRow, int nbCol ) ;
+int set_auto_rotation_property( sciPointObj * pobj, int stackPointer, int nbRow, int nbCol ) ;
 
 #endif /* _SET_HANDLE_PROPERTY_H_ */
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/set_auto_position_property.c b/scilab/modules/graphics/src/c/getHandleProperty/set_auto_position_property.c
new file mode 100644 (file)
index 0000000..c76e422
--- /dev/null
@@ -0,0 +1,40 @@
+/*------------------------------------------------------------------------*/
+/* file: set_auto_position_property.c                                     */
+/* Copyright INRIA 2006                                                   */
+/* Authors : Fabrice Leray, Allan Cornet, Jean-Baptiste Silvy             */
+/* desc : function to modify in Scilab the auto_position field of         */
+/*        a handle                                                        */
+/*------------------------------------------------------------------------*/
+
+#include "setHandleProperty.h"
+#include "SetProperty.h"
+#include "getPropertyAssignedValue.h"
+#include "SetPropertyStatus.h"
+#include "GetProperty.h"
+#include "sciprint.h"
+
+/*------------------------------------------------------------------------*/
+int set_auto_position_property( sciPointObj * pobj, int stackPointer, int nbRow, int nbCol )
+{
+  if ( sciGetEntityType(pobj) != SCI_LABEL )
+  {
+    sciprint("auto_position does not exist for this handle.\n") ;
+    return SET_PROPERTY_ERROR ;
+  }
+
+  if ( isStringParamEqual( stackPointer, "on" ) )
+  {
+    return sciSetAutoPosition( pobj, TRUE ) ;
+  }
+  else if ( isStringParamEqual( stackPointer, "off" ) )
+  {
+    return sciSetAutoPosition( pobj, FALSE ) ;
+  }
+  else
+  {
+    sciprint("Nothing to do (value must be 'on/off').\n") ;
+    return SET_PROPERTY_ERROR ;
+  }
+  return SET_PROPERTY_ERROR ;
+}
+/*------------------------------------------------------------------------*/
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/set_auto_rotation_property.c b/scilab/modules/graphics/src/c/getHandleProperty/set_auto_rotation_property.c
new file mode 100644 (file)
index 0000000..cebd1ea
--- /dev/null
@@ -0,0 +1,40 @@
+/*------------------------------------------------------------------------*/
+/* file: set_auto_rotation_property.c                                     */
+/* Copyright INRIA 2006                                                   */
+/* Authors : Fabrice Leray, Allan Cornet, Jean-Baptiste Silvy             */
+/* desc : function to modify in Scilab the auto_rotation field of         */
+/*        a handle                                                        */
+/*------------------------------------------------------------------------*/
+
+#include "setHandleProperty.h"
+#include "SetProperty.h"
+#include "getPropertyAssignedValue.h"
+#include "SetPropertyStatus.h"
+#include "GetProperty.h"
+#include "sciprint.h"
+
+/*------------------------------------------------------------------------*/
+int set_auto_rotation_property( sciPointObj * pobj, int stackPointer, int nbRow, int nbCol )
+{
+  if ( sciGetEntityType(pobj) != SCI_LABEL )
+  {
+    sciprint("auto_rotation does not exist for this handle.\n") ;
+    return SET_PROPERTY_ERROR ;
+  }
+
+  if ( isStringParamEqual( stackPointer, "on" ) )
+  {
+    return sciSetAutoRotation( pobj, TRUE ) ;
+  }
+  else if ( isStringParamEqual( stackPointer, "off" ) )
+  {
+    return sciSetAutoRotation( pobj, FALSE ) ;
+  }
+  else
+  {
+    sciprint("Nothing to do (value must be 'on/off').\n") ;
+    return SET_PROPERTY_ERROR ;
+  }
+  return SET_PROPERTY_ERROR ;
+}
+/*------------------------------------------------------------------------*/
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/set_callback_property.c b/scilab/modules/graphics/src/c/getHandleProperty/set_callback_property.c
new file mode 100644 (file)
index 0000000..58e59c6
--- /dev/null
@@ -0,0 +1,21 @@
+/*------------------------------------------------------------------------*/
+/* file: set_callback_property.c                                          */
+/* Copyright INRIA 2006                                                   */
+/* Authors : Fabrice Leray, Allan Cornet, Jean-Baptiste Silvy             */
+/* desc : function to modify in Scilab the callback field of              */
+/*        a handle                                                        */
+/*------------------------------------------------------------------------*/
+
+#include "setHandleProperty.h"
+#include "SetProperty.h"
+#include "getPropertyAssignedValue.h"
+#include "Interaction.h"
+#include "sciprint.h"
+#include "SetPropertyStatus.h"
+
+/*------------------------------------------------------------------------*/
+int set_callback_property( sciPointObj * pobj, int stackPointer, int nbRow, int nbCol )
+{
+   return sciAddCallback( pobj, getStringFromStack( stackPointer ), nbRow * nbCol, 1 ) ;
+}
+/*------------------------------------------------------------------------*/
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/set_callbackmevent_property.c b/scilab/modules/graphics/src/c/getHandleProperty/set_callbackmevent_property.c
new file mode 100644 (file)
index 0000000..3810a82
--- /dev/null
@@ -0,0 +1,21 @@
+/*------------------------------------------------------------------------*/
+/* file: set_callbackmevent_property.c                                    */
+/* Copyright INRIA 2006                                                   */
+/* Authors : Fabrice Leray, Allan Cornet, Jean-Baptiste Silvy             */
+/* desc : function to modify in Scilab the callbackmevent field of        */
+/*        a handle                                                        */
+/*------------------------------------------------------------------------*/
+
+#include "setHandleProperty.h"
+#include "SetProperty.h"
+#include "getPropertyAssignedValue.h"
+#include "Interaction.h"
+#include "GetProperty.h"
+#include "sciprint.h"
+
+/*------------------------------------------------------------------------*/
+int set_callbackmevent_property( sciPointObj * pobj, int stackPointer, int nbRow, int nbCol )
+{
+  return sciSetCallbackMouseEvent( pobj, (int) getDoubleFromStack( stackPointer ) ) ;
+}
+/*------------------------------------------------------------------------*/
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/set_closed_property.c b/scilab/modules/graphics/src/c/getHandleProperty/set_closed_property.c
new file mode 100644 (file)
index 0000000..26ff133
--- /dev/null
@@ -0,0 +1,40 @@
+/*------------------------------------------------------------------------*/
+/* file: set_closed_property.c                                            */
+/* Copyright INRIA 2006                                                   */
+/* Authors : Fabrice Leray, Allan Cornet, Jean-Baptiste Silvy             */
+/* desc : function to modify in Scilab the closed field of                */
+/*        a handle                                                        */
+/*------------------------------------------------------------------------*/
+
+#include "setHandleProperty.h"
+#include "SetProperty.h"
+#include "getPropertyAssignedValue.h"
+#include "SetPropertyStatus.h"
+#include "GetProperty.h"
+#include "sciprint.h"
+
+/*------------------------------------------------------------------------*/
+int set_closed_property( sciPointObj * pobj, int stackPointer, int nbRow, int nbCol )
+{
+  if(sciGetEntityType(pobj) != SCI_POLYLINE)
+  {
+    sciprint( "closed property does not exist for this handle.\n" ) ;
+    return SET_PROPERTY_ERROR ;
+  }
+
+  if ( isStringParamEqual( stackPointer, "on" ) )
+  {
+    pPOLYLINE_FEATURE(pobj)->closed = 1 ;
+  }
+  else if ( isStringParamEqual( stackPointer, "off" ) )
+  {
+    pPOLYLINE_FEATURE(pobj)->closed = 0 ;
+  }
+  else
+  {
+    sciprint("Nothing to do (value must be 'on/off').\n") ;
+    return SET_PROPERTY_ERROR ;
+  }
+  return SET_PROPERTY_SUCCEED ;
+}
+/*------------------------------------------------------------------------*/
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/set_tics_direction_property.c b/scilab/modules/graphics/src/c/getHandleProperty/set_tics_direction_property.c
new file mode 100644 (file)
index 0000000..8ea9b63
--- /dev/null
@@ -0,0 +1,61 @@
+/*------------------------------------------------------------------------*/
+/* file: set_tics_direction_property.c                                    */
+/* Copyright INRIA 2006                                                   */
+/* Authors : Fabrice Leray, Allan Cornet, Jean-Baptiste Silvy             */
+/* desc : function to modify in Scilab the tics_direction field of        */
+/*        a handle                                                        */
+/*------------------------------------------------------------------------*/
+
+#include "setHandleProperty.h"
+#include "SetProperty.h"
+#include "getPropertyAssignedValue.h"
+#include "SetPropertyStatus.h"
+#include "GetProperty.h"
+#include "sciprint.h"
+
+/*------------------------------------------------------------------------*/
+int set_tics_direction_property( sciPointObj * pobj, int stackPointer, int nbRow, int nbCol )
+{
+  if ( sciGetEntityType(pobj) != SCI_AXES )
+  {
+    sciprint("tics_direction property does not exist for this handle.\n" ) ;
+    return SET_PROPERTY_ERROR ;
+  }
+
+  if ( pAXES_FEATURE (pobj)->ny == 1 )
+  { 
+    if( isStringParamEqual( stackPointer, "top" ) )
+    {
+      pAXES_FEATURE (pobj)->dir = 'u' ;
+    }
+    else if ( isStringParamEqual( stackPointer, "bottom" ) )
+    {
+      pAXES_FEATURE (pobj)->dir = 'd' ;
+    }
+    else
+    {
+      sciprint("Second argument must be 'top' or 'bottom'.\n") ;
+      return SET_PROPERTY_ERROR ;
+    }
+    return SET_PROPERTY_SUCCEED ;
+  } 
+  else
+  {
+    if( isStringParamEqual( stackPointer, "right" ) )
+    {
+      pAXES_FEATURE (pobj)->dir = 'r' ;
+    }
+    else if ( isStringParamEqual( stackPointer, "left" ) )
+    {
+      pAXES_FEATURE (pobj)->dir = 'l' ;
+    }
+    else
+    {
+      sciprint("Second argument must be 'right' or 'left'.\n") ;
+      return -1 ;
+    }
+    return SET_PROPERTY_SUCCEED ;
+  }
+  return SET_PROPERTY_ERROR ;
+}
+/*------------------------------------------------------------------------*/
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/set_tight_limits_property.c b/scilab/modules/graphics/src/c/getHandleProperty/set_tight_limits_property.c
new file mode 100644 (file)
index 0000000..063603c
--- /dev/null
@@ -0,0 +1,40 @@
+/*------------------------------------------------------------------------*/
+/* file: set_tight_limits_property.c                                      */
+/* Copyright INRIA 2006                                                   */
+/* Authors : Fabrice Leray, Allan Cornet, Jean-Baptiste Silvy             */
+/* desc : function to modify in Scilab the tight_limits field of          */
+/*        a handle                                                        */
+/*------------------------------------------------------------------------*/
+
+#include "setHandleProperty.h"
+#include "SetProperty.h"
+#include "getPropertyAssignedValue.h"
+#include "SetPropertyStatus.h"
+#include "GetProperty.h"
+#include "sciprint.h"
+
+/*------------------------------------------------------------------------*/
+int set_tight_limits_property( sciPointObj * pobj, int stackPointer, int nbRow, int nbCol )
+{
+  if ( sciGetEntityType(pobj) != SCI_SUBWIN )
+  {
+    sciprint("tight_limits property does not exists for this handle.\n") ;
+    return SET_PROPERTY_ERROR ;
+  }
+
+  if ( isStringParamEqual( stackPointer, "on" ) )
+  {
+    pSUBWIN_FEATURE (pobj)->tight_limits = FALSE;
+  }
+  else if ( isStringParamEqual( stackPointer, "off" ) )
+  {
+    pSUBWIN_FEATURE (pobj)->tight_limits = TRUE;
+  }
+  else
+  {
+    sciprint("Second argument must be 'on' or 'off'.\n") ;
+    return SET_PROPERTY_ERROR ;
+  }
+  return SET_PROPERTY_SUCCEED ;
+}
+/*------------------------------------------------------------------------*/
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/set_title_property.c b/scilab/modules/graphics/src/c/getHandleProperty/set_title_property.c
new file mode 100644 (file)
index 0000000..4ff7fb7
--- /dev/null
@@ -0,0 +1,32 @@
+/*------------------------------------------------------------------------*/
+/* file: set_title_property.c                                             */
+/* Copyright INRIA 2006                                                   */
+/* Authors : Fabrice Leray, Allan Cornet, Jean-Baptiste Silvy             */
+/* desc : function to modify in Scilab the title field of                 */
+/*        a handle                                                        */
+/*------------------------------------------------------------------------*/
+
+#include "setHandleProperty.h"
+#include "SetProperty.h"
+#include "getPropertyAssignedValue.h"
+#include "Interaction.h"
+#include "SetPropertyStatus.h"
+#include "GetProperty.h"
+#include "sciprint.h"
+
+/*------------------------------------------------------------------------*/
+int set_title_property( sciPointObj * pobj, int stackPointer, int nbRow, int nbCol )
+{
+  if ( sciGetEntityType(pobj) != SCI_SUBWIN )
+  {
+    sciprint("title property undefined for this object.\n") ;
+    return SET_PROPERTY_ERROR ;
+  }
+  else
+  {
+    sciprint("can not set directly a label object.\n") ;
+    return SET_PROPERTY_ERROR ;
+  }
+  return SET_PROPERTY_ERROR ;
+}
+/*------------------------------------------------------------------------*/
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/set_x_label_property.c b/scilab/modules/graphics/src/c/getHandleProperty/set_x_label_property.c
new file mode 100644 (file)
index 0000000..a7b0626
--- /dev/null
@@ -0,0 +1,31 @@
+/*------------------------------------------------------------------------*/
+/* file: set_x_label_property.c                                           */
+/* Copyright INRIA 2006                                                   */
+/* Authors : Fabrice Leray, Allan Cornet, Jean-Baptiste Silvy             */
+/* desc : function to modify in Scilab the x_label field of               */
+/*        a handle                                                        */
+/*------------------------------------------------------------------------*/
+
+#include "setHandleProperty.h"
+#include "SetProperty.h"
+#include "getPropertyAssignedValue.h"
+#include "GetProperty.h"
+#include "sciprint.h"
+#include "SetPropertyStatus.h"
+
+/*------------------------------------------------------------------------*/
+int set_x_label_property( sciPointObj * pobj, int stackPointer, int nbRow, int nbCol )
+{
+  if ( sciGetEntityType(pobj) != SCI_SUBWIN )
+  {
+    sciprint("x_label property undefined for this object.\n") ;
+    return SET_PROPERTY_ERROR ;
+  }
+  else
+  {
+    sciprint("can not set directly a label object.\n") ;
+    return SET_PROPERTY_ERROR ;
+  }
+  return SET_PROPERTY_ERROR ;
+}
+/*------------------------------------------------------------------------*/
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/set_x_location_property.c b/scilab/modules/graphics/src/c/getHandleProperty/set_x_location_property.c
new file mode 100644 (file)
index 0000000..1fb34d7
--- /dev/null
@@ -0,0 +1,44 @@
+/*------------------------------------------------------------------------*/
+/* file: set_x_location_property.c                                        */
+/* Copyright INRIA 2006                                                   */
+/* Authors : Fabrice Leray, Allan Cornet, Jean-Baptiste Silvy             */
+/* desc : function to modify in Scilab the x_location field of            */
+/*        a handle                                                        */
+/*------------------------------------------------------------------------*/
+
+#include "setHandleProperty.h"
+#include "SetProperty.h"
+#include "getPropertyAssignedValue.h"
+#include "SetPropertyStatus.h"
+#include "GetProperty.h"
+#include "sciprint.h"
+
+/*------------------------------------------------------------------------*/
+int set_x_location_property( sciPointObj * pobj, int stackPointer, int nbRow, int nbCol )
+{
+  if ( sciGetEntityType(pobj) != SCI_SUBWIN )
+  {
+    sciprint("x_location property does not exist for this handle.\n") ;
+    return SET_PROPERTY_ERROR ;
+  }
+
+  if ( isStringParamEqual( stackPointer, "top" ) )
+  {
+    pSUBWIN_FEATURE(pobj)->axes.xdir = 'u' ;
+  }
+  else if ( isStringParamEqual( stackPointer, "bottom" ) )
+  {
+    pSUBWIN_FEATURE(pobj)->axes.xdir = 'd' ;
+  }
+  else if ( isStringParamEqual( stackPointer, "middle" ) )
+  {
+    pSUBWIN_FEATURE(pobj)->axes.xdir = 'c' ;
+  }
+  else  
+  {
+    sciprint("Second argument must be 'top', 'bottom' or 'middle'.\n") ;
+    return SET_PROPERTY_ERROR ;
+  }
+  return SET_PROPERTY_ERROR ;
+}
+/*------------------------------------------------------------------------*/
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/set_y_label_property.c b/scilab/modules/graphics/src/c/getHandleProperty/set_y_label_property.c
new file mode 100644 (file)
index 0000000..8c9ccee
--- /dev/null
@@ -0,0 +1,31 @@
+/*------------------------------------------------------------------------*/
+/* file: set_y_label_property.c                                           */
+/* Copyright INRIA 2006                                                   */
+/* Authors : Fabrice Leray, Allan Cornet, Jean-Baptiste Silvy             */
+/* desc : function to modify in Scilab the y_label field of               */
+/*        a handle                                                        */
+/*------------------------------------------------------------------------*/
+
+#include "setHandleProperty.h"
+#include "SetProperty.h"
+#include "getPropertyAssignedValue.h"
+#include "GetProperty.h"
+#include "sciprint.h"
+#include "SetPropertyStatus.h"
+
+/*------------------------------------------------------------------------*/
+int set_y_label_property( sciPointObj * pobj, int stackPointer, int nbRow, int nbCol )
+{
+  if ( sciGetEntityType(pobj) != SCI_SUBWIN )
+  {
+    sciprint("z_label property undefined for this object.\n") ;
+    return SET_PROPERTY_ERROR ;
+  }
+  else
+  {
+    sciprint("can not set directly a label object.\n") ;
+    return SET_PROPERTY_ERROR ;
+  }
+  return SET_PROPERTY_ERROR ;
+}
+/*------------------------------------------------------------------------*/
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/set_y_location_property.c b/scilab/modules/graphics/src/c/getHandleProperty/set_y_location_property.c
new file mode 100644 (file)
index 0000000..2c36a56
--- /dev/null
@@ -0,0 +1,44 @@
+/*------------------------------------------------------------------------*/
+/* file: set_y_location_property.c                                        */
+/* Copyright INRIA 2006                                                   */
+/* Authors : Fabrice Leray, Allan Cornet, Jean-Baptiste Silvy             */
+/* desc : function to modify in Scilab the y_location field of            */
+/*        a handle                                                        */
+/*------------------------------------------------------------------------*/
+
+#include "setHandleProperty.h"
+#include "SetProperty.h"
+#include "getPropertyAssignedValue.h"
+#include "SetPropertyStatus.h"
+#include "GetProperty.h"
+#include "sciprint.h"
+
+/*------------------------------------------------------------------------*/
+int set_y_location_property( sciPointObj * pobj, int stackPointer, int nbRow, int nbCol )
+{
+  if ( sciGetEntityType(pobj) != SCI_SUBWIN )
+  {
+    sciprint("y_location property does not exist for this handle.\n") ;
+    return SET_PROPERTY_ERROR ;
+  }
+
+  if ( isStringParamEqual( stackPointer, "left" ) )
+  {
+    pSUBWIN_FEATURE(pobj)->axes.ydir = 'l' ;
+  }
+  else if ( isStringParamEqual( stackPointer, "right" ) )
+  {
+    pSUBWIN_FEATURE(pobj)->axes.ydir = 'r' ;
+  }
+  else if ( isStringParamEqual( stackPointer, "middle" ) )
+  {
+    pSUBWIN_FEATURE(pobj)->axes.ydir = 'c' ;
+  }
+  else  
+  {
+    sciprint("Second argument must be 'left', 'right' or 'middle'.\n") ;
+    return SET_PROPERTY_ERROR ;
+  }
+  return SET_PROPERTY_ERROR ;
+}
+/*------------------------------------------------------------------------*/
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/set_z_label_property.c b/scilab/modules/graphics/src/c/getHandleProperty/set_z_label_property.c
new file mode 100644 (file)
index 0000000..83ea103
--- /dev/null
@@ -0,0 +1,31 @@
+/*------------------------------------------------------------------------*/
+/* file: set_z_label_property.c                                           */
+/* Copyright INRIA 2006                                                   */
+/* Authors : Fabrice Leray, Allan Cornet, Jean-Baptiste Silvy             */
+/* desc : function to modify in Scilab the z_label field of               */
+/*        a handle                                                        */
+/*------------------------------------------------------------------------*/
+
+#include "setHandleProperty.h"
+#include "SetProperty.h"
+#include "getPropertyAssignedValue.h"
+#include "SetPropertyStatus.h"
+#include "GetProperty.h"
+#include "sciprint.h"
+
+/*------------------------------------------------------------------------*/
+int set_z_label_property( sciPointObj * pobj, int stackPointer, int nbRow, int nbCol )
+{
+  if ( sciGetEntityType(pobj) != SCI_SUBWIN )
+  {
+    sciprint("z_label property undefined for this object.\n") ;
+    return SET_PROPERTY_ERROR ;
+  }
+  else
+  {
+    sciprint("can not set directly a label object.\n") ;
+    return SET_PROPERTY_ERROR ;
+  }
+  return SET_PROPERTY_ERROR ;
+}
+/*------------------------------------------------------------------------*/