setHandleProperty.h File Reference

#include "ObjectStructure.h"

Include dependency graph for setHandleProperty.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int set_color_map_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_old_style_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_figure_style_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_pixel_drawing_mode_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_default_values_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_visible_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_auto_resize_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_current_entity_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_current_axes_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_current_figure_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_axes_size_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_figure_position_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_figure_name_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_figure_size_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_figure_id_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_rotation_style_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_immediate_drawing_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_pixmap_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_background_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_interp_color_vector_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_interp_color_mode_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_foreground_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_fill_mode_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_thickness_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_arrow_size_factor_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_line_style_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_line_mode_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_surface_mode_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_mark_style_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_mark_mode_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_mark_size_unit_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_mark_size_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_mark_foreground_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_mark_background_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_bar_width_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_bar_layout_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_x_shift_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_y_shift_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_z_shift_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_polyline_style_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_font_size_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_font_angle_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_font_foreground_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_font_color_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_font_style_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_font_name_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_text_box_mode_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_auto_dimensionning_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_alignment_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_text_box_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_text_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_auto_clear_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_auto_scale_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_zoom_box_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_zoom_state_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_clip_box_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_clip_state_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_data_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_x_label_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_y_label_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_z_label_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_callbackmevent_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_callback_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_title_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_tics_direction_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_x_location_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_y_location_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_tight_limits_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_closed_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_auto_position_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_auto_rotation_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_position_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_auto_ticks_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_axes_reverse_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_view_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_axes_bounds_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_data_bounds_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_margins_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_tics_color_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_tics_style_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_sub_tics_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_format_n_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_tics_segment_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_labels_font_size_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_labels_font_color_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_labels_font_style_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_tics_labels_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_xtics_coord_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_ytics_coord_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_box_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_grid_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_axes_visible_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_hidden_color_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_isoview_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_cube_scaling_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_log_flags_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_arrow_size_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_segs_color_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_colored_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_data_mapping_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_rotation_angles_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_color_mode_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_color_flag_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_cdata_mapping_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_surface_color_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_triangles_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_z_bounds_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_handle_visible_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_callback_type_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_menu_enable_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_hidden_axis_color_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_user_data_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_x_ticks_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_y_ticks_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_z_ticks_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_parent_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_children_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_viewport_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)
int set_info_message_property (sciPointObj *pobj, int stackPointer, int valueType, int nbRow, int nbCol)


Function Documentation

int set_alignment_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_alignment_property.c.

References ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, isParameterStringMatrix(), isStringParamEqual(), SCI_TEXT, sciGetEntityType(), sciprint(), sciSetAlignment(), and SET_PROPERTY_ERROR.

00018 {
00019 
00020   if ( !isParameterStringMatrix( valueType ) )
00021   {
00022     sciprint("Incompatible type for property alignment.\n") ;
00023     return SET_PROPERTY_ERROR ;
00024   }
00025 
00026   if ( sciGetEntityType( pobj ) != SCI_TEXT )
00027   {
00028     sciprint("alignment property does not exist for this handle.\n");
00029     return SET_PROPERTY_ERROR ;
00030   }
00031 
00032   if ( isStringParamEqual( stackPointer, "left" ) )
00033   {
00034     return sciSetAlignment( pobj, ALIGN_LEFT ) ;
00035   }
00036   else if ( isStringParamEqual( stackPointer, "center" ) )
00037   {
00038     return sciSetAlignment( pobj, ALIGN_CENTER ) ;
00039   }
00040   else if ( isStringParamEqual( stackPointer, "right" ) )
00041   {
00042     return sciSetAlignment( pobj, ALIGN_RIGHT ) ;
00043   }
00044   else
00045   {
00046     sciprint("Second argument must be 'left','center' or 'right'.\n");
00047     return SET_PROPERTY_ERROR ;
00048   }
00049   return SET_PROPERTY_ERROR ;
00050 
00051 }

Here is the call graph for this function:

int set_arrow_size_factor_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_arrow_size_factor_property.c.

References getDoubleFromStack(), isParameterDoubleMatrix(), pPOLYLINE_FEATURE, SCI_POLYLINE, sciGetEntityType(), sciprint(), SET_PROPERTY_ERROR, and SET_PROPERTY_SUCCEED.

00018 {
00019   if ( !isParameterDoubleMatrix( valueType ) )
00020   {
00021     sciprint("Incompatible type for property arrow_size_factor.\n") ;
00022     return SET_PROPERTY_ERROR ;
00023   }
00024 
00025   if ( sciGetEntityType(pobj) != SCI_POLYLINE )
00026   {
00027     sciprint( "arrow_size_factor property undefined for this handle.\n" ) ;
00028     return SET_PROPERTY_ERROR ;
00029   }
00030   pPOLYLINE_FEATURE(pobj)->arsize_factor = getDoubleFromStack( stackPointer ) ;
00031   return SET_PROPERTY_SUCCEED ;
00032 }

Here is the call graph for this function:

int set_arrow_size_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_arrow_size_property.c.

References getDoubleFromStack(), isParameterDoubleMatrix(), pSEGS_FEATURE, SCI_SEGS, sciGetEntityType(), sciprint(), SET_PROPERTY_ERROR, and SET_PROPERTY_SUCCEED.

00018 {
00019 
00020   if ( !isParameterDoubleMatrix( valueType ) )
00021   {
00022     sciprint("Incompatible type for property arrow_size_factor.\n") ;
00023     return SET_PROPERTY_ERROR ;
00024   }
00025 
00026   if ( sciGetEntityType(pobj) != SCI_SEGS )
00027   {
00028     sciprint("arrow_size property does not exist for this handle.\n") ;
00029     return SET_PROPERTY_ERROR ;
00030   }
00031 
00032   pSEGS_FEATURE (pobj)->arrowsize = getDoubleFromStack( stackPointer ) ;
00033 
00034   return SET_PROPERTY_SUCCEED ;
00035 
00036 }

Here is the call graph for this function:

int set_auto_clear_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_auto_clear_property.c.

References FALSE, isParameterStringMatrix(), isStringParamEqual(), sciprint(), sciSetAddPlot(), SET_PROPERTY_ERROR, and TRUE.

00018 {
00019   if ( !isParameterStringMatrix( valueType ) )
00020   {
00021     sciprint("Incompatible type for property auto_clear.\n") ;
00022     return SET_PROPERTY_ERROR ;
00023   }
00024 
00025   if ( isStringParamEqual( stackPointer, "on" ) )
00026   {
00027     return sciSetAddPlot( pobj, FALSE ) ;
00028   }
00029   else if ( isStringParamEqual( stackPointer, "off" ) )
00030   {
00031     return sciSetAddPlot( pobj, TRUE ) ;
00032   }
00033   else
00034   {
00035     sciprint("Value must be 'on/off'.\n");
00036     return SET_PROPERTY_ERROR ;
00037   }
00038   return SET_PROPERTY_ERROR ;
00039 }

Here is the call graph for this function:

int set_auto_dimensionning_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_auto_dimensionning_property.c.

References FALSE, isParameterStringMatrix(), isStringParamEqual(), SCI_TEXT, sciGetEntityType(), sciprint(), sciSetAutoSize(), SET_PROPERTY_ERROR, and TRUE.

00018 {
00019   if ( !isParameterStringMatrix( valueType ) )
00020   {
00021     sciprint("Incompatible type for property auto_dimensionning.\n") ;
00022     return SET_PROPERTY_ERROR ;
00023   }
00024 
00025   if ( sciGetEntityType( pobj ) != SCI_TEXT )
00026   {
00027     sciprint( "auto_dimensionning property does not exist for this handle.\n" ) ;
00028     return SET_PROPERTY_ERROR ;
00029   }
00030 
00031   if ( isStringParamEqual( stackPointer, "on" ) )
00032   {
00033     return sciSetAutoSize( pobj, TRUE ) ;
00034   }
00035   else if ( isStringParamEqual( stackPointer, "off" ) )
00036   {
00037     return sciSetAutoSize( pobj, FALSE ) ;
00038   }
00039   else
00040   {
00041     sciprint("Value must be 'on/off'.\n");
00042     return SET_PROPERTY_ERROR ;
00043   }
00044   return SET_PROPERTY_ERROR ;
00045 
00046 }

Here is the call graph for this function:

int set_auto_position_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_auto_position_property.c.

References FALSE, isParameterStringMatrix(), isStringParamEqual(), SCI_LABEL, sciGetEntityType(), sciprint(), sciSetAutoPosition(), SET_PROPERTY_ERROR, and TRUE.

00018 {
00019   if ( !isParameterStringMatrix( valueType ) )
00020   {
00021     sciprint("Incompatible type for property auto_position.\n") ;
00022     return SET_PROPERTY_ERROR ;
00023   }
00024 
00025   if ( sciGetEntityType(pobj) != SCI_LABEL )
00026   {
00027     sciprint("auto_position does not exist for this handle.\n") ;
00028     return SET_PROPERTY_ERROR ;
00029   }
00030 
00031   if ( isStringParamEqual( stackPointer, "on" ) )
00032   {
00033     return sciSetAutoPosition( pobj, TRUE ) ;
00034   }
00035   else if ( isStringParamEqual( stackPointer, "off" ) )
00036   {
00037     return sciSetAutoPosition( pobj, FALSE ) ;
00038   }
00039   else
00040   {
00041     sciprint("Nothing to do (value must be 'on/off').\n") ;
00042     return SET_PROPERTY_ERROR ;
00043   }
00044   return SET_PROPERTY_ERROR ;
00045 }

Here is the call graph for this function:

int set_auto_resize_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 16 of file set_auto_resize_property.c.

References FALSE, isParameterStringMatrix(), isStringParamEqual(), sciprint(), sciSetResize(), SET_PROPERTY_ERROR, and TRUE.

00017 {
00018   if ( !isParameterStringMatrix( valueType ) )
00019   {
00020     sciprint("Incompatible type for property auto_resize.\n") ;
00021     return SET_PROPERTY_ERROR ;
00022   }
00023 
00024   if ( isStringParamEqual( stackPointer, "on" ) )
00025   {
00026     return sciSetResize( pobj, TRUE );
00027   }
00028   else if ( isStringParamEqual( stackPointer, "off" ) )
00029   {
00030     return sciSetResize( pobj, FALSE );
00031   }
00032   else
00033   {
00034     sciprint("Value must be 'on' or 'off'.\n");
00035     return SET_PROPERTY_ERROR ;
00036   }
00037   return SET_PROPERTY_ERROR ;
00038 }

Here is the call graph for this function:

int set_auto_rotation_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_auto_rotation_property.c.

References FALSE, isParameterStringMatrix(), isStringParamEqual(), SCI_LABEL, sciGetEntityType(), sciprint(), sciSetAutoRotation(), SET_PROPERTY_ERROR, and TRUE.

00018 {
00019   if ( !isParameterStringMatrix( valueType ) )
00020   {
00021     sciprint("Incompatible type for property auto_resize.\n") ;
00022     return SET_PROPERTY_ERROR ;
00023   }
00024 
00025   if ( sciGetEntityType(pobj) != SCI_LABEL )
00026   {
00027     sciprint("auto_rotation does not exist for this handle.\n") ;
00028     return SET_PROPERTY_ERROR ;
00029   }
00030 
00031   if ( isStringParamEqual( stackPointer, "on" ) )
00032   {
00033     return sciSetAutoRotation( pobj, TRUE ) ;
00034   }
00035   else if ( isStringParamEqual( stackPointer, "off" ) )
00036   {
00037     return sciSetAutoRotation( pobj, FALSE ) ;
00038   }
00039   else
00040   {
00041     sciprint("Nothing to do (value must be 'on/off').\n") ;
00042     return SET_PROPERTY_ERROR ;
00043   }
00044   return SET_PROPERTY_ERROR ;
00045 }

Here is the call graph for this function:

int set_auto_scale_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_auto_scale_property.c.

References FALSE, isParameterStringMatrix(), isStringParamEqual(), sciprint(), sciSetAutoScale(), SET_PROPERTY_ERROR, and TRUE.

00018 {
00019 
00020   if ( !isParameterStringMatrix( valueType ) )
00021   {
00022     sciprint("Incompatible type for property aut_scale.\n") ;
00023     return SET_PROPERTY_ERROR ;
00024   }
00025 
00026   if ( isStringParamEqual( stackPointer, "on" ) )
00027   {
00028     return sciSetAutoScale( pobj, TRUE ) ;
00029   }
00030   else if ( isStringParamEqual( stackPointer, "off" ) )
00031   {
00032     return sciSetAutoScale( pobj, FALSE ) ;
00033   }
00034   else
00035   {
00036     sciprint("Value must be 'on/off'.\n");
00037     return SET_PROPERTY_ERROR ;
00038   }
00039   return SET_PROPERTY_ERROR ;
00040 }

Here is the call graph for this function:

int set_auto_ticks_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 19 of file set_auto_ticks_property.c.

References FALSE, getStringMatrixFromStack(), i, isParameterStringMatrix(), pSUBWIN_FEATURE, SCI_SUBWIN, sciGetEntityType(), sciprint(), SET_PROPERTY_ERROR, SET_PROPERTY_SUCCEED, and TRUE.

00020 {
00021   char ** values = getStringMatrixFromStack( stackPointer ) ;
00022 
00023   if ( !isParameterStringMatrix( valueType ) )
00024   {
00025     sciprint("Incompatible type for property auto_ticks.\n") ;
00026     return SET_PROPERTY_ERROR ;
00027   }
00028 
00029   if ( sciGetEntityType( pobj ) != SCI_SUBWIN )
00030   {
00031     sciprint( "auto_ticks property does not exist for this handle.\n" ) ;
00032     return SET_PROPERTY_ERROR ;
00033   }
00034 
00035   if( nbCol == 1 )
00036   {
00037     /* only one parameter to set the value for every axes.*/
00038     if ( strcmp( values[0], "off" ) == 0 ) 
00039     {
00040       pSUBWIN_FEATURE (pobj)->axes.auto_ticks[0] = FALSE ;
00041       pSUBWIN_FEATURE (pobj)->axes.auto_ticks[1] = FALSE ;
00042       pSUBWIN_FEATURE (pobj)->axes.auto_ticks[2] = FALSE ;
00043     }
00044     else if ( strcmp( values[0], "on" ) == 0 )
00045     {
00046       pSUBWIN_FEATURE (pobj)->axes.auto_ticks[0] = TRUE ;
00047       pSUBWIN_FEATURE (pobj)->axes.auto_ticks[1] = TRUE ;
00048       pSUBWIN_FEATURE (pobj)->axes.auto_ticks[2] = TRUE ;
00049     }
00050     else
00051     {
00052       sciprint("Second argument must be 'on' or 'off'") ;
00053       return SET_PROPERTY_ERROR ; ;
00054     }
00055     return SET_PROPERTY_SUCCEED ;
00056   }
00057   else if ( nbCol == 2 || nbCol == 3)
00058   {
00059     int i ;
00060     for ( i = 0; i < nbCol; i++ )
00061     {
00062       if ( strcmp(values[i],"off") == 0 )
00063       {
00064         pSUBWIN_FEATURE(pobj)->axes.auto_ticks[i] = FALSE ;
00065       }
00066       else if ( strcmp(values[i],"on") == 0 )
00067       {
00068         pSUBWIN_FEATURE(pobj)->axes.auto_ticks[i] = TRUE ;
00069       }
00070       else
00071       {
00072         sciprint("Second argument must be 'on' or 'off'.\n");
00073         return SET_PROPERTY_ERROR ;
00074       }
00075       return SET_PROPERTY_SUCCEED ;
00076     }   
00077   }
00078   else
00079   {
00080     sciprint("Number of the second argument must be taken between 1 to 3.\n") ;
00081     return SET_PROPERTY_ERROR ;
00082   }
00083   return SET_PROPERTY_ERROR ;
00084 }

Here is the call graph for this function:

int set_axes_bounds_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 20 of file set_axes_bounds_property.c.

References copyDoubleVectorFromStack(), isParameterDoubleMatrix(), NULL, pSUBWIN_FEATURE, SCI_SUBWIN, sciGetEntityType(), sciprint(), SET_PROPERTY_ERROR, SET_PROPERTY_SUCCEED, and set_scale().

00021 {
00022   if ( !isParameterDoubleMatrix( valueType ) )
00023   {
00024     sciprint("Incompatible type for property axes_bounds.\n") ;
00025     return SET_PROPERTY_ERROR ;
00026   }
00027 
00028   if ( sciGetEntityType(pobj) != SCI_SUBWIN )
00029   {
00030     sciprint( "axes_bounds property does not exist for this handle.\n" ) ;
00031     return SET_PROPERTY_ERROR ;
00032   }
00033   if ( nbRow * nbCol != 4 )
00034   {
00035     sciprint("Second argument must have 4 elements.\n");
00036     return SET_PROPERTY_ERROR ;
00037   }
00038   
00039   copyDoubleVectorFromStack( stackPointer, pSUBWIN_FEATURE (pobj)->WRect, 4 ) ;
00040 
00041   set_scale( "ttffff", pSUBWIN_FEATURE (pobj)->WRect, NULL, NULL, NULL, NULL ) ;
00042   return SET_PROPERTY_SUCCEED ;
00043 }

Here is the call graph for this function:

int set_axes_reverse_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 19 of file set_axes_reverse_property.c.

References FALSE, getStringMatrixFromStack(), i, isParameterStringMatrix(), pSUBWIN_FEATURE, SCI_SUBWIN, sciGetEntityType(), sciprint(), SET_PROPERTY_ERROR, SET_PROPERTY_SUCCEED, and TRUE.

00020 {
00021   char ** values = getStringMatrixFromStack( stackPointer ) ;
00022 
00023   if ( !isParameterStringMatrix( valueType ) )
00024   {
00025     sciprint("Incompatible type for property axes_reverse.\n") ;
00026     return SET_PROPERTY_ERROR ;
00027   }
00028 
00029   if ( sciGetEntityType( pobj ) != SCI_SUBWIN )
00030   {
00031     sciprint( "axes_reverse property does not exist for this handle.\n" ) ;
00032     return SET_PROPERTY_ERROR ;
00033   }
00034 
00035   if( nbCol == 1 )
00036   {
00037     /* only one parameter to set the value for every axes.*/
00038     if ( strcmp( values[0], "off" ) == 0 ) 
00039     {
00040       pSUBWIN_FEATURE (pobj)->axes.reverse[0] = FALSE ;
00041       pSUBWIN_FEATURE (pobj)->axes.reverse[1] = FALSE ;
00042       pSUBWIN_FEATURE (pobj)->axes.reverse[2] = FALSE ;
00043     }
00044     else if ( strcmp( values[0], "on" ) == 0 )
00045     {
00046       pSUBWIN_FEATURE (pobj)->axes.reverse[0] = TRUE ;
00047       pSUBWIN_FEATURE (pobj)->axes.reverse[1] = TRUE ;
00048       pSUBWIN_FEATURE (pobj)->axes.reverse[2] = TRUE ;
00049     }
00050     else
00051     {
00052       sciprint("Second argument must be 'on' or 'off'") ;
00053       return SET_PROPERTY_ERROR ; ;
00054     }
00055     return SET_PROPERTY_SUCCEED ;
00056   }
00057   else if ( nbCol == 2 || nbCol == 3)
00058   {
00059     int i ;
00060     for ( i = 0; i < nbCol; i++ )
00061     {
00062       if ( strcmp(values[i],"off") == 0 )
00063       {
00064         pSUBWIN_FEATURE(pobj)->axes.reverse[i] = FALSE ;
00065       }
00066       else if ( strcmp(values[i],"on") == 0 )
00067       {
00068         pSUBWIN_FEATURE(pobj)->axes.reverse[i] = TRUE ;
00069       }
00070       else
00071       {
00072         sciprint("Second argument must be 'on' or 'off'.\n");
00073         return SET_PROPERTY_ERROR ;
00074       }
00075     }
00076     return SET_PROPERTY_SUCCEED ;
00077   }
00078   else
00079   {
00080     sciprint("Number of the second argument must be taken between 1 to 3.\n") ;
00081     return SET_PROPERTY_ERROR ;
00082   }
00083   return SET_PROPERTY_ERROR ;
00084 }

Here is the call graph for this function:

int set_axes_size_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 19 of file set_axes_size_property.c.

References C2F, dr(), getDoubleMatrixFromStack(), getFigureModel(), int, isParameterDoubleMatrix(), L, na, PD0, pFIGURE_FEATURE, PI0, SCI_FIGURE, sciGetEntityType(), sciGetNum(), sciprint(), SET_PROPERTY_ERROR, and SET_PROPERTY_SUCCEED.

00020 {
00021   double * newWindowSize = getDoubleMatrixFromStack( stackPointer ) ;
00022 
00023   if ( !isParameterDoubleMatrix( valueType ) )
00024   {
00025     sciprint("Incompatible type for property axes_size.\n") ;
00026     return SET_PROPERTY_ERROR ;
00027   }
00028 
00029   if ( sciGetEntityType(pobj) != SCI_FIGURE )
00030   {
00031     sciprint("axes_size property undefined for this object") ;
00032     return SET_PROPERTY_ERROR ;
00033   }
00034 
00035   pFIGURE_FEATURE(pobj)->windowdimwidth = (int) newWindowSize[0] ; 
00036   pFIGURE_FEATURE(pobj)->windowdimheight= (int) newWindowSize[1] ;
00037 
00038   if ( pobj != getFigureModel() )
00039   {
00040     int verbose   = 0 ;
00041     int na        = 0 ;
00042     int curFigNum = 0 ;
00043     int figNum = sciGetNum( pobj ) ;
00044 
00045     C2F(dr)("xget","window",&verbose,&curFigNum,&na,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);  
00046     C2F(dr)("xset","window",&figNum,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
00047     C2F(dr)("xset","wdim",
00048       &(pFIGURE_FEATURE(pobj)->windowdimwidth),
00049       &(pFIGURE_FEATURE(pobj)->windowdimheight),
00050       PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
00051     C2F(dr)("xset","window",&curFigNum,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
00052   }
00053 
00054   return SET_PROPERTY_SUCCEED ;
00055 }

Here is the call graph for this function:

int set_axes_visible_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 20 of file set_axes_visible_property.c.

References FALSE, getStringMatrixFromStack(), i, isParameterStringMatrix(), pSUBWIN_FEATURE, SCI_SUBWIN, sciGetEntityType(), sciprint(), SET_PROPERTY_ERROR, SET_PROPERTY_SUCCEED, and TRUE.

00021 {
00022   char ** values = getStringMatrixFromStack( stackPointer ) ;
00023 
00024   if ( !isParameterStringMatrix( valueType ) )
00025   {
00026     sciprint("Incompatible type for property axes_visible.\n") ;
00027     return SET_PROPERTY_ERROR ;
00028   }
00029 
00030   if ( sciGetEntityType(pobj) != SCI_SUBWIN )
00031   {
00032     sciprint( "axes_visible property does not exist for this handle.\n" ) ;
00033     return SET_PROPERTY_ERROR ;
00034   }
00035 
00036   if( nbCol == 1 )
00037   {
00038 
00039     if ( strcmp( values[0], "off") == 0 )
00040     {
00041       pSUBWIN_FEATURE (pobj)->axes.axes_visible[0] = FALSE ;
00042       pSUBWIN_FEATURE (pobj)->axes.axes_visible[1] = FALSE ;
00043       pSUBWIN_FEATURE (pobj)->axes.axes_visible[2] = FALSE ;
00044     }
00045     else if ( strcmp( values[0], "on") == 0 )
00046     {
00047       pSUBWIN_FEATURE(pobj)->axes.axes_visible[0] = TRUE ;
00048       pSUBWIN_FEATURE(pobj)->axes.axes_visible[1] = TRUE ;
00049       pSUBWIN_FEATURE(pobj)->axes.axes_visible[2] = TRUE ;
00050     }
00051     else
00052     {
00053       sciprint("Second argument must be 'on' or 'off'.\n") ;
00054       return SET_PROPERTY_ERROR ;
00055     }
00056     return SET_PROPERTY_SUCCEED ;
00057   }
00058   else if ( nbCol == 2 || nbCol == 3 )
00059   {
00060     int i ;
00061     for ( i = 0; i < nbCol ; i++ )
00062     {
00063       if ( strcmp( values[i], "off" ) == 0)
00064       {
00065         pSUBWIN_FEATURE (pobj)->axes.axes_visible[i] = FALSE ;
00066       }
00067       else if ( strcmp( values[i], "on" ) == 0 )
00068       {
00069         pSUBWIN_FEATURE (pobj)->axes.axes_visible[i] = TRUE ;
00070       }
00071       else
00072       {
00073         sciprint("Second argument must be 'on' or 'off'.\n") ;
00074         return SET_PROPERTY_ERROR ;
00075       }
00076     }
00077     return SET_PROPERTY_SUCCEED ;
00078   }
00079   else
00080   {
00081     sciprint("Number of the second argument must be taken between 1 to 3.\n") ;
00082     return SET_PROPERTY_ERROR ;
00083   }
00084   return SET_PROPERTY_ERROR ;
00085 }

Here is the call graph for this function:

int set_background_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 16 of file set_background_property.c.

References getDoubleFromStack(), isParameterDoubleMatrix(), sciprint(), sciSetBackground(), and SET_PROPERTY_ERROR.

00017 {
00018   if ( !isParameterDoubleMatrix( valueType ) )
00019   {
00020     sciprint("Incompatible type for property background.\n") ;
00021     return SET_PROPERTY_ERROR ;
00022   }
00023 
00024   return sciSetBackground( pobj, (int)getDoubleFromStack(stackPointer) ) ;
00025 }

Here is the call graph for this function:

int set_bar_layout_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_bar_layout_property.c.

References isParameterStringMatrix(), isStringParamEqual(), pPOLYLINE_FEATURE, SCI_POLYLINE, sciGetEntityType(), sciprint(), SET_PROPERTY_ERROR, and SET_PROPERTY_SUCCEED.

00018 {
00019 
00020   if ( !isParameterStringMatrix( valueType ) )
00021   {
00022     sciprint("Incompatible type for property bar_layout.\n") ;
00023     return SET_PROPERTY_ERROR ;
00024   }
00025 
00026   if ( sciGetEntityType(pobj) != SCI_POLYLINE )
00027   {
00028     sciprint( "bar_layout property does not exist for this handle.\n" ) ;
00029     return SET_PROPERTY_ERROR ;
00030   }
00031   
00032   if( isStringParamEqual( stackPointer, "grouped" ) )
00033   {
00034     pPOLYLINE_FEATURE (pobj)->bar_layout = 0 ;
00035   }
00036   else if( isStringParamEqual( stackPointer, "stacked" ) )
00037   {
00038     pPOLYLINE_FEATURE (pobj)->bar_layout = 1 ;
00039   }
00040   else
00041   {
00042     sciprint( "bar_layout must be set to 'grouped' or 'stacked'.\n" ) ;
00043     return SET_PROPERTY_ERROR ;
00044   }
00045 
00046   return SET_PROPERTY_SUCCEED ;
00047 }

Here is the call graph for this function:

int set_bar_width_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_bar_width_property.c.

References getDoubleFromStack(), isParameterDoubleMatrix(), pPOLYLINE_FEATURE, SCI_POLYLINE, sciGetEntityType(), sciprint(), SET_PROPERTY_ERROR, and SET_PROPERTY_SUCCEED.

00018 {
00019 
00020   if ( !isParameterDoubleMatrix( valueType ) )
00021   {
00022     sciprint("Incompatible type for property bar_width.\n") ;
00023     return SET_PROPERTY_ERROR ;
00024   }
00025 
00026   if ( sciGetEntityType (pobj) != SCI_POLYLINE )
00027   {
00028     sciprint( "Object has no bar shift.\n" ) ;
00029     return SET_PROPERTY_ERROR ;
00030   }
00031   pPOLYLINE_FEATURE (pobj)->bar_width = getDoubleFromStack( stackPointer ) ;
00032   return SET_PROPERTY_SUCCEED ;
00033 }

Here is the call graph for this function:

int set_box_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_box_property.c.

References BT_BACK_HALF, BT_HIDDEN_AXIS, BT_OFF, BT_ON, FALSE, isParameterStringMatrix(), isStringParamEqual(), SCI_SUBWIN, sciGetEntityType(), sciprint(), sciSetBoxType(), sciSetIsBoxed(), SET_PROPERTY_ERROR, SET_PROPERTY_SUCCEED, and TRUE.

00018 {
00019 
00020   if ( !isParameterStringMatrix( valueType ) )
00021   {
00022     sciprint("Incompatible type for property box.\n") ;
00023     return SET_PROPERTY_ERROR ;
00024   }
00025 
00026   if ( sciGetEntityType( pobj ) == SCI_SUBWIN )
00027   {
00028     if ( isStringParamEqual( stackPointer, "off" ) )
00029     {
00030       return sciSetBoxType( pobj, BT_OFF ) ;
00031     }
00032     else if ( isStringParamEqual( stackPointer, "on" ) )
00033     {
00034       return sciSetBoxType( pobj, BT_ON ) ;
00035     }
00036     else if ( isStringParamEqual( stackPointer, "hidden_axis" ) )
00037     {
00038       return sciSetBoxType( pobj, BT_HIDDEN_AXIS ) ;
00039     }
00040     else if ( isStringParamEqual( stackPointer, "back_half" ) )
00041     {
00042       return sciSetBoxType( pobj, BT_BACK_HALF ) ;
00043     }
00044     else
00045     {
00046       sciprint("Second argument must be 'on', 'off', 'hidden_axis' or 'back_half'.\n") ;
00047       return SET_PROPERTY_ERROR ;
00048     }
00049   }
00050   else
00051   {
00052     if ( isStringParamEqual( stackPointer, "on" ) )
00053     {
00054       return sciSetIsBoxed( pobj, TRUE ) ;
00055     }
00056     else if ( isStringParamEqual( stackPointer, "off" ) )
00057     {
00058       return sciSetIsBoxed( pobj, FALSE ) ;
00059     }
00060     else
00061     {
00062       sciprint("Second argument must be 'on' or 'off'.\n") ;
00063       return SET_PROPERTY_SUCCEED ;
00064     }
00065   }
00066 
00067   return SET_PROPERTY_ERROR ;
00068 
00069 }

Here is the call graph for this function:

int set_callback_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_callback_property.c.

References getStringFromStack(), isParameterStringMatrix(), sciAddCallback(), sciprint(), and SET_PROPERTY_ERROR.

00018 {
00019   if ( !isParameterStringMatrix( valueType ) )
00020   {
00021     sciprint("Incompatible type for property callback.\n") ;
00022     return SET_PROPERTY_ERROR ;
00023   }
00024 
00025   return sciAddCallback( pobj, getStringFromStack( stackPointer ), nbRow * nbCol, 1 ) ;
00026 }

Here is the call graph for this function:

int set_callback_type_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_callback_type_property.c.

References isParameterStringMatrix(), isStringParamEqual(), pUIMENU_FEATURE, SCI_UIMENU, sciGetEntityType(), sciprint(), SET_PROPERTY_ERROR, and SET_PROPERTY_SUCCEED.

00018 {
00019 
00020   if ( !isParameterStringMatrix( valueType ) )
00021   {
00022     sciprint("Incompatible type for property callback_type.\n") ;
00023     return SET_PROPERTY_ERROR ;
00024   }
00025 
00026   if (sciGetEntityType (pobj) != SCI_UIMENU)
00027   {
00028     sciprint("callback_type property does not exist for this handle.\n");
00029     return SET_PROPERTY_ERROR ;
00030   }
00031 
00032   if ( isStringParamEqual( stackPointer, "string" ) )
00033   {
00034     pUIMENU_FEATURE(pobj)->CallbackType = 0 ;
00035   }
00036   else if ( isStringParamEqual( stackPointer, "C" ) )
00037   {
00038     pUIMENU_FEATURE(pobj)->CallbackType = 1 ;
00039   }
00040   else if ( isStringParamEqual( stackPointer, "internal" ) )
00041   {
00042     pUIMENU_FEATURE(pobj)->CallbackType = 2 ;
00043   }
00044   else if ( isStringParamEqual( stackPointer, "addmenu" ) )
00045   {
00046     pUIMENU_FEATURE(pobj)->CallbackType = 3 ;
00047   }
00048   else
00049   {
00050     sciprint("Value must be 'string','C','internal','addmenu'.\n" ) ;
00051     return SET_PROPERTY_ERROR ;
00052   }
00053 
00054   return SET_PROPERTY_SUCCEED ;
00055 }

Here is the call graph for this function:

int set_callbackmevent_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 18 of file set_callbackmevent_property.c.

References getDoubleFromStack(), isParameterDoubleMatrix(), sciprint(), sciSetCallbackMouseEvent(), and SET_PROPERTY_ERROR.

00019 {
00020   if ( !isParameterDoubleMatrix( valueType ) )
00021   {
00022     sciprint("Incompatible type for property callbackmevent.\n") ;
00023     return SET_PROPERTY_ERROR ;
00024   }
00025 
00026   return sciSetCallbackMouseEvent( pobj, (int) getDoubleFromStack( stackPointer ) ) ;
00027 }

Here is the call graph for this function:

int set_cdata_mapping_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 20 of file set_cdata_mapping_property.c.

References sciSurface::cdatamapping, sciSurface::color, doubleArrayCopy(), FREE, isParameterStringMatrix(), isStringParamEqual(), LinearScaling2Colormap(), MALLOC, sciSurface::nc, nc, NULL, pSURFACE_FEATURE, SCI_FAC3D, SCI_SURFACE, sciGetEntityType(), sciprint(), SET_PROPERTY_ERROR, SET_PROPERTY_SUCCEED, and sciSurface::zcol.

00021 {
00022   sciSurface * ppSurf = NULL ;
00023 
00024   if ( !isParameterStringMatrix( valueType ) )
00025   {
00026     sciprint("Incompatible type for property cdata_mapping.\n") ;
00027     return SET_PROPERTY_ERROR ;
00028   }
00029 
00030   if ( sciGetEntityType(pobj) != SCI_SURFACE || pSURFACE_FEATURE(pobj)->typeof3d != SCI_FAC3D )
00031   {
00032     sciprint("cdata_mapping property does not exist for this handle.\n") ;
00033     return SET_PROPERTY_ERROR ;
00034   }
00035 
00036   ppSurf = pSURFACE_FEATURE ( pobj ) ;
00037 
00038   if ( isStringParamEqual( stackPointer, "scaled" ) )
00039   {
00040     if( ppSurf->cdatamapping != 0 )
00041     { /* not already scaled */
00042       LinearScaling2Colormap(pobj);
00043       ppSurf->cdatamapping = 0;
00044     }
00045   } 
00046   else if ( isStringParamEqual( stackPointer, "direct" ) )
00047   {
00048     if(pSURFACE_FEATURE (pobj)->cdatamapping != 1)
00049     { 
00050       /* not already direct */
00051       int nc = ppSurf->nc ;
00052 
00053       FREE( ppSurf->color ) ;
00054       ppSurf->color = NULL ;
00055 
00056       if( nc > 0 )
00057       {
00058         if ((ppSurf->color = MALLOC (nc * sizeof (double))) == NULL)
00059         {
00060           sciprint( "Unable to allocate color vector, memory full.\n" ) ;
00061           return SET_PROPERTY_ERROR ;
00062         }
00063       }
00064 
00065       doubleArrayCopy( ppSurf->color, ppSurf->zcol, nc ) ;
00066 
00067 
00068       ppSurf->cdatamapping = 1 ;
00069     }
00070   }
00071   else
00072   {
00073     sciprint("cdata_mapping value must be 'scaled' or 'direct'.\n") ;
00074     return SET_PROPERTY_ERROR ;
00075   }
00076 
00077   return SET_PROPERTY_SUCCEED ;
00078 
00079 
00080 }

Here is the call graph for this function:

int set_children_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 16 of file set_children_property.c.

References sciprint(), and SET_PROPERTY_ERROR.

00017 {
00018   sciprint( "Children property can not be modified directly.\n" ) ;
00019   return SET_PROPERTY_ERROR ;
00020 }

Here is the call graph for this function:

int set_clip_box_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_clip_box_property.c.

References getDoubleMatrixFromStack(), isParameterDoubleMatrix(), sciprint(), sciSetClipping(), sciSetFinalStatus(), sciSetIsClipping(), and SET_PROPERTY_ERROR.

00018 {
00019   int status1 ;
00020   int status2 ;
00021 
00022   if ( !isParameterDoubleMatrix( valueType ) )
00023   {
00024     sciprint("Incompatible type for property clip_box.\n") ;
00025     return SET_PROPERTY_ERROR ;
00026   }
00027 
00028   /* On doit avoir avoir une matrice 4x1 */
00029   if ( nbRow * nbCol != 4 )
00030   {
00031     sciprint("Argument must be a vector of size 4.\n");
00032     return SET_PROPERTY_ERROR ;
00033   }
00034   status1 = sciSetClipping( pobj, getDoubleMatrixFromStack( stackPointer ) ) ;
00035   status2 = sciSetIsClipping( pobj, 1 ) ;
00036   return sciSetFinalStatus( (SetPropertyStatus)status1, (SetPropertyStatus)status2 ) ;
00037 
00038 }

Here is the call graph for this function:

int set_clip_state_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_clip_state_property.c.

References isParameterStringMatrix(), isStringParamEqual(), sciGetIsClipRegionValuated(), sciprint(), sciSetIsClipping(), and SET_PROPERTY_ERROR.

00018 {
00019 
00020   if ( !isParameterStringMatrix( valueType ) )
00021   {
00022     sciprint("Incompatible type for property clip_state.\n") ;
00023     return SET_PROPERTY_ERROR ;
00024   }
00025 
00026   if ( !isParameterStringMatrix( valueType ) )
00027   {
00028     sciprint("Incompatible type for property axes_visible.\n") ;
00029     return SET_PROPERTY_ERROR ;
00030   }
00031 
00032   if ( isStringParamEqual( stackPointer, "clipgrf" ) )
00033   {
00034     return sciSetIsClipping( pobj, 0 ) ;
00035   }
00036   else if ( isStringParamEqual( stackPointer, "off" ) )
00037   {
00038     return sciSetIsClipping(  pobj, -1 ) ;
00039   }
00040   else if ( isStringParamEqual( stackPointer, "on" ) )
00041   {
00042     if ( sciGetIsClipRegionValuated(pobj) == 1 )
00043     {
00044       return sciSetIsClipping( pobj, 1 ) ;
00045     }
00046     else
00047     {
00048       return sciSetIsClipping( pobj, 0 ) ;
00049     }
00050   }
00051   else
00052   {
00053     sciprint("Value must be 'clipgrf', 'on' or 'off'.\n") ;
00054     return SET_PROPERTY_ERROR ;
00055   }
00056   return SET_PROPERTY_ERROR ;
00057 }

Here is the call graph for this function:

int set_closed_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_closed_property.c.

References isParameterStringMatrix(), isStringParamEqual(), pPOLYLINE_FEATURE, SCI_POLYLINE, sciGetEntityType(), sciprint(), SET_PROPERTY_ERROR, and SET_PROPERTY_SUCCEED.

00018 {
00019 
00020   if ( !isParameterStringMatrix( valueType ) )
00021   {
00022     sciprint("Incompatible type for property closed.\n") ;
00023     return SET_PROPERTY_ERROR ;
00024   }
00025 
00026   if(sciGetEntityType(pobj) != SCI_POLYLINE)
00027   {
00028     sciprint( "closed property does not exist for this handle.\n" ) ;
00029     return SET_PROPERTY_ERROR ;
00030   }
00031 
00032   if ( isStringParamEqual( stackPointer, "on" ) )
00033   {
00034     pPOLYLINE_FEATURE(pobj)->closed = 1 ;
00035   }
00036   else if ( isStringParamEqual( stackPointer, "off" ) )
00037   {
00038     pPOLYLINE_FEATURE(pobj)->closed = 0 ;
00039   }
00040   else
00041   {
00042     sciprint("Nothing to do (value must be 'on/off').\n") ;
00043     return SET_PROPERTY_ERROR ;
00044   }
00045   return SET_PROPERTY_SUCCEED ;
00046 }

Here is the call graph for this function:

int set_color_flag_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 20 of file set_color_flag_property.c.

References sciSurface::cdatamapping, sciSurface::color, sciSurface::dimzx, sciSurface::dimzy, doubleArrayCopy(), sciSurface::flag, FREE, getDoubleFromStack(), i, sciSurface::inputCMoV, int, isParameterDoubleMatrix(), j, LinearScaling2Colormap(), MALLOC, sciSurface::nc, nc, NULL, pSURFACE_FEATURE, SCI_FAC3D, SCI_PLOT3D, SCI_SURFACE, sciGetEntityType(), sciprint(), SET_PROPERTY_ERROR, SET_PROPERTY_SUCCEED, SET_PROPERTY_UNCHANGED, and sciSurface::zcol.

00021 {
00022   int flagcolor = (int) getDoubleFromStack( stackPointer ) ;
00023 
00024   if ( !isParameterDoubleMatrix( valueType ) )
00025   {
00026     sciprint("Incompatible type for property color_flag.\n") ;
00027     return SET_PROPERTY_ERROR ;
00028   }
00029 
00030   if ( sciGetEntityType(pobj) != SCI_SURFACE )
00031   {
00032     sciprint( "color_flag property does not exist for this handle.\n" ) ;
00033     return SET_PROPERTY_ERROR ;
00034   }
00035   if ( nbRow * nbCol != 1 )
00036   {
00037     sciprint("Second argument must be a scalar.\n") ;
00038     return SET_PROPERTY_ERROR ;
00039   }
00040 
00041   if ( pSURFACE_FEATURE (pobj)->typeof3d == SCI_PLOT3D )
00042   {
00043     if ( flagcolor < 0 || flagcolor > 1 )
00044     {
00045       sciprint("Second argument must be equal to 0 or 1.\n") ;
00046       return SET_PROPERTY_ERROR ;
00047     }
00048     pSURFACE_FEATURE(pobj)->flagcolor = flagcolor ;
00049     return SET_PROPERTY_SUCCEED ;
00050   }
00051   else if ( pSURFACE_FEATURE (pobj)->typeof3d == SCI_FAC3D ) 
00052   {
00053 
00054     sciSurface * psurf = pSURFACE_FEATURE (pobj);
00055 
00056     if ( flagcolor < 0 || flagcolor > 4 )
00057     {
00058       sciprint( "Second argument must be 0 1 2 3 or 4.\n" ) ;
00059       return -1 ;
00060     }
00061 
00062 
00063     /* F.Leray 18.03.04 Something goes wrong here: No need to re-build/re-alloc zcol normally!!*/
00064     /* YES in fact but use of another fixed array named inputCMoV (inputColorMatrixorVector)*/
00065 
00066     if ( pSURFACE_FEATURE(pobj)->flagcolor == flagcolor )
00067     {
00068       return SET_PROPERTY_UNCHANGED ;
00069     }
00070 
00071     if( flagcolor == 0 || flagcolor == 1 )
00072     {
00073       pSURFACE_FEATURE(pobj)->izcol = 0;
00074     }
00075     else if( flagcolor == 2 ) /* Warning: here we need a color vector (one color per facet). N = 1 x dimzy  */
00076     {
00077       int m3n = pSURFACE_FEATURE (pobj)->m3n;
00078       int n3n = pSURFACE_FEATURE (pobj)->n3n;
00079       int nc = psurf->dimzy; /* rappel: dimzy always equal n3*/
00080 
00081       psurf->nc = nc;
00082       FREE(psurf->zcol); psurf->zcol = NULL;
00083 
00084       if( nc > 0 )
00085       {
00086         if ((psurf->zcol = MALLOC (nc * sizeof (double))) == NULL)
00087         {
00088           sciprint( "Unable to create color vector, memory full.\n" ) ;
00089           return SET_PROPERTY_ERROR ;
00090         }
00091       }
00092 
00093       if( m3n * n3n != 0 )
00094       { /* There is either a color matrix or vector*/
00095         if( m3n==1 || n3n ==1)
00096         {
00097           /* nc value is dimzx*dimzy == m3n * n3n */
00098           doubleArrayCopy( psurf->zcol, psurf->inputCMoV, nc ) ;
00099           /* We have just enough information to fill the psurf->zcol array*/
00100         }
00101         else
00102         {
00103           /* We have too much information and we take only the first dimzy colors to fill the psurf->zcol array*/
00104           /* NO !! Let's do better; F.Leray 08.05.04 : */
00105           /* We compute the average value (sum of the value of the nf=m3n vertices on a facet) / (nb of vertices per facet which is nf=m3n) */
00106           /* in our example: m3n=4 and n3n=400 */
00107           int i ;
00108           int j ;
00109           for ( j = 0 ; j < nc ; j++ )   /* nc value is dimzy*/
00110           {
00111             double tmp = 0 ;
00112             for( i = 0 ; i < m3n ; i++)
00113             {
00114               tmp = tmp +  psurf->inputCMoV[j*m3n + i ];
00115             }
00116             tmp = tmp / m3n;
00117             psurf->zcol[j] = tmp;
00118           }
00119         }
00120       }
00121       else
00122       {
00123         int j ;
00124         /* There is no color matrix/vect. in input */
00125         for ( j = 0 ; j < psurf->dimzy ; j++ )   /* nc value is dimzy*/
00126         {
00127           psurf->zcol[j]= psurf->flag[0] ;
00128         }
00129       }
00130 
00131     }
00132     else if ( flagcolor == 3 ) /* interpolated (shading) case */
00133     {
00134       int m3n = pSURFACE_FEATURE (pobj)->m3n;
00135       int n3n = pSURFACE_FEATURE (pobj)->n3n;
00136       int nc = psurf->dimzx * psurf->dimzy;
00137 
00138       psurf->nc = nc;
00139       FREE(psurf->zcol); psurf->zcol = NULL;
00140 
00141 
00142       if ((psurf->zcol = MALLOC ( nc * sizeof (double))) == NULL)
00143       {
00144         sciprint( "Unable to create color vector, memory full.\n" ) ;
00145         return SET_PROPERTY_ERROR ;
00146       }
00147 
00148 
00149       if( m3n * n3n != 0 ) /* There is either a color matrix or vector*/
00150       {
00151         if( m3n == 1 || n3n == 1 ) /* COLOR VECTOR */
00152         {
00153           int i ;
00154           int j ;
00155           /* We have insufficient info. to fill the entire zcol array of dimension nc = dimzx*dimzy*/
00156           /* We repeat the data:*/
00157           for(i = 0; i< psurf->dimzy; i++)
00158           {
00159             for (j = 0;j < psurf->dimzx; j++)
00160             {
00161               /* nc value is dimzx*dimzy == m3n * n3n */
00162               psurf->zcol[(psurf->dimzx)*i+j]= psurf->inputCMoV[i];
00163             }
00164           }                     
00165         }
00166         else /* COLOR MATRIX */
00167         {
00168           /* We have just enough information to fill the psurf->zcol array*/
00169           doubleArrayCopy( psurf->zcol, psurf->inputCMoV, (psurf->dimzx) * (psurf->dimzy) ) ;
00170         }
00171       }
00172       else
00173       {
00174         int i ;
00175         int j ;
00176         /* There is no color matrix/vect. in input */
00177         for(i = 0; i<  psurf->dimzy; i++)
00178         {
00179           for (j = 0;j <  psurf->dimzx; j++)  /* nc value is dimzx*dimzy == m3n * n3n */
00180           {
00181             psurf->zcol[( psurf->dimzx)*i+j]= psurf->flag[0];
00182           }
00183         }
00184       }
00185     }
00186     /* New : case == 4 introduced on the 10.03.05 (F.Leray) to support faceted (flat) Matlab case */
00187     else if ( flagcolor == 4 ) /* Warning: here we need a color vector (one color per facet). N = 1 x dimzy  */
00188     {
00189       int m3n = pSURFACE_FEATURE (pobj)->m3n;
00190       int n3n = pSURFACE_FEATURE (pobj)->n3n;
00191       int nc = psurf->dimzy ; /* rappel: dimzy always equal n3*/
00192 
00193       psurf->nc = nc;
00194       FREE(psurf->zcol); psurf->zcol = NULL;
00195 
00196       if( nc > 0 )
00197       {
00198         if ((psurf->zcol = MALLOC (nc * sizeof (double))) == NULL)
00199         {
00200           sciprint( "Unable to create color vector, memory full.\n" ) ;
00201           return SET_PROPERTY_ERROR ;
00202         }
00203       }
00204 
00205       if( m3n * n3n != 0 )
00206       {
00207         /* There is either a color matrix or vector */
00208         if ( m3n == 1 || n3n == 1 )
00209         {
00210           /* We have just enough information to fill the psurf->zcol array*/
00211           /* nc value is dimzx*dimzy == m3n * n3n */
00212           doubleArrayCopy(psurf->zcol, psurf->inputCMoV, nc ) ;
00213         }
00214         else
00215         {
00216           int j ;
00217           /* input : color matrix , we use 1 color per facet with Matlab selection mode (no average computed) */
00218           /* HERE is the difference with case 2 */
00219           for ( j = 0 ; j < nc ; j++ )
00220           {
00221             /* nc value is dimzy*/
00222             psurf->zcol[j] = psurf->inputCMoV[j*m3n];
00223           }
00224         }
00225       }
00226       else if (m3n * n3n == 0)
00227       {
00228         int j ;
00229         /* There is no color matrix/vect. in input */
00230         for ( j = 0 ; j < psurf->dimzy ; j++ )
00231         {
00232           /* nc value is dimzy*/
00233           psurf->zcol[j]= psurf->flag[0];
00234         }
00235       }
00236     }
00237 
00238     if( flagcolor != 0 && flagcolor != 1 )
00239     { 
00240       /* We need to rebuild ...->color matrix */
00241       if( psurf->cdatamapping == 0 )
00242       { /* scaled */
00243         FREE(psurf->color);
00244         psurf->color = NULL ;
00245         LinearScaling2Colormap(pobj);
00246       }
00247       else
00248       {
00249         int nc = psurf->nc;
00250 
00251         FREE(psurf->color);
00252         psurf->color = NULL ;
00253 
00254         if( nc > 0 )
00255         {
00256           if ((psurf->color = MALLOC (nc * sizeof (double))) == NULL)
00257           {
00258             sciprint( "Unable to create color vector, memory full.\n" ) ;
00259             return -1;
00260           }
00261           doubleArrayCopy( psurf->color, psurf->zcol, nc ) ;
00262         }
00263         /* copy zcol that has just been freed and re-alloc + filled in */
00264       }
00265     }
00266 
00267     /* Finally, update the flagcolor */
00268     pSURFACE_FEATURE (pobj)->flagcolor = flagcolor;
00269   }
00270 
00271   return SET_PROPERTY_SUCCEED ;
00272 
00273 }

Here is the call graph for this function:

int set_color_map_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 16 of file set_color_map_property.c.

References getDoubleMatrixFromStack(), isParameterDoubleMatrix(), sciprint(), sciSetColormap(), and SET_PROPERTY_ERROR.

00017 {
00018   if ( !isParameterDoubleMatrix( valueType ) )
00019   {
00020     sciprint("Incompatible type for property color_map.\n") ;
00021     return SET_PROPERTY_ERROR ;
00022   }
00023 
00024   return sciSetColormap( pobj, getDoubleMatrixFromStack( stackPointer), nbRow, nbCol ) ;
00025 }

Here is the call graph for this function:

int set_color_mode_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 20 of file set_color_mode_property.c.

References sciSurface::cdatamapping, sciSurface::color, sciSurface::dimzx, sciSurface::dimzy, doubleArrayCopy(), sciSurface::flag, sciSurface::flagcolor, FREE, getDoubleFromStack(), isParameterDoubleMatrix(), j, LinearScaling2Colormap(), sciSurface::m3n, MALLOC, sciSurface::n3n, sciSurface::nc, nc, NULL, pSURFACE_FEATURE, SCI_SURFACE, sciGetEntityType(), sciprint(), SET_PROPERTY_ERROR, and sciSurface::zcol.

00021 {
00022   int flagcolor;
00023   sciSurface * psurf = NULL ;
00024 
00025   if ( !isParameterDoubleMatrix( valueType ) )
00026   {
00027     sciprint("Incompatible type for property color_mode.\n") ;
00028     return SET_PROPERTY_ERROR ;
00029   }
00030 
00031   if ( sciGetEntityType(pobj) != SCI_SURFACE )
00032   {
00033     sciprint( "color_mode property does not exist for this handle.\n" ) ;
00034     return SET_PROPERTY_ERROR ;
00035   }
00036 
00037   psurf =  pSURFACE_FEATURE (pobj) ;
00038 
00039   flagcolor = psurf->flagcolor;
00040 
00041   psurf->flag[0]= (integer) getDoubleFromStack( stackPointer ) ;
00042 
00043   if( flagcolor != 0 && flagcolor != 1 )
00044   {
00045     if( psurf->m3n * psurf->n3n == 0 )
00046     {
00047       /* There is not any color matrix/vect. in input : update the fake color one */
00048       int j,nc;
00049 
00050       if( flagcolor == 2 || flagcolor == 4 )
00051       {
00052         nc = psurf->dimzy; /* remind: dimzy always equal n3*/
00053       }
00054       else if(flagcolor == 3)
00055       {
00056         nc = psurf->dimzx * psurf->dimzy;
00057       }
00058 
00059       FREE(psurf->zcol);
00060 
00061 
00062       if ((psurf->zcol = MALLOC ( nc * sizeof (double))) == NULL)
00063       {
00064         sciprint("Can not performed requested action, memory full.\n" ) ;
00065         return SET_PROPERTY_ERROR ;
00066       }
00067 
00068       for (j = 0;j < nc; j++)
00069       {
00070         /* nc value is dimzy*/
00071         psurf->zcol[j]= psurf->flag[0];
00072       }
00073 
00074 
00075       if ( flagcolor != 0 && flagcolor != 1 )
00076       { 
00077         /* We need to rebuild ...->color matrix */
00078         if ( psurf->cdatamapping == 0 )
00079         {
00080           /* scaled */
00081           FREE(psurf->color);
00082           LinearScaling2Colormap(pobj);
00083         }
00084         else
00085         {
00086           int nc_ = psurf->nc;
00087 
00088           FREE(psurf->color);
00089           psurf->color = NULL ;
00090           
00091 
00092           if ( nc_ > 0 )
00093           {
00094             if ((psurf->color = MALLOC (nc_ * sizeof (double))) == NULL)
00095             {
00096               sciprint("Can not performed requested action, memory full.\n" ) ;
00097               return SET_PROPERTY_ERROR ;
00098             }
00099             doubleArrayCopy( psurf->color, psurf->zcol, nc_ ) ;
00100           }
00101           /* copy zcol that has just been freed and re-alloc + filled in */
00102         }
00103       }
00104     }
00105   }
00106 
00107   if ( psurf->typeof3d == SCI_FAC3D )
00108   {
00109     /* we have to deal with colors... and may be update because we just changed  psurf->flag[0]*/
00110     if( psurf->flagcolor == 0 )
00111     {
00112       pSURFACE_FEATURE (pobj)->izcol = 0;
00113     }
00114   }
00115 
00116   return SET_PROPERTY_SUCCEED ;
00117 
00118 }

Here is the call graph for this function:

int set_colored_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_colored_property.c.

References isParameterStringMatrix(), isStringParamEqual(), pSEGS_FEATURE, SCI_SEGS, sciGetEntityType(), sciprint(), SET_PROPERTY_ERROR, and SET_PROPERTY_SUCCEED.

00018 {
00019   
00020   if ( !isParameterStringMatrix( valueType ) )
00021   {
00022     sciprint("Incompatible type for property colored.\n") ;
00023     return SET_PROPERTY_ERROR ;
00024   }
00025 
00026   if ( sciGetEntityType( pobj ) != SCI_SEGS || pSEGS_FEATURE(pobj)->ptype == 0 )
00027   {
00028     sciprint( "colored property does not exist for this handle.\n" ) ;
00029     return SET_PROPERTY_ERROR ;
00030   }
00031 
00032     if ( isStringParamEqual( stackPointer, "on") )
00033     {
00034       pSEGS_FEATURE(pobj)->typeofchamp = 1 ;
00035     }
00036     else if ( isStringParamEqual( stackPointer, "off") )
00037     {
00038       pSEGS_FEATURE(pobj)->typeofchamp = 0 ;
00039     }
00040     else
00041     {
00042       sciprint("Value must be 'on' or 'off'.\n") ;
00043       return SET_PROPERTY_ERROR ;
00044     }
00045 
00046     return SET_PROPERTY_SUCCEED ;
00047 
00048 }

Here is the call graph for this function:

int set_cube_scaling_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_cube_scaling_property.c.

References FALSE, isParameterStringMatrix(), isStringParamEqual(), pSUBWIN_FEATURE, SCI_SUBWIN, sciGetEntityType(), sciGetIs3d(), sciprint(), SET_PROPERTY_ERROR, SET_PROPERTY_SUCCEED, and TRUE.

00018 {
00019 
00020   if ( !isParameterStringMatrix( valueType ) )
00021   {
00022     sciprint("Incompatible type for property cube_scaling.\n") ;
00023     return SET_PROPERTY_ERROR ;
00024   }
00025 
00026   if ( sciGetEntityType(pobj) != SCI_SUBWIN )
00027   {
00028     sciprint("cube_scaling property does not exist for this handle.\n") ;
00029     return SET_PROPERTY_ERROR ;
00030   }
00031 
00032   if( !sciGetIs3d(pobj) )
00033   {
00034     sciprint("Warning: cube_scaling property is only used in 3D mode.\n");
00035   }
00036 
00037   if ( isStringParamEqual(stackPointer, "on" ) )
00038   {
00039     pSUBWIN_FEATURE (pobj)->cube_scaling = TRUE ;
00040   }
00041   else if ( isStringParamEqual( stackPointer, "off") )
00042   {
00043     pSUBWIN_FEATURE (pobj)->cube_scaling = FALSE ;
00044   }
00045   else
00046   {
00047     sciprint("Value must be 'on' or 'off' / Only use for 3D mode.\n") ;
00048     return SET_PROPERTY_ERROR ;
00049   }
00050   return SET_PROPERTY_SUCCEED ;
00051 
00052 }

Here is the call graph for this function:

int set_current_axes_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 18 of file set_current_axes_property.c.

References getHandleFromStack(), isParameterHandle(), NULL, num, SCI_SUBWIN, sciGetEntityType(), sciGetNum(), sciGetParentFigure(), sciGetPointerFromHandle(), sciprint(), sciSetFinalStatus(), sciSetSelectedSubWin(), sciSetUsedWindow(), and SET_PROPERTY_ERROR.

00019 {
00020   sciPointObj * curAxes   = NULL ;
00021   sciPointObj * parentFig = NULL ;
00022   int num = -1 ;
00023   int status1 = 1 ;
00024   int status2 = 1 ;
00025   
00026   if ( !isParameterHandle( valueType ) )
00027   {
00028     sciprint("Incompatible type for property current_axes.\n") ;
00029     return SET_PROPERTY_ERROR ;
00030   }
00031 
00032   curAxes = sciGetPointerFromHandle( getHandleFromStack( stackPointer ) ) ;
00033 
00034   if ( curAxes == NULL)
00035   {
00036     sciprint("Object is not valid.\n") ;
00037     return -1 ;
00038   }
00039   if ( sciGetEntityType( curAxes ) != SCI_SUBWIN )
00040   {
00041     sciprint("Object is not an Axes Entity.\n") ;
00042     return -1 ;
00043   }
00044 
00045   status1 = sciSetSelectedSubWin( curAxes ) ;
00046   /* F.Leray 11.02.05 : if the new selected subwin is not inside the current figure, */
00047   /* we must also set the current figure to subwin->parent */
00048   parentFig = sciGetParentFigure( curAxes );
00049 
00050   num  = sciGetNum( parentFig ) ;
00051 
00052   status2 = sciSetUsedWindow( num ) ;
00053 
00054   /* End modif. on the 11.02.05 */
00055   return sciSetFinalStatus( (SetPropertyStatus)status1, (SetPropertyStatus)status2 ) ;
00056 
00057 }

Here is the call graph for this function:

int set_current_entity_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_current_entity_property.c.

References getHandleFromStack(), isParameterHandle(), NULL, sciGetPointerFromHandle(), sciprint(), sciSetCurrentObj(), SET_PROPERTY_ERROR, and SET_PROPERTY_SUCCEED.

00018 {
00019   sciPointObj * curEntity = NULL ;
00020   
00021   if ( !isParameterHandle( valueType ) )
00022   {
00023     sciprint("Incompatible type for property current_entity.\n") ;
00024     return SET_PROPERTY_ERROR ;
00025   }
00026 
00027   curEntity = sciGetPointerFromHandle( getHandleFromStack( stackPointer ) ) ;
00028 
00029   if ( curEntity == NULL )
00030   {
00031     sciprint( "Object is not valid.\n" ) ;
00032     return SET_PROPERTY_ERROR ;
00033   }
00034   sciSetCurrentObj( curEntity ) ;
00035   return SET_PROPERTY_SUCCEED ;
00036 }

Here is the call graph for this function:

int set_current_figure_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_current_figure_property.c.

References getDoubleFromStack(), getHandleFromStack(), int, isParameterDoubleMatrix(), isParameterHandle(), NULL, res, SCI_FIGURE, sciGetEntityType(), sciGetNum(), sciGetPointerFromHandle(), sciprint(), and sciSetUsedWindow().

00018 {
00019   int figNum = -1 ;
00020   int res = -1 ;
00021 
00022   if ( isParameterHandle( valueType ) )
00023   {
00024     sciPointObj * curFig = sciGetPointerFromHandle( getHandleFromStack( stackPointer ) ) ;
00025     
00026     if ( curFig == NULL )
00027     {
00028       sciprint( "Object is not valid.\n" ) ;
00029       return -1 ;
00030     }
00031     if ( sciGetEntityType( curFig ) != SCI_FIGURE )
00032     {
00033       sciprint("Object is not a handle on a figure.\n");
00034       return -1;
00035     }
00036     figNum = sciGetNum( curFig ) ;
00037   }
00038   else if ( isParameterDoubleMatrix( valueType ) )
00039   {
00040     figNum = (int) getDoubleFromStack( stackPointer ) ;
00041   }
00042   else
00043   {
00044     sciprint("Bad argument to determine the current figure: should be a window number or a handle (available under new graphics mode only).\n") ;
00045     return -1 ;
00046   }
00047 
00048   /* select the figure num */
00049   res = sciSetUsedWindow( figNum ) ;
00050   if ( res < 0 )
00051   {
00052     sciprint("It was not possible to create the requested figure.\n");
00053   }
00054   return res ;
00055 
00056 }

Here is the call graph for this function:

int set_data_bounds_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 127 of file set_data_bounds_property.c.

References copyDoubleVectorFromStack(), FALSE, finite(), sciSubWindow::FirstPlot, getdDataBoundsFromStack(), isParameterDoubleMatrix(), sciSubWindow::logflags, pSUBWIN_FEATURE, pSURFACE_FEATURE, SCI_SUBWIN, SCI_SURFACE, sciGetEntityType(), sciprint(), SET_PROPERTY_ERROR, SET_PROPERTY_SUCCEED, and sciSubWindow::SRect.

00128 {
00129   if ( !isParameterDoubleMatrix( valueType ) )
00130   {
00131     sciprint("Incompatible type for property data_bounds.\n") ;
00132     return SET_PROPERTY_ERROR ;
00133   }
00134 
00135   if (sciGetEntityType (pobj) == SCI_SUBWIN)
00136   {
00137 
00138     /* JB Silvy 09/11/05 */
00139     sciSubWindow * ppSubWin = pSUBWIN_FEATURE (pobj) ;
00140     double   xMin ;
00141     double   xMax ;
00142     double   yMin ;
00143     double   yMax ;
00144     double   zMin ;
00145     double   zMax ;
00146 
00147     /* get the bounds */
00148     if ( getdDataBoundsFromStack( stackPointer, nbRow, nbCol, &xMin, &xMax, &yMin, &yMax, &zMin, &zMax ) == SET_PROPERTY_ERROR )
00149     {
00150       return SET_PROPERTY_ERROR ;
00151     }
00152 
00153     /* check if there is not an inf within the values */
00154     /* since this has not any meaning */
00155     if (    !finite(xMin) || !finite(xMax)
00156          || !finite(yMin) || !finite(yMax)
00157          || !finite(zMin) || !finite(zMax) )
00158     {
00159       sciprint("Error : data_bounds values must be finite.");
00160       return SET_PROPERTY_ERROR ;
00161     }
00162 
00163 
00164     /* check if the bounds are corrects */
00165     /* allows equality with bounds since it is working */
00166     if ( xMin > xMax || yMin > yMax || zMin > zMax )
00167     {
00168       sciprint("Error : Min and Max values for one axis do not verify Min <= Max.\n");
00169       return SET_PROPERTY_ERROR ;
00170     }
00171 
00172     /* check for logflags that values are greater than 0 */
00173     if (   ( ppSubWin->logflags[0] == 'l' && xMin <= 0.0 )
00174       || ( ppSubWin->logflags[1] == 'l' && yMin <= 0.0 )
00175       || ( ppSubWin->logflags[2] == 'l' && zMin <= 0.0 ) )
00176     {
00177       sciprint("Error: bounds on axis must be strictly positive to use logarithmic mode\n" ) ;
00178       return SET_PROPERTY_ERROR ;
00179     }
00180 
00181     /* copy the values in the axis */
00182     if ( nbRow * nbCol == 4 )
00183     { 
00184       /* 2D */
00185       ppSubWin->SRect[0] = xMin ;
00186       ppSubWin->SRect[1] = xMax ;
00187       ppSubWin->SRect[2] = yMin ;
00188       ppSubWin->SRect[3] = yMax ;
00189     }
00190     else
00191     {
00192       /* 3D */
00193       ppSubWin->SRect[0] = xMin ;
00194       ppSubWin->SRect[1] = xMax ;
00195       ppSubWin->SRect[2] = yMin ;
00196       ppSubWin->SRect[3] = yMax ;
00197       ppSubWin->SRect[4] = zMin ;
00198       ppSubWin->SRect[5] = zMax ;
00199     }
00200 
00201     ppSubWin->FirstPlot = FALSE;
00202 
00203     return SET_PROPERTY_SUCCEED ;
00204   }
00205   else if ( sciGetEntityType(pobj) == SCI_SURFACE )
00206   {
00207     if ( nbRow * nbCol != 6 )
00208     {
00209       sciprint( "Second argument must have 6 elements.\n" ) ;
00210       return SET_PROPERTY_ERROR ;
00211     }
00212 
00213     copyDoubleVectorFromStack( stackPointer, pSURFACE_FEATURE(pobj)->ebox, 6 ) ;
00214 
00215     return SET_PROPERTY_SUCCEED ;
00216   }
00217   else
00218   {
00219     sciprint("data_bounds property does not exist for this handle.\n") ; 
00220     return SET_PROPERTY_ERROR ;
00221   }
00222 
00223   return SET_PROPERTY_ERROR ;
00224 }

Here is the call graph for this function:

int set_data_mapping_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 19 of file set_data_mapping_property.c.

References getStringFromStack(), isParameterStringMatrix(), isStringParamEqual(), pGRAYPLOT_FEATURE, SCI_GRAYPLOT, sciGetEntityType(), sciprint(), SET_PROPERTY_ERROR, and SET_PROPERTY_SUCCEED.

00020 {
00021 
00022   if ( !isParameterStringMatrix( valueType ) )
00023   {
00024     sciprint("Incompatible type for property data_mapping.\n") ;
00025     return SET_PROPERTY_ERROR ;
00026   }
00027 
00028   if ( sciGetEntityType(pobj) != SCI_GRAYPLOT )
00029   {
00030     sciprint( "data_mapping property does not exist for this handle.\n" ) ;
00031     return SET_PROPERTY_ERROR ;
00032   }
00033 
00034   if ( isStringParamEqual( stackPointer, "scaled") || isStringParamEqual( stackPointer, "direct") )
00035   {
00036      strcpy( pGRAYPLOT_FEATURE (pobj)->datamapping, getStringFromStack(stackPointer) ) ;
00037      return SET_PROPERTY_SUCCEED ;
00038   }
00039   else
00040   {
00041     sciprint("Value must be 'direct' or 'scaled'.\n") ;
00042     return SET_PROPERTY_ERROR ;
00043   }
00044 
00045   return SET_PROPERTY_ERROR ;
00046 
00047 
00048 }

Here is the call graph for this function:

int set_data_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 607 of file set_data_property.c.

References CheckAndUpdate_x_shift(), CheckAndUpdate_y_shift(), CheckAndUpdate_z_shift(), createAssignedList(), destroyAssignedList(), getDoubleMatrixFromStack(), getStackListNbElement(), isParameterDoubleMatrix(), isParameterTlist(), NULL, pGRAYPLOT_FEATURE, pSEGS_FEATURE, SCI_GRAYPLOT, SCI_POLYLINE, SCI_SEGS, SCI_SURFACE, sciGetEntityType(), sciprint(), sciSetPoint(), set3ddata(), SET_PROPERTY_ERROR, setchampdata(), setgrayplotdata(), and type.

00608 {
00609   if( sciGetEntityType(pobj) == SCI_SEGS && pSEGS_FEATURE(pobj)->ptype == 1 )
00610   {
00611     AssignedList * tlist = NULL ;
00612     int status = -1 ;
00613 
00614     if( !isParameterTlist( valueType ) )
00615     {
00616       sciprint( "Incorrect argument, must be a Tlist!\r\n" ) ;
00617       return SET_PROPERTY_ERROR ;
00618     }
00619   
00620     /* we should have 4 properties in the tlist */
00621     tlist = createAssignedList( 3, 4 ) ;
00622     if ( tlist == NULL )
00623     {
00624       return SET_PROPERTY_ERROR ;
00625     }
00626 
00627     status = setchampdata( pobj, tlist ) ;
00628     destroyAssignedList( tlist ) ;
00629     return status ;
00630   }
00631   else if((sciGetEntityType(pobj) == SCI_GRAYPLOT) && (pGRAYPLOT_FEATURE(pobj)->type == 0)) /* case 0: real grayplot */
00632   {
00633     AssignedList * tlist = NULL ;
00634     int status = -1 ;
00635 
00636     if( !isParameterTlist( valueType ) )
00637     {
00638       sciprint( "Incorrect argument, must be a Tlist!\r\n" ) ;
00639       return SET_PROPERTY_ERROR ;
00640     }
00641 
00642     /* we should have 3 properties in the tlist */
00643     tlist = createAssignedList( 3, 3 ) ;
00644     if ( tlist == NULL )
00645     {
00646       return SET_PROPERTY_ERROR ;
00647     }
00648 
00649     status = setgrayplotdata( pobj, tlist ) ;
00650     destroyAssignedList( tlist ) ;
00651     return status ;
00652   }
00653   else if(sciGetEntityType(pobj) == SCI_SURFACE)
00654   {
00655     AssignedList * tlist = NULL ;
00656     int status = -1 ;
00657     int listSize = 0 ;
00658 
00659     if( !isParameterTlist( valueType ) )
00660     {
00661       sciprint( "Incorrect argument, must be a Tlist!\r\n" ) ;
00662       return SET_PROPERTY_ERROR ;
00663     }
00664 
00665     listSize = getStackListNbElement( 3 ) ;
00666 
00667     if ( listSize == 3 )
00668     {
00669       tlist = createAssignedList( 3, 3 ) ;
00670     }
00671     else if ( listSize == 4 )
00672     {
00673       tlist = createAssignedList( 3, 4 ) ;
00674     }
00675     else
00676     {
00677       sciprint("Error the tlist size must be equal to 4 or 5\r\n");
00678       return SET_PROPERTY_ERROR ;
00679     }
00680 
00681     if ( tlist == NULL )
00682     {
00683       return SET_PROPERTY_ERROR ;
00684     }
00685 
00686     status = set3ddata( pobj, tlist ) ;
00687     destroyAssignedList( tlist ) ;
00688     return status ;
00689 
00690   }
00691   else  /* F.Leray 02.05.05 : "data" case for others (using sciGetPoint routine inside GetProperty.c) */
00692   {
00693     if ( !isParameterDoubleMatrix( valueType ) )
00694     {
00695       sciprint("Incompatible type for property data.\n") ;
00696       return SET_PROPERTY_ERROR ;
00697     }
00698 
00699     if ( sciGetEntityType(pobj) == SCI_POLYLINE )
00700     {
00701       CheckAndUpdate_x_shift( pobj, nbRow ) ; /* used only on Polyline */
00702       CheckAndUpdate_y_shift( pobj, nbRow ) ; /* used only on Polyline */
00703       CheckAndUpdate_z_shift( pobj, nbRow ) ; /* used only on Polyline */
00704     }
00705 
00706     return sciSetPoint( pobj, getDoubleMatrixFromStack( stackPointer ), &nbRow, &nbCol );
00707   }
00708   return SET_PROPERTY_ERROR ;
00709   
00710 }

Here is the call graph for this function:

int set_default_values_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_default_values_property.c.

References getAxesModel(), getDoubleFromStack(), getFigureModel(), InitAxesModel(), InitFigureModel(), isParameterDoubleMatrix(), sciprint(), sciSetDefaultValues(), and SET_PROPERTY_ERROR.

00018 {
00019   if ( !isParameterDoubleMatrix( valueType ) )
00020   {
00021     sciprint("Incompatible type for property default_values.\n") ;
00022     return SET_PROPERTY_ERROR ;
00023   }
00024 
00025   if ( getDoubleFromStack( stackPointer ) != 1 )
00026   {
00027     sciprint( "Value must be 1 to set default values.\n" ) ;
00028     return SET_PROPERTY_ERROR ;
00029   }
00030 
00031   if ( pobj == getFigureModel() )
00032   {
00033     return InitFigureModel();
00034   }
00035   else if ( pobj == getAxesModel() )
00036   {
00037     return InitAxesModel();
00038   }
00039   else
00040   {
00041     return sciSetDefaultValues();
00042   }
00043   return SET_PROPERTY_ERROR ;
00044 }

Here is the call graph for this function:

int set_figure_id_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 18 of file set_figure_id_property.c.

References getDoubleFromStack(), getFigureModel(), int, isParameterDoubleMatrix(), SCI_FIGURE, sciGetEntityType(), sciInitUsedWindow(), sciprint(), sciSetNum(), and SET_PROPERTY_ERROR.

00019 {
00020   int id = (int) getDoubleFromStack( stackPointer ) ;
00021 
00022   if ( !isParameterDoubleMatrix( valueType ) )
00023   {
00024     sciprint("Incompatible type for property figure_id.\n") ;
00025     return SET_PROPERTY_ERROR ;
00026   }
00027 
00028   if ( sciGetEntityType(pobj) != SCI_FIGURE )
00029   {
00030     sciprint("figure_id property undefined for this object.\n") ;
00031     return SET_PROPERTY_ERROR ;
00032   }
00033 
00034   if ( pobj != getFigureModel() )
00035   {
00036     return sciInitUsedWindow( id ) ;
00037   }
00038   else
00039   {
00040     return sciSetNum( getFigureModel(), &id ) ;
00041   }
00042   return SET_PROPERTY_ERROR ;
00043 }

Here is the call graph for this function:

int set_figure_name_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 16 of file set_figure_name_property.c.

References getStringFromStack(), isParameterStringMatrix(), sciprint(), sciSetName(), and SET_PROPERTY_ERROR.

00017 {
00018   if ( !isParameterStringMatrix( valueType ) )
00019   {
00020     sciprint("Incompatible type for property figure_name.\n") ;
00021     return SET_PROPERTY_ERROR ;
00022   }
00023 
00024   return sciSetName( pobj, getStringFromStack( stackPointer ), nbCol * nbRow ) ;
00025 }

Here is the call graph for this function:

int set_figure_position_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 16 of file set_figure_position_property.c.

References getDoubleMatrixFromStack(), isParameterDoubleMatrix(), sciprint(), sciSetScreenPosition(), and SET_PROPERTY_ERROR.

00017 {
00018   double * values = getDoubleMatrixFromStack( stackPointer ) ;
00019 
00020   if ( !isParameterDoubleMatrix( valueType ) )
00021   {
00022     sciprint("Incompatible type for property figure_position.\n") ;
00023     return SET_PROPERTY_ERROR ;
00024   }
00025 
00026   return sciSetScreenPosition( pobj, (int)values[0], (int)values[1]);
00027 }

Here is the call graph for this function:

int set_figure_size_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 19 of file set_figure_size_property.c.

References C2F, dr(), getDoubleMatrixFromStack(), getFigureModel(), int, isParameterDoubleMatrix(), L, na, PD0, pFIGURE_FEATURE, PI0, SCI_FIGURE, sciGetEntityType(), sciGetNum(), sciprint(), SET_PROPERTY_ERROR, and SET_PROPERTY_SUCCEED.

00020 {
00021   double * values = getDoubleMatrixFromStack( stackPointer ) ;
00022 
00023   if ( !isParameterDoubleMatrix( valueType ) )
00024   {
00025     sciprint("Incompatible type for property figure_size.\n") ;
00026     return SET_PROPERTY_ERROR ;
00027   }
00028 
00029   if ( sciGetEntityType(pobj) != SCI_FIGURE )
00030   {
00031     sciprint("figure_size property undefined for this object" ) ;
00032     return SET_PROPERTY_ERROR ;
00033   }
00034 
00035   pFIGURE_FEATURE( pobj )->figuredimwidth  = (int) values[0] ;  
00036   pFIGURE_FEATURE( pobj )->figuredimheight = (int) values[1] ;
00037   if ( pobj != getFigureModel() )
00038   {
00039     int verbose   = 0 ;
00040     int curFigNum = 0 ;
00041     int na        = 0 ;
00042     int figNum    = sciGetNum( pobj ) ;
00043 
00044     C2F(dr)("xget","window",&verbose,&curFigNum,&na,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);  
00045     C2F(dr)("xset","window",&figNum,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
00046     C2F(dr)("xset","wpdim",
00047       &(pFIGURE_FEATURE( pobj )->figuredimwidth),
00048       &(pFIGURE_FEATURE( pobj )->figuredimheight),
00049       PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
00050     C2F(dr)("xset","window",&curFigNum,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
00051   }
00052   return SET_PROPERTY_SUCCEED ;
00053 }

Here is the call graph for this function:

int set_figure_style_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 22 of file set_figure_style_property.c.

References isParameterStringMatrix(), isStringParamEqual(), sciprint(), SET_PROPERTY_ERROR, and SET_PROPERTY_UNCHANGED.

00023 {
00024 
00025   if ( !isParameterStringMatrix( valueType ) )
00026   {
00027     sciprint("Incompatible type for property figure_style.\n") ;
00028     return SET_PROPERTY_ERROR ;
00029   }
00030 
00031   if ( isStringParamEqual( stackPointer, "old" ) )
00032   {
00033     sciprint("Old graphic mode is no longer available. Please refer to the set help page.\n") ;
00034     return SET_PROPERTY_ERROR ;
00035   }
00036   else if ( isStringParamEqual( stackPointer, "new" ) )
00037   {
00038     /* graphic mode must be new */
00039     /* nothing to do */
00040     return SET_PROPERTY_UNCHANGED ;
00041   }
00042   else
00043   {
00044     sciprint("Figure style must be 'old' or 'new'.\n") ;
00045     return SET_PROPERTY_ERROR ;
00046   }
00047   return SET_PROPERTY_ERROR ;
00048 }

Here is the call graph for this function:

int set_fill_mode_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 16 of file set_fill_mode_property.c.

References FALSE, isParameterStringMatrix(), isStringParamEqual(), sciprint(), sciSetIsFilled(), SET_PROPERTY_ERROR, and TRUE.

00017 {
00018   if ( !isParameterStringMatrix( valueType ) )
00019   {
00020     sciprint("Incompatible type for property fill_mode.\n") ;
00021     return SET_PROPERTY_ERROR ;
00022   }
00023 
00024   if ( isStringParamEqual( stackPointer, "on" ) )
00025   {
00026     return sciSetIsFilled( pobj, TRUE ) ;
00027   }
00028   else if ( isStringParamEqual( stackPointer, "off" ) )
00029   {
00030     return sciSetIsFilled( pobj, FALSE ) ;
00031   }
00032   else
00033   {
00034     sciprint( "Nothing to do (value must be 'on/off').\n" ) ;
00035     return SET_PROPERTY_ERROR ;
00036   }
00037   return SET_PROPERTY_ERROR ;
00038 }

Here is the call graph for this function:

int set_font_angle_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_font_angle_property.c.

References FALSE, getDoubleFromStack(), isParameterDoubleMatrix(), sciGetAutoRotation(), sciprint(), sciSetAutoRotation(), sciSetFontOrientation(), and SET_PROPERTY_ERROR.

00018 {
00019   if ( !isParameterDoubleMatrix( valueType ) )
00020   {
00021     sciprint("Incompatible type for property font_angle.\n") ;
00022     return SET_PROPERTY_ERROR ;
00023   }
00024 
00025   if ( sciGetAutoRotation( pobj ) )
00026   {
00027     sciSetAutoRotation( pobj, FALSE ) ;
00028   }
00029   return sciSetFontOrientation( pobj,(int) ( getDoubleFromStack(stackPointer) * 10 ) ) ;
00030 
00031 }

Here is the call graph for this function:

int set_font_color_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_font_color_property.c.

References getDoubleFromStack(), int, isParameterDoubleMatrix(), pAXES_FEATURE, SCI_AXES, SCI_FIGURE, SCI_SUBWIN, sciGetEntityType(), sciprint(), sciSetFontForeground(), SET_PROPERTY_ERROR, and value.

00018 {
00019 
00020   int value = (int) getDoubleFromStack( stackPointer ) ;
00021 
00022   if ( !isParameterDoubleMatrix( valueType ) )
00023   {
00024     sciprint("Incompatible type for property font_color.\n") ;
00025     return SET_PROPERTY_ERROR ;
00026   }
00027 
00028   if ( sciGetEntityType(pobj) != SCI_AXES )
00029   {
00030     pAXES_FEATURE (pobj)->textcolor = value ;
00031     return 0 ;
00032   }
00033   else if ( sciGetEntityType(pobj) == SCI_SUBWIN || sciGetEntityType(pobj) == SCI_FIGURE )
00034   {
00035     return sciSetFontForeground( pobj,value ) ;
00036   } /* F.Leray 08.04.04 */
00037   else
00038   {
00039     sciprint( "font_color property does not exist for this handle.\n" ) ;
00040     return -1 ;
00041   }
00042   return -1 ;
00043 }

Here is the call graph for this function:

int set_font_foreground_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_font_foreground_property.c.

References getDoubleFromStack(), isParameterDoubleMatrix(), sciprint(), sciSetFontForeground(), and SET_PROPERTY_ERROR.

00018 {
00019   if ( !isParameterDoubleMatrix( valueType ) )
00020   {
00021     sciprint("Incompatible type for property font_foreground.\n") ;
00022     return SET_PROPERTY_ERROR ;
00023   }
00024 
00025   return sciSetFontForeground( pobj, (int) getDoubleFromStack( stackPointer ) ) ;
00026 }

Here is the call graph for this function:

int set_font_name_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 16 of file set_font_name_property.c.

References getStringFromStack(), isParameterStringMatrix(), sciprint(), sciSetFontName(), and SET_PROPERTY_ERROR.

00017 {
00018   if ( !isParameterStringMatrix( valueType ) )
00019   {
00020     sciprint("Incompatible type for property font_name.\n") ;
00021     return SET_PROPERTY_ERROR ;
00022   }
00023 
00024   return sciSetFontName( pobj, getStringFromStack(stackPointer), nbRow * nbCol );
00025 }

Here is the call graph for this function:

int set_font_size_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 16 of file set_font_size_property.c.

References getDoubleFromStack(), isParameterDoubleMatrix(), sciprint(), sciSetFontDeciWidth(), and SET_PROPERTY_ERROR.

00017 {
00018   if ( !isParameterDoubleMatrix( valueType ) )
00019   {
00020     sciprint("Incompatible type for property font_size.\n") ;
00021     return SET_PROPERTY_ERROR ;
00022   }
00023 
00024   return sciSetFontDeciWidth( pobj, ((int)getDoubleFromStack( stackPointer )) * 100 );
00025 }

Here is the call graph for this function:

int set_font_style_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_font_style_property.c.

References getDoubleFromStack(), int, isParameterDoubleMatrix(), sciprint(), sciSetFontStyle(), SET_PROPERTY_ERROR, and value.

00018 {
00019   int value = (int) getDoubleFromStack( stackPointer ) ;
00020 
00021   if ( !isParameterDoubleMatrix( valueType ) )
00022   {
00023     sciprint("Incompatible type for property font_style.\n") ;
00024     return SET_PROPERTY_ERROR ;
00025   }
00026 
00027   if ( value > 10 || value < 0 )
00028   {
00029     sciprint( "The value must be in [0 10].\n" ) ;
00030     return SET_PROPERTY_ERROR ;
00031   }
00032   
00033   return sciSetFontStyle( pobj, value ) ;
00034 }

Here is the call graph for this function:

int set_foreground_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 16 of file set_foreground_property.c.

References getDoubleFromStack(), isParameterDoubleMatrix(), sciprint(), sciSetForeground(), and SET_PROPERTY_ERROR.

00017 {
00018   if ( !isParameterDoubleMatrix( valueType ) )
00019   {
00020     sciprint("Incompatible type for property foreground.\n") ;
00021     return SET_PROPERTY_ERROR ;
00022   }
00023 
00024   return sciSetForeground( pobj, (int) getDoubleFromStack( stackPointer ) ) ;
00025 }

Here is the call graph for this function:

int set_format_n_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_format_n_property.c.

References getStringFromStack(), isParameterStringMatrix(), pAXES_FEATURE, SCI_AXES, sciGetEntityType(), sciprint(), SET_PROPERTY_ERROR, and SET_PROPERTY_SUCCEED.

00018 {
00019   if ( !isParameterStringMatrix( valueType ) )
00020   {
00021     sciprint("Incompatible type for property format_n.\n") ;
00022     return SET_PROPERTY_ERROR ;
00023   }
00024 
00025   if ( sciGetEntityType(pobj) != SCI_AXES )
00026   {
00027     sciprint( "format_n property does not exists for this handle" ) ;
00028     return SET_PROPERTY_ERROR ;
00029   }
00030   pAXES_FEATURE(pobj)->format[0] = getStringFromStack(stackPointer)[0] ;
00031   return SET_PROPERTY_SUCCEED ;
00032 }

Here is the call graph for this function:

int set_grid_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 18 of file set_grid_property.c.

References getDoubleMatrixFromStack(), i, int, isParameterDoubleMatrix(), pSUBWIN_FEATURE, SCI_SUBWIN, sciGetEntityType(), sciprint(), SET_PROPERTY_ERROR, and SET_PROPERTY_SUCCEED.

00019 {
00020   int i ;
00021   double * values = getDoubleMatrixFromStack( stackPointer ) ;
00022 
00023   if ( !isParameterDoubleMatrix( valueType ) )
00024   {
00025     sciprint("Incompatible type for property grid.\n") ;
00026     return SET_PROPERTY_ERROR ;
00027   }
00028 
00029   if ( sciGetEntityType(pobj) != SCI_SUBWIN )
00030   {
00031     sciprint( "grid property does nor exist for this handle.\n" ) ;
00032     return SET_PROPERTY_ERROR ;
00033   }
00034 
00035   if ( nbRow != 1 || nbCol > 3 )
00036   {
00037     sciprint( "grid must be a 1x2 or 1x3 vector.\n" ) ;
00038     return SET_PROPERTY_ERROR ;
00039   }
00040 
00041   for (  i = 0 ; i < nbCol ; i++ )
00042   {
00043     if ( values[i] < -1 )
00044     {
00045       sciprint("Argument must be -1 (no grid) or number of color.\n");
00046       return SET_PROPERTY_ERROR ;
00047     }
00048     pSUBWIN_FEATURE(pobj)->grid[i] = (int) values[i] ;
00049   }
00050 
00051   return SET_PROPERTY_SUCCEED ;
00052 }

Here is the call graph for this function:

int set_handle_visible_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_handle_visible_property.c.

References FALSE, isParameterStringMatrix(), isStringParamEqual(), pUIMENU_FEATURE, SCI_UIMENU, sciGetEntityType(), sciprint(), SET_PROPERTY_ERROR, SET_PROPERTY_SUCCEED, and TRUE.

00018 {
00019 
00020   if ( !isParameterStringMatrix( valueType ) )
00021   {
00022     sciprint("Incompatible type for property handle_visible.\n") ;
00023     return SET_PROPERTY_ERROR ;
00024   }
00025 
00026   if (sciGetEntityType (pobj) != SCI_UIMENU)
00027   {
00028     sciprint( "handle_visible property does not exist for this handle" ) ;
00029     return SET_PROPERTY_ERROR ;
00030   }
00031 
00032   if ( isStringParamEqual( stackPointer, "on" ) )
00033   {
00034     pUIMENU_FEATURE(pobj)->handle_visible = TRUE ;
00035   }
00036   else if ( isStringParamEqual( stackPointer, "off" ) )
00037   {
00038     pUIMENU_FEATURE(pobj)->handle_visible = FALSE ;
00039   }
00040   else
00041   {
00042     sciprint("Value must be 'on' or 'off'.\n");
00043     return SET_PROPERTY_ERROR ;
00044   }
00045 
00046   return SET_PROPERTY_SUCCEED ;
00047 }

Here is the call graph for this function:

int set_hidden_axis_color_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_hidden_axis_color_property.c.

References getDoubleFromStack(), int, isParameterDoubleMatrix(), pSUBWIN_FEATURE, SCI_SUBWIN, sciGetEntityType(), sciGetNumColors(), sciprint(), SET_PROPERTY_ERROR, and SET_PROPERTY_SUCCEED.

00018 {
00019 
00020   int haColor      = (int) getDoubleFromStack( stackPointer ) ;
00021   int colormapSize = sciGetNumColors( pobj ) ;
00022 
00023   if ( !isParameterDoubleMatrix( valueType ) )
00024   {
00025     sciprint("Incompatible type for property hidden_axis_color.\n") ;
00026     return SET_PROPERTY_ERROR ;
00027   }
00028 
00029   if ( sciGetEntityType (pobj) != SCI_SUBWIN )
00030   {
00031     sciprint( "hidden_axis_color property does not exist for this handle.\n" ) ;
00032     return SET_PROPERTY_ERROR ;
00033   }
00034 
00035   if ( haColor >= -2 && haColor <= colormapSize + 1 )
00036   {
00037     pSUBWIN_FEATURE(pobj)->axes.hiddenAxisColor = haColor ;
00038     return SET_PROPERTY_SUCCEED ;
00039   }
00040   else
00041   {
00042     sciprint( "Color outside of color map boundaries.\n" ) ;
00043     return SET_PROPERTY_ERROR ;
00044   }
00045 
00046   return SET_PROPERTY_ERROR ;
00047 }

Here is the call graph for this function:

int set_hidden_color_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 16 of file set_hidden_color_property.c.

References getDoubleFromStack(), isParameterDoubleMatrix(), sciprint(), sciSetHiddenColor(), and SET_PROPERTY_ERROR.

00017 {
00018   if ( !isParameterDoubleMatrix( valueType ) )
00019   {
00020     sciprint("Incompatible type for property hidden_color.\n") ;
00021     return SET_PROPERTY_ERROR ;
00022   }
00023 
00024   return sciSetHiddenColor( pobj, (int) getDoubleFromStack( stackPointer ) ) ;
00025 }

Here is the call graph for this function:

int set_immediate_drawing_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_immediate_drawing_property.c.

References FALSE, isParameterStringMatrix(), isStringParamEqual(), pFIGURE_FEATURE, SCI_FIGURE, sciGetEntityType(), sciprint(), SET_PROPERTY_ERROR, SET_PROPERTY_SUCCEED, and TRUE.

00018 {
00019   
00020   if ( !isParameterStringMatrix( valueType ) )
00021   {
00022     sciprint("Incompatible type for property immediate_drawing.\n") ;
00023     return SET_PROPERTY_ERROR ;
00024   }
00025 
00026   if ( sciGetEntityType (pobj) != SCI_FIGURE )
00027   {
00028     sciprint( "immediate_drawing property undefined for this object.\n" ) ;
00029     return SET_PROPERTY_ERROR ;
00030   }
00031   
00032   if ( isStringParamEqual( stackPointer, "on" ) )
00033   {
00034     pFIGURE_FEATURE((sciPointObj *)pobj)->auto_redraw = TRUE ;
00035     return SET_PROPERTY_SUCCEED ;
00036   }
00037   else if ( isStringParamEqual( stackPointer, "off" ) )
00038   {
00039     pFIGURE_FEATURE((sciPointObj *)pobj)->auto_redraw = FALSE ;
00040     return SET_PROPERTY_SUCCEED ;
00041   }
00042   else
00043   {
00044     sciprint("Nothing to do (value must be 'on/off')") ;
00045     return SET_PROPERTY_ERROR ;
00046   }
00047   
00048 }

Here is the call graph for this function:

int set_info_message_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 16 of file set_info_message_property.c.

References getStringFromStack(), isParameterStringMatrix(), sciprint(), sciSetInfoMessage(), and SET_PROPERTY_ERROR.

00017 {
00018   if ( !isParameterStringMatrix( valueType ) )
00019   {
00020     sciprint("Incompatible type for property info_message.\n") ;
00021     return SET_PROPERTY_ERROR ;
00022   }
00023 
00024   return sciSetInfoMessage( pobj, getStringFromStack( stackPointer ) ) ;
00025 }

Here is the call graph for this function:

int set_interp_color_mode_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_interp_color_mode_property.c.

References FALSE, isParameterStringMatrix(), isStringParamEqual(), NULL, pPOLYLINE_FEATURE, SCI_POLYLINE, sciGetEntityType(), sciGetInterpVector(), sciprint(), SET_PROPERTY_ERROR, SET_PROPERTY_SUCCEED, and TRUE.

00018 {
00019 
00020   if ( !isParameterStringMatrix( valueType ) )
00021   {
00022     sciprint("Incompatible type for property interp_color_mode.\n") ;
00023     return SET_PROPERTY_ERROR ;
00024   }
00025 
00026   if( sciGetEntityType(pobj) != SCI_POLYLINE )
00027   {
00028     sciprint("interp_color_mode can only be set on Polyline objects.\n") ;
00029     return SET_PROPERTY_ERROR ;
00030   }
00031 
00032   if( isStringParamEqual( stackPointer, "on" ) )
00033   {
00034     if ( sciGetInterpVector(pobj) == NULL )
00035     {
00036       sciprint("You must first specify an interp_color_vector for this object.\n") ;
00037       return SET_PROPERTY_ERROR ;
00038     }
00039     else
00040     {
00041       pPOLYLINE_FEATURE (pobj)->isinterpshaded = TRUE ;
00042     }
00043   }
00044   else if ( isStringParamEqual( stackPointer, "off" ) )
00045   {
00046     pPOLYLINE_FEATURE (pobj)->isinterpshaded = FALSE ;
00047   }
00048   else
00049   {
00050     sciprint("Property must be set to 'on' or 'off'.\n") ;
00051     return SET_PROPERTY_ERROR ;
00052   }
00053   return SET_PROPERTY_SUCCEED ;
00054 
00055 }

Here is the call graph for this function:

int set_interp_color_vector_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_interp_color_vector_property.c.

References copyDoubleVectorToIntFromStack(), getDoubleMatrixFromStack(), isParameterDoubleMatrix(), pPOLYLINE_FEATURE, SCI_POLYLINE, sciGetEntityType(), sciprint(), sciSetInterpVector(), and SET_PROPERTY_ERROR.

00018 {
00019 
00020   if ( !isParameterDoubleMatrix( valueType ) )
00021   {
00022     sciprint("Incompatible type for property interp_color_vector.\n") ;
00023     return SET_PROPERTY_ERROR ;
00024   }
00025 
00026   if( sciGetEntityType(pobj) != SCI_POLYLINE )
00027   {
00028     sciprint("interp_color_vector can only be set on Polyline objects.\n");
00029     return SET_PROPERTY_ERROR ;
00030   }
00031 
00032   if( ( nbCol == 3 && pPOLYLINE_FEATURE(pobj)->dim_icv == 3 ) || 
00033       ( nbCol == 4 && pPOLYLINE_FEATURE(pobj)->dim_icv == 4 ) )
00034   {
00035     int tmp[4] ;
00036     getDoubleMatrixFromStack( stackPointer ) ;
00037 
00038     copyDoubleVectorToIntFromStack( stackPointer, tmp, nbCol ) ;
00039 
00040     return sciSetInterpVector( pobj, nbCol, tmp ) ;
00041   }
00042   else
00043   {
00044     sciprint("Under interpolated color moden the column dimension of the color vector must match the number of points defining the line (which must be 3 or 4).\n") ;
00045     return SET_PROPERTY_ERROR ;
00046   }
00047 
00048 }

Here is the call graph for this function:

int set_isoview_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_isoview_property.c.

References FALSE, isParameterStringMatrix(), isStringParamEqual(), pSUBWIN_FEATURE, SCI_SUBWIN, sciGetEntityType(), sciprint(), SET_PROPERTY_ERROR, SET_PROPERTY_SUCCEED, and TRUE.

00018 {
00019 
00020   if ( !isParameterStringMatrix( valueType ) )
00021   {
00022     sciprint("Incompatible type for property isoview.\n") ;
00023     return SET_PROPERTY_ERROR ;
00024   }
00025 
00026   if ( sciGetEntityType(pobj) != SCI_SUBWIN )
00027   {
00028     sciprint( "iso_view property does not exist for this handle.\n" ) ;
00029     return SET_PROPERTY_ERROR ;
00030   }
00031   if ( isStringParamEqual( stackPointer, "on" ) )
00032   {
00033     pSUBWIN_FEATURE (pobj)->isoview = TRUE ;
00034   }
00035   else if ( isStringParamEqual( stackPointer, "off" ) )
00036   {
00037     pSUBWIN_FEATURE (pobj)->isoview = FALSE ;
00038   }
00039   else
00040   {
00041     sciprint("Value must be 'on' or 'off'.\n") ;
00042     return SET_PROPERTY_ERROR ;
00043   }
00044 
00045   return SET_PROPERTY_SUCCEED ;
00046 
00047 }

Here is the call graph for this function:

int set_labels_font_color_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_labels_font_color_property.c.

References getDoubleFromStack(), int, isParameterDoubleMatrix(), pAXES_FEATURE, SCI_AXES, SCI_FIGURE, SCI_SUBWIN, sciGetEntityType(), sciprint(), sciSetFontForeground(), SET_PROPERTY_ERROR, and SET_PROPERTY_SUCCEED.

00018 {
00019 
00020   if ( !isParameterDoubleMatrix( valueType ) )
00021   {
00022     sciprint("Incompatible type for property labels_font_color.\n") ;
00023     return SET_PROPERTY_ERROR ;
00024   }
00025 
00026   if (sciGetEntityType (pobj) == SCI_AXES)
00027   {
00028     pAXES_FEATURE(pobj)->textcolor = (int) getDoubleFromStack( stackPointer ) ;
00029   }
00030   else if ( sciGetEntityType (pobj) == SCI_SUBWIN || sciGetEntityType (pobj) == SCI_FIGURE )
00031   {
00032     return sciSetFontForeground( pobj, (int) getDoubleFromStack( stackPointer ) ) ;
00033   } /* F.Leray 08.04.04 */
00034   else
00035   {
00036     sciprint( "labels_font_color property does not exist for this handle.\n" ) ;
00037     return SET_PROPERTY_ERROR ;
00038   }
00039   return SET_PROPERTY_SUCCEED ;
00040 }

Here is the call graph for this function:

int set_labels_font_size_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_labels_font_size_property.c.

References getDoubleFromStack(), int, isParameterDoubleMatrix(), pAXES_FEATURE, SCI_AXES, SCI_FIGURE, SCI_SUBWIN, sciGetEntityType(), sciprint(), sciSetFontDeciWidth(), SET_PROPERTY_ERROR, and SET_PROPERTY_SUCCEED.

00018 {
00019   if ( !isParameterDoubleMatrix( valueType ) )
00020   {
00021     sciprint("Incompatible type for property labels_font_size.\n") ;
00022     return SET_PROPERTY_ERROR ;
00023   }
00024 
00025   if (sciGetEntityType (pobj) == SCI_AXES)
00026   {
00027     pAXES_FEATURE (pobj)->fontsize = (int) getDoubleFromStack( stackPointer ) ;
00028   }
00029   else if (sciGetEntityType (pobj) == SCI_SUBWIN || sciGetEntityType (pobj) == SCI_FIGURE)
00030   {
00031     return sciSetFontDeciWidth( pobj, (int) ( 100 * getDoubleFromStack(stackPointer) ) ) ; /* F.Leray 08.04.04 */
00032   }
00033   else
00034   {
00035     sciprint( "labels_font_size property does not exist for this handle.\n" ) ;
00036     return SET_PROPERTY_ERROR ;
00037   }
00038   return SET_PROPERTY_SUCCEED ;
00039 }

Here is the call graph for this function:

int set_labels_font_style_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_label_font_style_property.c.

References getDoubleFromStack(), isParameterDoubleMatrix(), SCI_FIGURE, SCI_SUBWIN, sciGetEntityType(), sciprint(), sciSetFontStyle(), and SET_PROPERTY_ERROR.

00018 {
00019 
00020   if ( !isParameterDoubleMatrix( valueType ) )
00021   {
00022     sciprint("Incompatible type for property labels_font_style.\n") ;
00023     return SET_PROPERTY_ERROR ;
00024   }
00025 
00026   if (sciGetEntityType (pobj) == SCI_SUBWIN || sciGetEntityType (pobj) == SCI_FIGURE)
00027   {
00028     return sciSetFontStyle( pobj, (int) getDoubleFromStack(stackPointer) ) ;
00029   }
00030   else
00031   {
00032     sciprint( "labels_font_style property does not exist for this handle.\n" ) ;
00033     return SET_PROPERTY_ERROR ;
00034   }
00035 }

Here is the call graph for this function:

int set_line_mode_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 16 of file set_line_mode_property.c.

References FALSE, isParameterStringMatrix(), isStringParamEqual(), sciprint(), sciSetIsLine(), SET_PROPERTY_ERROR, and TRUE.

00017 {
00018   if ( !isParameterStringMatrix( valueType ) )
00019   {
00020     sciprint("Incompatible type for property line_mode.\n") ;
00021     return SET_PROPERTY_ERROR ;
00022   }
00023 
00024   if ( isStringParamEqual( stackPointer, "on" ) )
00025   {
00026     return sciSetIsLine( pobj, TRUE ) ;
00027   }
00028   else if ( isStringParamEqual( stackPointer, "off" ) )
00029   {
00030     return sciSetIsLine( pobj, FALSE ) ;
00031   }
00032   else
00033   {
00034     sciprint("Value must be 'on/off'.\n");
00035     return SET_PROPERTY_ERROR ;
00036   }
00037   return SET_PROPERTY_ERROR ;
00038 }

Here is the call graph for this function:

int set_line_style_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 16 of file set_line_style_property.c.

References getDoubleFromStack(), isParameterDoubleMatrix(), sciprint(), sciSetLineStyle(), and SET_PROPERTY_ERROR.

00017 {
00018   if ( !isParameterDoubleMatrix( valueType ) )
00019   {
00020     sciprint("Incompatible type for property line_style.\n") ;
00021     return SET_PROPERTY_ERROR ;
00022   }
00023 
00024   return sciSetLineStyle( pobj, (int) getDoubleFromStack( stackPointer ) ) ;
00025 }

Here is the call graph for this function:

int set_log_flags_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 100 of file set_log_flags_property.c.

References sciSubWindow::axes, getStringFromStack(), isParameterStringMatrix(), sciSubWindow::logflags, NULL, pSUBWIN_FEATURE, ReBuildUserTicks(), SCI_SUBWIN, sciGetEntityType(), sciprint(), SET_PROPERTY_ERROR, SET_PROPERTY_SUCCEED, sciSubWindow::SRect, AXES::u_nxgrads, AXES::u_nygrads, AXES::u_nzgrads, AXES::u_xgrads, AXES::u_xlabels, AXES::u_ygrads, AXES::u_ylabels, AXES::u_zgrads, and AXES::u_zlabels.

00101 {
00102   char * flags = getStringFromStack( stackPointer ) ;
00103   sciSubWindow * ppSubWin = NULL ;
00104 
00105   if ( !isParameterStringMatrix( valueType ) )
00106   {
00107     sciprint("Incompatible type for property log_flags.\n") ;
00108     return SET_PROPERTY_ERROR ;
00109   }
00110 
00111   if (sciGetEntityType (pobj) != SCI_SUBWIN)
00112   {
00113     sciprint( "log_flags property does not exist for this handle.\n" ) ;
00114     return SET_PROPERTY_ERROR ;
00115   }
00116   
00117   if ( nbRow * nbCol != 2 && nbRow * nbCol != 3 )
00118   {
00119     sciprint( "log_flags must have a size of 2 or 3.\n" ) ;
00120     return SET_PROPERTY_ERROR ;
00121   }
00122 
00123   /* flags must be 'n' or 'l' */
00124   if (   (flags[0] != 'n' && flags[0] != 'l')
00125       || (flags[1] != 'n' && flags[1] != 'l') )
00126   {
00127     sciprint( "flags must be 'n' or 'l'.\n" ) ;
00128     return SET_PROPERTY_ERROR ;
00129   }
00130 
00131   ppSubWin = pSUBWIN_FEATURE (pobj) ;
00132 
00133 
00134   /* X axes */
00135   if( ( ppSubWin->SRect[0] <= 0. || ppSubWin->SRect[1] <= 0.) && flags[0] == 'l' )
00136   {
00137     sciprint("Error: data_bounds on x axis must be strictly positive to switch to logarithmic mode.\n") ;
00138     return SET_PROPERTY_ERROR ;
00139   }
00140   ppSubWin->axes.u_xlabels = ReBuildUserTicks( ppSubWin->logflags[0], flags[0],
00141                                                ppSubWin->axes.u_xgrads, 
00142                                                &ppSubWin->axes.u_nxgrads, 
00143                                                ppSubWin->axes.u_xlabels   );
00144   ppSubWin->logflags[0] = flags[0] ;
00145 
00146   /* Y axes */
00147   if( ( ppSubWin->SRect[2] <= 0. || ppSubWin->SRect[3] <= 0. ) && flags[1] == 'l' )
00148   { 
00149       sciprint("Error: data_bounds on y axis must be strictly positive to switch to logarithmic mode.\n");
00150       return SET_PROPERTY_ERROR ;
00151   }
00152   ppSubWin->axes.u_ylabels = ReBuildUserTicks( ppSubWin->logflags[1], flags[1],  
00153                                                ppSubWin->axes.u_ygrads, 
00154                                                &ppSubWin->axes.u_nygrads, 
00155                                                ppSubWin->axes.u_ylabels  ) ;
00156 
00157   
00158   ppSubWin->logflags[1] = flags[1] ;
00159 
00160   if ( nbRow * nbCol == 3 )
00161   {
00162     if ( flags[2] != 'n' && flags[2] != 'l' )
00163     {
00164       sciprint( "flags must be 'n' or 'l'.\n" ) ;
00165       return SET_PROPERTY_ERROR ;
00166     }
00167 
00168     if ( ( ppSubWin->SRect[4] <= 0. || ppSubWin->SRect[5] <= 0. ) && flags[2] == 'l' )
00169     {
00170       sciprint("Error: data_bounds on z axis must be strictly positive to switch to logarithmic mode") ;
00171       return SET_PROPERTY_ERROR ;
00172     }
00173 
00174     ppSubWin->axes.u_zlabels = ReBuildUserTicks( ppSubWin->logflags[2], flags[2],  
00175                                                  ppSubWin->axes.u_zgrads, 
00176                                                  &ppSubWin->axes.u_nzgrads, 
00177                                                  ppSubWin->axes.u_zlabels) ;
00178     ppSubWin->logflags[2] = flags[2] ;
00179 
00180   }
00181 
00182   return SET_PROPERTY_SUCCEED ;
00183 
00184 
00185 }

Here is the call graph for this function:

int set_margins_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 19 of file set_margins_property.c.

References copyDoubleVectorFromStack(), isParameterDoubleMatrix(), pSUBWIN_FEATURE, SCI_SUBWIN, sciGetEntityType(), sciprint(), SET_PROPERTY_ERROR, and SET_PROPERTY_SUCCEED.

00020 {
00021 
00022   if ( !isParameterDoubleMatrix( valueType ) )
00023   {
00024     sciprint("Incompatible type for property margins.\n") ;
00025     return SET_PROPERTY_ERROR ;
00026   }
00027 
00028   if (sciGetEntityType(pobj) != SCI_SUBWIN )
00029   {
00030     sciprint("margins property does not exist for this handle.\n") ;
00031     return SET_PROPERTY_ERROR ;
00032   }
00033 
00034   if ( nbRow * nbCol != 4 )
00035   {
00036     sciprint("Second argument must have 4 elements.\n") ;
00037     return SET_PROPERTY_ERROR ;
00038   }
00039 
00040   copyDoubleVectorFromStack( stackPointer, pSUBWIN_FEATURE (pobj)->ARect, 4 ) ;
00041 
00042   return SET_PROPERTY_SUCCEED ;
00043   
00044 }

Here is the call graph for this function:

int set_mark_background_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 16 of file set_mark_background_property.c.

References getDoubleFromStack(), isParameterDoubleMatrix(), sciprint(), sciSetMarkBackground(), and SET_PROPERTY_ERROR.

00017 {
00018 
00019   if ( !isParameterDoubleMatrix( valueType ) )
00020   {
00021     sciprint("Incompatible type for property mark_background.\n") ;
00022     return SET_PROPERTY_ERROR ;
00023   }
00024 
00025   /*   sciSetIsMark((sciPointObj *) pobj, TRUE); */
00026   /* F.Leray 27.01.05 commented because mark_size is automatically launched */
00027   /* in tcl/tk editor (which causes marks appearance even when unwanted). */
00028   return sciSetMarkBackground( pobj, (int) getDoubleFromStack( stackPointer ) ) ;
00029 }

Here is the call graph for this function:

int set_mark_foreground_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 16 of file set_mark_foreground_property.c.

References getDoubleFromStack(), isParameterDoubleMatrix(), sciprint(), sciSetMarkForeground(), and SET_PROPERTY_ERROR.

00017 {
00018 
00019   if ( !isParameterDoubleMatrix( valueType ) )
00020   {
00021     sciprint("Incompatible type for property mark_foreground.\n") ;
00022     return SET_PROPERTY_ERROR ;
00023   }
00024 
00025   /*    sciSetIsMark((sciPointObj *) pobj, TRUE); */
00026   /* F.Leray 27.01.05 commented because mark_size is automatically launched */
00027   /* in tcl/tk editor (which causes marks appearance even when unwanted). */
00028   return sciSetMarkForeground( pobj, (int) getDoubleFromStack( stackPointer ) ) ;
00029 }

Here is the call graph for this function:

int set_mark_mode_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 16 of file set_mark_mode_property.c.

References FALSE, isParameterStringMatrix(), isStringParamEqual(), sciprint(), sciSetIsMark(), SET_PROPERTY_ERROR, and TRUE.

00017 {
00018   if ( !isParameterStringMatrix( valueType ) )
00019   {
00020     sciprint("Incompatible type for property mark_mode.\n") ;
00021     return SET_PROPERTY_ERROR ;
00022   }
00023 
00024   if ( isStringParamEqual( stackPointer, "on" ) )
00025   {
00026     return sciSetIsMark( pobj, TRUE ) ;
00027   }
00028   else if ( isStringParamEqual( stackPointer, "off" ) )
00029   {
00030     return sciSetIsMark( pobj, FALSE ) ;
00031   }
00032   else
00033   {
00034     sciprint("Value must be 'on/off'.\n") ;
00035     return SET_PROPERTY_ERROR ;
00036   }
00037 }

Here is the call graph for this function:

int set_mark_size_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 16 of file set_mark_size_property.c.

References getDoubleFromStack(), isParameterDoubleMatrix(), sciprint(), sciSetMarkSize(), and SET_PROPERTY_ERROR.

00017 {
00018   if ( !isParameterDoubleMatrix( valueType ) )
00019   {
00020     sciprint("Incompatible type for property mark_size.\n") ;
00021     return SET_PROPERTY_ERROR ;
00022   }
00023 
00024   /* sciSetIsMark((sciPointObj *) pobj, TRUE); */ 
00025   /* F.Leray 27.01.05 commented because mark_size is automatically launched */
00026   /* in tcl/tk editor (which causes marks appearance even when unwanted). */
00027   return sciSetMarkSize( pobj, (int) getDoubleFromStack( stackPointer ) ) ;
00028 }

Here is the call graph for this function:

int set_mark_size_unit_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 16 of file set_mark_size_unit_property.c.

References isParameterStringMatrix(), isStringParamEqual(), sciprint(), sciSetMarkSizeUnit(), and SET_PROPERTY_ERROR.

00017 {
00018   if ( !isParameterStringMatrix( valueType ) )
00019   {
00020     sciprint("Incompatible type for property mark_size_unit.\n") ;
00021     return SET_PROPERTY_ERROR ;
00022   }
00023 
00024   if ( isStringParamEqual( stackPointer, "point") )
00025   {
00026     return sciSetMarkSizeUnit( pobj, 1 ) ; /* 1 : points, 2 : tabulated */
00027   }
00028   else if ( isStringParamEqual( stackPointer, "tabulated" ) )
00029   {
00030     return sciSetMarkSizeUnit( pobj, 2) ;
00031   }
00032   else
00033   {
00034     sciprint("Value must be 'point/tabulated'.\n") ;
00035     return SET_PROPERTY_ERROR ;
00036   }
00037   return SET_PROPERTY_ERROR ;
00038 }

Here is the call graph for this function:

int set_mark_style_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 16 of file set_mark_style_property.c.

References getDoubleFromStack(), isParameterDoubleMatrix(), sciprint(), sciSetFinalStatus(), sciSetIsMark(), sciSetMarkStyle(), SET_PROPERTY_ERROR, and TRUE.

00017 {
00018   int status1 ;
00019   int status2 ;
00020 
00021   if ( !isParameterDoubleMatrix( valueType ) )
00022   {
00023     sciprint("Incompatible type for property mark_style.\n") ;
00024     return SET_PROPERTY_ERROR ;
00025   }
00026 
00027    status1 = sciSetIsMark( pobj, TRUE ) ;
00028    status2 = sciSetMarkStyle( pobj, (int) getDoubleFromStack(stackPointer) ) ;
00029 
00030   return sciSetFinalStatus( (SetPropertyStatus)status1, (SetPropertyStatus)status2 ) ;
00031 }

Here is the call graph for this function:

int set_menu_enable_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_menu_enable_property.c.

References FALSE, isParameterStringMatrix(), isStringParamEqual(), pUIMENU_FEATURE, SCI_UIMENU, sciGetEntityType(), sciprint(), SET_PROPERTY_ERROR, SET_PROPERTY_SUCCEED, and TRUE.

00018 {
00019 
00020   if ( !isParameterStringMatrix( valueType ) )
00021   {
00022     sciprint("Incompatible type for property menu_enable.\n") ;
00023     return SET_PROPERTY_ERROR ;
00024   }
00025 
00026   if ( sciGetEntityType(pobj) != SCI_UIMENU )
00027   {
00028     sciprint( "menu_enable property does not exist for this handle.\n" ) ;
00029     return SET_PROPERTY_ERROR ;
00030   }
00031 
00032   if ( isStringParamEqual( stackPointer, "on" ) )
00033   {
00034     pUIMENU_FEATURE(pobj)->Enable = TRUE ;
00035   }
00036   else if ( isStringParamEqual( stackPointer, "off" ) )
00037   {
00038     pUIMENU_FEATURE(pobj)->Enable=FALSE;
00039   }
00040   else
00041   {
00042     sciprint("Value must be 'on' or 'off'.\n");
00043     return SET_PROPERTY_ERROR ;
00044   }
00045 
00046   return SET_PROPERTY_SUCCEED ;
00047 }

Here is the call graph for this function:

int set_old_style_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 16 of file set_old_style_property.c.

References getStringFromStack(), isParameterStringMatrix(), isStringParamEqual(), sciprint(), SET_PROPERTY_ERROR, and SET_PROPERTY_UNCHANGED.

00017 {
00018   getStringFromStack( stackPointer ) ;
00019 
00020   if ( !isParameterStringMatrix( valueType ) )
00021   {
00022     sciprint("Incompatible type for property old_style.\n") ;
00023     return SET_PROPERTY_ERROR ;
00024   }
00025 
00026   if ( isStringParamEqual( stackPointer, "off" ) )
00027   {
00028     return SET_PROPERTY_UNCHANGED ;
00029   }
00030   else if ( isStringParamEqual( stackPointer, "on" ) )
00031   {
00032     sciprint("Old graphic mode is no longer available. Please refer to the set help page.\n") ;
00033     return SET_PROPERTY_ERROR ;
00034   }
00035   else
00036   {
00037     sciprint("old_style must be 'on' or 'off'.\n");
00038     return SET_PROPERTY_ERROR ;
00039   }
00040 }

Here is the call graph for this function:

int set_parent_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 16 of file set_parent_property.c.

References sciprint(), and SET_PROPERTY_ERROR.

00017 {
00018   sciprint( "Parent property can not be modified directly.\n" ) ;
00019   return SET_PROPERTY_ERROR ;
00020 }

Here is the call graph for this function:

int set_pixel_drawing_mode_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 18 of file set_pixel_drawing_mode_property.c.

References getPixelModeIndex(), getStringFromStack(), isParameterStringMatrix(), SCI_FIGURE, sciGetEntityType(), sciprint(), sciSetXorMode(), SET_PROPERTY_ERROR, and v.

00019 {
00020   int v = -1 ;
00021 
00022   if ( !isParameterStringMatrix( valueType ) )
00023   {
00024     sciprint("Incompatible type for property pixel_drawing_mode.\n") ;
00025     return SET_PROPERTY_ERROR ;
00026   }
00027 
00028   if ( sciGetEntityType (pobj) != SCI_FIGURE )
00029   {
00030     sciprint( "pixel_drawing_mode: unknown property for this handle.\n" ) ;
00031     return SET_PROPERTY_ERROR ;
00032   }
00033   v = getPixelModeIndex( getStringFromStack( stackPointer ) ) ;
00034 
00035   if ( v < 0 )
00036   {
00037     sciprint( "pixel_drawing_mode: unknown property for this handle.\n" ) ;
00038     return SET_PROPERTY_ERROR ;
00039   }
00040 
00041   return sciSetXorMode( pobj, v );
00042 }

Here is the call graph for this function:

int set_pixmap_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 16 of file set_pixmap_property.c.

References isStringParamEqual(), pFIGURE_FEATURE, SCI_FIGURE, sciGetEntityType(), and sciprint().

00017 {
00018   if ( sciGetEntityType (pobj) != SCI_FIGURE )
00019   {
00020     sciprint( "pixmap property undefined for this object.\n" ) ;
00021     return -1;
00022   }
00023 
00024   if ( isStringParamEqual( stackPointer, "on" ) )
00025   {
00026     pFIGURE_FEATURE(pobj)->pixmap = 1 ;
00027   }
00028   else if ( isStringParamEqual( stackPointer, "off" ) )
00029   {
00030     pFIGURE_FEATURE(pobj)->pixmap = 0 ;
00031   }
00032   else
00033   {
00034     sciprint("Nothing to do (value must be 'on/off').\n") ;
00035     return -1 ;
00036   }
00037   return 0 ;
00038 }

Here is the call graph for this function:

int set_polyline_style_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_polyline_style_property.c.

References getDoubleFromStack(), int, isParameterDoubleMatrix(), pPOLYLINE_FEATURE, SCI_POLYLINE, sciGetEntityType(), sciprint(), SET_PROPERTY_ERROR, SET_PROPERTY_SUCCEED, and value.

00018 {
00019   int value = 0 ;
00020 
00021   if ( !isParameterDoubleMatrix( valueType ) )
00022   {
00023     sciprint("Incompatible type for property polyline_style.\n") ;
00024     return SET_PROPERTY_ERROR ;
00025   }
00026 
00027   if (sciGetEntityType (pobj) != SCI_POLYLINE)
00028   {
00029     sciprint( "polyline_style property does not exist for this handle.\n" ) ;
00030     return SET_PROPERTY_ERROR ;
00031   }
00032     
00033   value = (int) getDoubleFromStack( stackPointer ) ;
00034   if ( value < 1 || value > 7 )
00035   {
00036     sciprint("Style must be 1,2,3,4,5,6 or 7.\n") ;
00037     return SET_PROPERTY_ERROR ;
00038   }
00039 
00040   pPOLYLINE_FEATURE (pobj)->plot = value ;
00041   return SET_PROPERTY_SUCCEED ;
00042   
00043 }

Here is the call graph for this function:

int set_position_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_position_property.c.

References FALSE, getDoubleFromStack(), getDoubleMatrixFromStack(), int, isParameterDoubleMatrix(), pUIMENU_FEATURE, SCI_LABEL, SCI_UIMENU, sciGetAutoPosition(), sciGetEntityType(), sciprint(), sciSetAutoPosition(), sciSetPosition(), SET_PROPERTY_ERROR, and SET_PROPERTY_SUCCEED.

00018 {
00019 
00020   if ( !isParameterDoubleMatrix( valueType ) )
00021   {
00022     sciprint("Incompatible type for property position.\n") ;
00023     return SET_PROPERTY_ERROR ;
00024   }
00025 
00026   if ( sciGetAutoPosition( pobj ) )
00027   {
00028     sciSetAutoPosition( pobj, FALSE ) ;
00029   }
00030 
00031   if ( sciGetEntityType(pobj)== SCI_UIMENU )
00032   {
00033     pUIMENU_FEATURE(pobj)->MenuPosition = (int) getDoubleFromStack( stackPointer ) ;
00034     return SET_PROPERTY_SUCCEED ;
00035   }
00036   else if( sciGetEntityType(pobj) == SCI_LABEL )
00037   {
00038     double * values = getDoubleMatrixFromStack( stackPointer ) ;
00039     return sciSetPosition( pobj, values[0], values[1] ) ;
00040   }
00041   else
00042   {
00043     sciprint( "position does not exist for this handle.\n" ) ;
00044     return SET_PROPERTY_ERROR ;
00045   }
00046   return SET_PROPERTY_ERROR ;
00047 }

Here is the call graph for this function:

int set_rotation_angles_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 19 of file set_rotation_angles_property.c.

References alpha, getDoubleMatrixFromStack(), isParameterDoubleMatrix(), Obj_RedrawNewAngle(), pSUBWIN_FEATURE, SCI_SUBWIN, sciGetEntityType(), sciprint(), SET_PROPERTY_ERROR, SET_PROPERTY_SUCCEED, theta, and wininfo().

00020 {
00021   double * values = getDoubleMatrixFromStack( stackPointer ) ;
00022 
00023   if ( !isParameterDoubleMatrix( valueType ) )
00024   {
00025     sciprint("Incompatible type for property rotation_angles.\n") ;
00026     return SET_PROPERTY_ERROR ;
00027   }
00028 
00029   /* DJ.A 2003 */
00030   if ( sciGetEntityType (pobj) != SCI_SUBWIN )
00031   {
00032     sciprint("rotation_angles property does not exist for this handle.\n" ) ;
00033     return SET_PROPERTY_ERROR ;
00034   }
00035 
00036   Obj_RedrawNewAngle( pobj, values[1], values[0] ) ;
00037   wininfo("alpha=%.1f,theta=%.1f",pSUBWIN_FEATURE (pobj)->alpha,pSUBWIN_FEATURE (pobj)->theta);
00038 
00039   return SET_PROPERTY_SUCCEED ;
00040 
00041 }

Here is the call graph for this function:

int set_rotation_style_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_rotation_style_property.c.

References getStringFromStack(), isParameterStringMatrix(), isStringParamEqual(), pFIGURE_FEATURE, SCI_FIGURE, sciGetEntityType(), sciprint(), SET_PROPERTY_ERROR, and SET_PROPERTY_SUCCEED.

00018 {
00019   getStringFromStack( stackPointer ) ;
00020 
00021   if ( !isParameterStringMatrix( valueType ) )
00022   {
00023     sciprint("Incompatible type for property rotation_style.\n") ;
00024     return SET_PROPERTY_ERROR ;
00025   }
00026 
00027   if ( sciGetEntityType (pobj) != SCI_FIGURE ) 
00028   {
00029     sciprint( "rotation_style_property undefined for this object.\n" ) ;
00030     return SET_PROPERTY_ERROR ;
00031   }
00032 
00033   if ( isStringParamEqual( stackPointer, "unary" ) )
00034   {
00035     pFIGURE_FEATURE(pobj)->rotstyle = 0 ;
00036     return SET_PROPERTY_SUCCEED ;
00037   }
00038   else if ( isStringParamEqual( stackPointer, "multiple" ) )
00039   {
00040     pFIGURE_FEATURE(pobj)->rotstyle = 1 ;
00041     return SET_PROPERTY_SUCCEED ;
00042   }
00043   else
00044   {
00045     sciprint("Nothing to do (value must be 'unary/multiple').\n");
00046     return SET_PROPERTY_ERROR ;
00047   }
00048   return SET_PROPERTY_ERROR ;
00049 }

Here is the call graph for this function:

int set_segs_color_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_segs_color_property.c.

References copyDoubleVectorToIntFromStack(), getDoubleFromStack(), i, iflag, int, isParameterDoubleMatrix(), pSEGS_FEATURE, SCI_SEGS, sciGetEntityType(), sciprint(), SET_PROPERTY_ERROR, SET_PROPERTY_SUCCEED, and value.

00018 {
00019   int nbSegs = 0 ;
00020 
00021   if ( !isParameterDoubleMatrix( valueType ) )
00022   {
00023     sciprint("Incompatible type for property segs_color.\n") ;
00024     return SET_PROPERTY_ERROR ;
00025   }
00026 
00027   if ( sciGetEntityType(pobj) != SCI_SEGS || pSEGS_FEATURE(pobj)->ptype != 0 )
00028   {
00029     sciprint( "segs_color_property does not exist for this handle.\n" ) ;
00030     return SET_PROPERTY_ERROR ;
00031   }
00032 
00033   nbSegs = pSEGS_FEATURE(pobj)->Nbr1 / 2 ;
00034 
00035   if ( nbRow * nbCol == 1 )
00036   {
00037     int i ;
00038     int value = (int) getDoubleFromStack( stackPointer ) ;
00039     pSEGS_FEATURE (pobj)->iflag = 0 ;
00040     for ( i = 0 ; i < nbSegs ; i++ )
00041     {
00042       pSEGS_FEATURE (pobj)->pstyle[i] = value ;
00043     }
00044   }
00045   else if ( nbRow * nbCol == nbSegs )
00046   {
00047     pSEGS_FEATURE (pobj)->iflag = 1 ;
00048     copyDoubleVectorToIntFromStack( stackPointer, pSEGS_FEATURE (pobj)->pstyle, nbSegs ) ;
00049   }
00050   else
00051   { 
00052     sciprint("segs color has a wrong size (%d), expecting 1 or (%d)", nbRow * nbCol , nbSegs );
00053     return SET_PROPERTY_ERROR ;
00054   }
00055 
00056   return SET_PROPERTY_SUCCEED ;
00057 
00058 }

Here is the call graph for this function:

int set_sub_tics_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_sub_tics_property.c.

References sciSubWindow::axes, sciSubWindow::flagNax, getDoubleFromStack(), getDoubleMatrixFromStack(), i, int, isParameterDoubleMatrix(), sciSubWindow::logflags, AXES::nbsubtics, pAXES_FEATURE, pSUBWIN_FEATURE, SCI_AXES, SCI_SUBWIN, sciGetEntityType(), sciprint(), SET_PROPERTY_ERROR, SET_PROPERTY_SUCCEED, and TRUE.

00018 {
00019 
00020   if ( !isParameterDoubleMatrix( valueType ) )
00021   {
00022     sciprint("Incompatible type for property sub_tics.\n") ;
00023     return SET_PROPERTY_ERROR ;
00024   }
00025 
00026   if (sciGetEntityType (pobj) == SCI_AXES)
00027   {
00028     pAXES_FEATURE(pobj)->subint= (int) getDoubleFromStack( stackPointer ) ;
00029   }
00030   else if ( sciGetEntityType(pobj) == SCI_SUBWIN ) 
00031   {
00032     int i ;
00033     double * values = getDoubleMatrixFromStack( stackPointer ) ;
00034     sciSubWindow * ppSubWin = pSUBWIN_FEATURE (pobj) ;
00035     if ( (nbCol != 3 ) && (nbCol != 2) )
00036     {
00037       sciprint( "Value must have two elements (three if in 3D).\n" ) ;
00038       return  SET_PROPERTY_ERROR ;
00039     }
00040     ppSubWin->flagNax = TRUE;
00041     for ( i = 0; i < nbCol ; i++ )
00042     {
00043       char logflag = ppSubWin->logflags[i] ;
00044       int  nbTicks ;
00045 
00046       if(logflag == 'l')
00047       {
00048         /* sciprint("Subtics number can not be set while using logarithmic scaling\n"); */
00049         continue ;
00050       }
00051 
00052       nbTicks = (int) values[i] ;
00053       if( nbTicks >= 0 )
00054       {
00055         ppSubWin->axes.nbsubtics[i] = nbTicks + 1 ;
00056       } 
00057       else
00058       {
00059         ppSubWin->axes.nbsubtics[i] = 1 ;
00060       }
00061     }
00062     return SET_PROPERTY_SUCCEED ;
00063   }
00064   else
00065   {
00066     sciprint( "sub_ticks property does not exist for this handle.\n" ) ;
00067     return SET_PROPERTY_ERROR ;
00068   }
00069   return SET_PROPERTY_ERROR ;
00070 }

Here is the call graph for this function:

int set_surface_color_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 20 of file set_surface_color_property.c.

References copyDoubleVectorFromStack(), isParameterDoubleMatrix(), N, pSURFACE_FEATURE, SCI_FAC3D, SCI_PARAM3D1, SCI_SURFACE, sciGetEntityType(), sciprint(), SET_PROPERTY_ERROR, and SET_PROPERTY_SUCCEED.

00021 {
00022 
00023   if ( !isParameterDoubleMatrix( valueType ) )
00024   {
00025     sciprint("Incompatible type for property surface_color.\n") ;
00026     return SET_PROPERTY_ERROR ;
00027   }
00028 
00029   if (sciGetEntityType (pobj) != SCI_SURFACE)
00030   {
00031     sciprint( "surface_color property does not exist for this handle.\n" ) ;
00032     return SET_PROPERTY_ERROR ;
00033   }
00034 
00035   if ( pSURFACE_FEATURE(pobj)->typeof3d == SCI_PARAM3D1 )
00036   {
00037     if (pSURFACE_FEATURE (pobj)->dimzy != nbRow * nbCol )
00038     {
00039       sciprint( "Second argument must have %d elements.\n", pSURFACE_FEATURE (pobj)->dimzy);
00040       return SET_PROPERTY_ERROR ;
00041     }
00042     copyDoubleVectorFromStack( stackPointer, pSURFACE_FEATURE(pobj)->zcol, pSURFACE_FEATURE (pobj)->dimzy ) ;
00043   }
00044   else if ( pSURFACE_FEATURE (pobj)->typeof3d == SCI_FAC3D && pSURFACE_FEATURE (pobj)->flagcolor >= 2 )
00045   {
00046     int N;
00047     if ( pSURFACE_FEATURE(pobj)->flagcolor == 2 )
00048     {
00049       N = pSURFACE_FEATURE (pobj)->dimzy ;
00050     }
00051     else
00052     {
00053       N = pSURFACE_FEATURE(pobj)->dimzy * pSURFACE_FEATURE (pobj)->dimzx;
00054     }
00055     if ( nbRow * nbCol != N)
00056     {
00057       sciprint("Second argument must have %d elements.\n",N) ;
00058       return SET_PROPERTY_ERROR ;
00059     }
00060     copyDoubleVectorFromStack( stackPointer, pSURFACE_FEATURE (pobj)->zcol, N ) ;
00061   }
00062   else
00063   {
00064     sciprint( "surface_color cannot be set in this case.\n" ) ;
00065     return SET_PROPERTY_ERROR ;
00066   }
00067 
00068   return SET_PROPERTY_SUCCEED ;
00069 
00070 }

Here is the call graph for this function:

int set_surface_mode_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_surface_mode_property.c.

References FALSE, isParameterStringMatrix(), isStringParamEqual(), SCI_FAC3D, SCI_PLOT3D, SCI_SURFACE, sciGetEntityType(), sciprint(), sciSetIsLine(), SET_PROPERTY_ERROR, and TRUE.

00018 {
00019   
00020   if ( !isParameterStringMatrix( valueType ) )
00021   {
00022     sciprint("Incompatible type for property surface_mode.\n") ;
00023     return SET_PROPERTY_ERROR ;
00024   }
00025 
00026   if ( sciGetEntityType(pobj) != SCI_PLOT3D &&
00027        sciGetEntityType(pobj) != SCI_FAC3D  &&
00028        sciGetEntityType(pobj) != SCI_SURFACE   )
00029   {
00030     sciprint( "Surface_mode can not be set with this object, use line_mode.\n" ) ;
00031     return SET_PROPERTY_ERROR ;
00032   }
00033 
00034   if ( isStringParamEqual( stackPointer, "on" ) )
00035   {
00036     return sciSetIsLine( pobj, TRUE ) ;
00037   }
00038   else if ( isStringParamEqual( stackPointer, "off" ) )
00039   {
00040     return sciSetIsLine( pobj, FALSE ) ;
00041   }
00042   else
00043   {
00044     sciprint( "Value must be 'on/off'.\n" ) ;
00045     return SET_PROPERTY_ERROR ;
00046   }
00047   return SET_PROPERTY_ERROR ;
00048 }

Here is the call graph for this function:

int set_text_box_mode_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_text_box_mode_property.c.

References FALSE, isParameterStringMatrix(), isStringParamEqual(), SCI_TEXT, sciGetEntityType(), sciprint(), sciSetAutoSize(), sciSetCenterPos(), sciSetFinalStatus(), SET_PROPERTY_ERROR, and TRUE.

00018 {
00019   
00020   if ( !isParameterStringMatrix( valueType ) )
00021   {
00022     sciprint("Incompatible type for property text_box_mode.\n") ;
00023     return SET_PROPERTY_ERROR ;
00024   }
00025 
00026   if ( sciGetEntityType(pobj) != SCI_TEXT )
00027   {
00028     sciprint( "text_box_mode property does not exist for this handle.\n" ) ;
00029     return SET_PROPERTY_ERROR ;
00030   }
00031 
00032   if ( isStringParamEqual( stackPointer, "off" ) )
00033   {
00034     int status1 = sciSetCenterPos( pobj, FALSE ) ;
00035     int status2 = sciSetAutoSize(  pobj, TRUE  ) ;
00036     return sciSetFinalStatus( (SetPropertyStatus)status1, (SetPropertyStatus)status2 ) ;
00037   }
00038   else if ( isStringParamEqual( stackPointer, "centered" ) )
00039   {
00040     int status1 = sciSetCenterPos( pobj, TRUE  ) ;
00041     int status2 = sciSetAutoSize(  pobj, TRUE  ) ;
00042     return sciSetFinalStatus( (SetPropertyStatus)status1, (SetPropertyStatus)status2 ) ;
00043   }
00044   else if ( isStringParamEqual( stackPointer, "filled" ) )
00045   {
00046     int status1 = sciSetCenterPos( pobj, TRUE  ) ;
00047     int status2 = sciSetAutoSize(  pobj, FALSE ) ;
00048     return sciSetFinalStatus( (SetPropertyStatus)status1, (SetPropertyStatus)status2 ) ;
00049   }
00050   else
00051   {
00052     sciprint( "Value must be 'off', 'centered' or 'filled'.\n" );
00053     return SET_PROPERTY_ERROR ;
00054   }
00055   return SET_PROPERTY_ERROR ;
00056 
00057 }

Here is the call graph for this function:

int set_text_box_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_text_box_property.c.

References getDoubleMatrixFromStack(), isParameterDoubleMatrix(), SCI_TEXT, sciGetEntityType(), sciprint(), sciSetUserSize(), and SET_PROPERTY_ERROR.

00018 {
00019   double * values = getDoubleMatrixFromStack( stackPointer ) ;
00020 
00021   if ( !isParameterDoubleMatrix( valueType ) )
00022   {
00023     sciprint("Incompatible type for property text_box.\n") ;
00024     return SET_PROPERTY_ERROR ;
00025   }
00026 
00027   if (sciGetEntityType (pobj) != SCI_TEXT)
00028   {
00029     sciprint("text_box property does not exist for this handle.\n");
00030     return SET_PROPERTY_ERROR ;
00031   }
00032 
00033   if ( nbRow * nbCol != 2 )
00034   {
00035     sciprint("text_box must be a 2D vector.\n");
00036     return SET_PROPERTY_ERROR ;
00037   }
00038   return sciSetUserSize( pobj, values[0], values[1] ) ;
00039 
00040 
00041 }

Here is the call graph for this function:

int set_text_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_text_property.c.

References getStringMatrixFromStack(), isParameterStringMatrix(), sciprint(), sciSetText(), and SET_PROPERTY_ERROR.

00018 {
00019   if ( !isParameterStringMatrix( valueType ) )
00020   {
00021     sciprint("Incompatible type for property text.\n") ;
00022     return SET_PROPERTY_ERROR ;
00023   }
00024 
00025   return sciSetText( pobj, getStringMatrixFromStack( stackPointer ), nbRow, nbCol ) ;
00026 }

Here is the call graph for this function:

int set_thickness_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 16 of file set_thickness_property.c.

References getDoubleFromStack(), isParameterDoubleMatrix(), sciprint(), sciSetLineWidth(), and SET_PROPERTY_ERROR.

00017 {
00018 
00019   if ( !isParameterDoubleMatrix( valueType ) )
00020   {
00021     sciprint("Incompatible type for property thickness.\n") ;
00022     return SET_PROPERTY_ERROR ;
00023   }
00024 
00025   return sciSetLineWidth( pobj, (int) getDoubleFromStack( stackPointer ) ) ;
00026 }

Here is the call graph for this function:

int set_tics_color_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 19 of file set_tics_color_property.c.

References getDoubleFromStack(), int, isParameterDoubleMatrix(), pAXES_FEATURE, pSUBWIN_FEATURE, SCI_AXES, SCI_SUBWIN, sciGetEntityType(), sciprint(), SET_PROPERTY_ERROR, and SET_PROPERTY_SUCCEED.

00020 {
00021 
00022   if ( !isParameterDoubleMatrix( valueType ) )
00023   {
00024     sciprint("Incompatible type for property tics_color.\n") ;
00025     return SET_PROPERTY_ERROR ;
00026   }
00027 
00028   if ( sciGetEntityType(pobj) == SCI_AXES )
00029   {
00030     pAXES_FEATURE (pobj)->ticscolor = (int) getDoubleFromStack( stackPointer ) ;
00031   }
00032   else if ( sciGetEntityType(pobj) == SCI_SUBWIN )
00033   {
00034     sciprint("Warning: tics_color use is deprecated and no more taken into account, use foreground property to edit Axes color\n");
00035     pSUBWIN_FEATURE (pobj)->axes.ticscolor = (int)getDoubleFromStack( stackPointer ) ;
00036   }
00037   else
00038   {
00039     sciprint( "tics_color property does not exist for this handle.\n" ) ;
00040     return SET_PROPERTY_SUCCEED ;
00041   }
00042   return SET_PROPERTY_SUCCEED ;
00043 }

Here is the call graph for this function:

int set_tics_direction_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_tics_direction_property.c.

References isParameterStringMatrix(), isStringParamEqual(), pAXES_FEATURE, SCI_AXES, sciGetEntityType(), sciprint(), SET_PROPERTY_ERROR, and SET_PROPERTY_SUCCEED.

00018 {
00019 
00020   if ( !isParameterStringMatrix( valueType ) )
00021   {
00022     sciprint("Incompatible type for property tics_direction.\n") ;
00023     return SET_PROPERTY_ERROR ;
00024   }
00025 
00026   if ( sciGetEntityType(pobj) != SCI_AXES )
00027   {
00028     sciprint("tics_direction property does not exist for this handle.\n" ) ;
00029     return SET_PROPERTY_ERROR ;
00030   }
00031 
00032   if ( pAXES_FEATURE (pobj)->ny == 1 )
00033   { 
00034     if( isStringParamEqual( stackPointer, "top" ) )
00035     {
00036       pAXES_FEATURE (pobj)->dir = 'u' ;
00037     }
00038     else if ( isStringParamEqual( stackPointer, "bottom" ) )
00039     {
00040       pAXES_FEATURE (pobj)->dir = 'd' ;
00041     }
00042     else
00043     {
00044       sciprint("Second argument must be 'top' or 'bottom'.\n") ;
00045       return SET_PROPERTY_ERROR ;
00046     }
00047     return SET_PROPERTY_SUCCEED ;
00048   } 
00049   else
00050   {
00051     if( isStringParamEqual( stackPointer, "right" ) )
00052     {
00053       pAXES_FEATURE (pobj)->dir = 'r' ;
00054     }
00055     else if ( isStringParamEqual( stackPointer, "left" ) )
00056     {
00057       pAXES_FEATURE (pobj)->dir = 'l' ;
00058     }
00059     else
00060     {
00061       sciprint("Second argument must be 'right' or 'left'.\n") ;
00062       return -1 ;
00063     }
00064     return SET_PROPERTY_SUCCEED ;
00065   }
00066   return SET_PROPERTY_ERROR ;
00067 }

Here is the call graph for this function:

int set_tics_labels_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 18 of file set_tics_labels_property.c.

References createCopyStringMatrixFromStack(), destroyStringArray(), isParameterStringMatrix(), NULL, pAXES_FEATURE, SCI_AXES, sciGetEntityType(), sciprint(), SET_PROPERTY_ERROR, SET_PROPERTY_SUCCEED, and str.

00019 {
00020 
00021   if ( !isParameterStringMatrix( valueType ) )
00022   {
00023     sciprint("Incompatible type for property tics_labels.\n") ;
00024     return SET_PROPERTY_ERROR ;
00025   }
00026 
00027   if ( sciGetEntityType(pobj) != SCI_AXES )
00028   {
00029     sciprint( "tics_labels property does not exist for this handle.\n" ) ;
00030     return SET_PROPERTY_ERROR ;
00031   }
00032 
00033   if ( nbRow != 1)
00034   {
00035     sciprint("Second argument must be a row vector.\n");
00036     return SET_PROPERTY_ERROR ;
00037   }
00038 
00039   if ( pAXES_FEATURE(pobj)->nb_tics_labels > nbCol )
00040   {
00041     sciprint("Value must have at least %d elements",pAXES_FEATURE(pobj)->nb_tics_labels) ;
00042     return SET_PROPERTY_ERROR ;
00043   }
00044 
00045   if(pAXES_FEATURE(pobj)->str != NULL)
00046   {
00047     destroyStringArray( pAXES_FEATURE(pobj)->str, pAXES_FEATURE(pobj)->nb_tics_labels ) ;
00048   }
00049 
00050   pAXES_FEATURE(pobj)->str = createCopyStringMatrixFromStack( stackPointer, nbCol ) ;
00051   pAXES_FEATURE(pobj)->nb_tics_labels = nbCol ; /* could be increased to support xy_type switching (i.e. xy_type='v' -> xy_type='r') */
00052 
00053   return SET_PROPERTY_SUCCEED ;
00054 }

Here is the call graph for this function:

int set_tics_segment_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_tics_segment_property.c.

References isParameterStringMatrix(), isStringParamEqual(), pAXES_FEATURE, SCI_AXES, sciGetEntityType(), sciprint(), SET_PROPERTY_ERROR, and SET_PROPERTY_SUCCEED.

00018 {
00019 
00020   if ( !isParameterStringMatrix( valueType ) )
00021   {
00022     sciprint("Incompatible type for property tics_segment.\n") ;
00023     return SET_PROPERTY_ERROR ;
00024   }
00025 
00026   if ( sciGetEntityType(pobj) != SCI_AXES )
00027   {
00028     sciprint( "tics_segment property does not exist for this handle.\n" ) ;
00029     return SET_PROPERTY_ERROR ;
00030   }
00031 
00032   if ( isStringParamEqual( stackPointer, "on" ) )
00033   {
00034     pAXES_FEATURE (pobj)->seg = 1;
00035   }
00036   else if ( isStringParamEqual( stackPointer, "off" ) )
00037   {
00038     pAXES_FEATURE (pobj)->seg = 0 ;
00039   }
00040   else
00041   {
00042     sciprint( "Nothing to do (value must be 'on/off').\n" ) ;
00043     return SET_PROPERTY_ERROR ;
00044   }
00045 
00046   return SET_PROPERTY_SUCCEED ;
00047 }

Here is the call graph for this function:

int set_tics_style_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 20 of file set_tics_style_property.c.

References ComputeXIntervals(), getStringFromStack(), isParameterStringMatrix(), isStringParamEqual(), N, NULL, pAXES_FEATURE, SCI_AXES, sciGetEntityType(), sciprint(), SET_PROPERTY_ERROR, SET_PROPERTY_SUCCEED, and str.

00021 {
00022   double * vector = NULL ;
00023   int N = 0 ;
00024  
00025   char xy_type ;
00026 
00027   if ( !isParameterStringMatrix( valueType ) )
00028   {
00029     sciprint("Incompatible type for property tics_style.\n") ;
00030     return SET_PROPERTY_ERROR ;
00031   }
00032 
00033   if ( sciGetEntityType(pobj) != SCI_AXES )
00034   {
00035     sciprint( "tics_style property does not exist for this handle.\n" ) ;
00036     return SET_PROPERTY_ERROR ;
00037   }
00038 
00039   if (    !isStringParamEqual( stackPointer, "v" )
00040        && !isStringParamEqual( stackPointer, "r" )
00041        && !isStringParamEqual( stackPointer, "i" ) )
00042   {
00043     sciprint("tics must be 'v' or 'r' or 'i'.\n") ;
00044     return SET_PROPERTY_ERROR ;
00045   }
00046 
00047    /* get the character 'v', 'r' or 'i' */
00048   xy_type = getStringFromStack( stackPointer )[0] ;
00049 
00050   if( pAXES_FEATURE (pobj)->str != NULL )
00051   {
00052     if( ComputeXIntervals(pobj,xy_type,&vector,&N,1) != 0 )
00053     {
00054       sciprint("Error: Bad size in tics_coord ; you must first increase the size of the tics_coord.\n");
00055       return SET_PROPERTY_ERROR ;
00056     }
00057     if( pAXES_FEATURE(pobj)->nb_tics_labels < N )
00058     {
00059       sciprint("Warning: tics_labels has been set by user ; you must first increase the size of the tics_labels string vector before switching to the new tics_style mode.\n");
00060       return SET_PROPERTY_ERROR;
00061     }
00062   }
00063 
00064   pAXES_FEATURE (pobj)->tics = xy_type ;
00065 
00066   return SET_PROPERTY_SUCCEED ;
00067 }

Here is the call graph for this function:

int set_tight_limits_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_tight_limits_property.c.

References FALSE, isParameterStringMatrix(), isStringParamEqual(), pSUBWIN_FEATURE, SCI_SUBWIN, sciGetEntityType(), sciprint(), SET_PROPERTY_ERROR, SET_PROPERTY_SUCCEED, and TRUE.

00018 {
00019 
00020   if ( !isParameterStringMatrix( valueType ) )
00021   {
00022     sciprint("Incompatible type for property tight_limits.\n") ;
00023     return SET_PROPERTY_ERROR ;
00024   }
00025 
00026   if ( sciGetEntityType(pobj) != SCI_SUBWIN )
00027   {
00028     sciprint("tight_limits property does not exists for this handle.\n") ;
00029     return SET_PROPERTY_ERROR ;
00030   }
00031 
00032   if ( isStringParamEqual( stackPointer, "on" ) )
00033   {
00034     pSUBWIN_FEATURE (pobj)->tight_limits = TRUE ;
00035   }
00036   else if ( isStringParamEqual( stackPointer, "off" ) )
00037   {
00038     pSUBWIN_FEATURE (pobj)->tight_limits = FALSE ;
00039   }
00040   else
00041   {
00042     sciprint("Second argument must be 'on' or 'off'.\n") ;
00043     return SET_PROPERTY_ERROR ;
00044   }
00045   return SET_PROPERTY_SUCCEED ;
00046 }

Here is the call graph for this function:

int set_title_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 18 of file set_title_property.c.

References SCI_SUBWIN, sciGetEntityType(), sciprint(), and SET_PROPERTY_ERROR.

00019 {
00020 
00021   if ( sciGetEntityType(pobj) != SCI_SUBWIN )
00022   {
00023     sciprint("title property undefined for this object.\n") ;
00024     return SET_PROPERTY_ERROR ;
00025   }
00026   else
00027   {
00028     sciprint("can not set directly a label object.\n") ;
00029     return SET_PROPERTY_ERROR ;
00030   }
00031   return SET_PROPERTY_ERROR ;
00032 }

Here is the call graph for this function:

int set_triangles_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 20 of file set_triangles_property.c.

References copyDoubleVectorFromStack(), createCopyDoubleVectorFromStack(), FREE, isParameterDoubleMatrix(), NULL, pFEC_FEATURE, SCI_FEC, sciGetEntityType(), sciprint(), SET_PROPERTY_ERROR, and SET_PROPERTY_SUCCEED.

00021 {
00022 
00023   if ( !isParameterDoubleMatrix( valueType ) )
00024   {
00025     sciprint("Incompatible type for property triangles.\n") ;
00026     return SET_PROPERTY_ERROR ;
00027   }
00028 
00029   if (sciGetEntityType (pobj) != SCI_FEC )
00030   {
00031     sciprint("triangles property does not exist for this handle.\n") ;
00032     return SET_PROPERTY_ERROR ;
00033   }
00034 
00035   if ( nbCol != 5 )
00036   {
00037     sciprint("Second argument must have 5 columns.\n") ;
00038     return SET_PROPERTY_ERROR ;
00039   }
00040 
00041   
00042   
00043   if ( nbRow != pFEC_FEATURE (pobj)->Ntr )
00044   {
00045     /* need to realocate */
00046     double * pnoeud ;
00047 
00048     pnoeud = createCopyDoubleVectorFromStack( stackPointer, nbRow * 5 ) ;
00049 
00050     if ( pnoeud == NULL )
00051     {
00052       sciprint( "Unable to allocate new triangle list, memory full.\n" ) ;
00053       return SET_PROPERTY_ERROR ;
00054     }
00055 
00056     /* allocation ok we can change the pnoeud */
00057     FREE( pFEC_FEATURE(pobj)->pnoeud ) ;
00058     
00059     pFEC_FEATURE(pobj)->pnoeud = pnoeud;
00060 
00061   }
00062   else
00063   {
00064     copyDoubleVectorFromStack( stackPointer, pFEC_FEATURE(pobj)->pnoeud, nbRow * 5 ) ;
00065   }
00066 
00067   return SET_PROPERTY_SUCCEED ;
00068 
00069 }

Here is the call graph for this function:

int set_user_data_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 19 of file set_user_data_property.c.

References createIntArrayCopy(), FREE, GetData(), GetDataSize(), intArrayCopy(), NULL, sciGetPointerToUserData(), sciprint(), SET_PROPERTY_ERROR, and SET_PROPERTY_SUCCEED.

00020 {
00021 
00022   /* set pobj->user_data*/
00023   int *  size_ptr                             ;
00024   int ** user_data_ptr                        ;
00025   int    data_size     = GetDataSize( 3 ) * 2 ; /* why 2 ?????? Jb.Silvy */
00026   int *  data_ptr      = GetData( 3 )         ;
00027 
00028   /* no type check here user_data can be anything */
00029 
00030   /* retrieve current user data matrix */
00031   sciGetPointerToUserData( pobj, &user_data_ptr, &size_ptr ) ;
00032 
00033   if ( nbRow * nbCol == 0 )
00034   {
00035     FREE( *user_data_ptr ) ;
00036     *user_data_ptr = NULL ;
00037     *size_ptr = 0 ;
00038     return SET_PROPERTY_SUCCEED ;
00039   }
00040 
00041   if( user_data_ptr == NULL )
00042   {
00043     *user_data_ptr = createIntArrayCopy( data_ptr, data_size ) ;
00044     *size_ptr      = data_size ;
00045   }
00046   else if( *size_ptr == data_size )
00047   {
00048     intArrayCopy( *user_data_ptr, data_ptr, data_size ) ;
00049   }
00050   else
00051   {
00052     FREE( *user_data_ptr ) ;
00053     *user_data_ptr = createIntArrayCopy( data_ptr, data_size ) ;
00054     *size_ptr      = data_size ;
00055   }
00056 
00057   if ( *user_data_ptr == NULL )
00058   {
00059     sciprint("Error allocating user data, memory full.\n") ;
00060     *size_ptr = 0 ;
00061     return SET_PROPERTY_ERROR ;
00062   }
00063 
00064   return SET_PROPERTY_SUCCEED ;
00065 
00066   /*if ( isParameterDoubleMatrix( 3 ) )
00067   { 
00068     GetRhsVar(3,"d",&numrow3,&numcol3,&l3);
00069     if (numrow3==0||numcol3==0) delete_user_data=1;
00070   }
00071   else if (VarType(3) == 0) delete_user_data=1;
00072 
00073   sciGetPointerToUserData (pobj,&user_data_ptr, &size_ptr);*/
00074 
00075 }

Here is the call graph for this function:

int set_view_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 19 of file set_view_property.c.

References FALSE, isParameterStringMatrix(), isStringParamEqual(), SCI_SUBWIN, sciGetEntityType(), sciprint(), sciSetIs3d(), SET_PROPERTY_ERROR, and TRUE.

00020 {
00021 
00022   if ( !isParameterStringMatrix( valueType ) )
00023   {
00024     sciprint("Incompatible type for property view.\n") ;
00025     return SET_PROPERTY_ERROR ;
00026   }
00027 
00028   /* DJ.A 2003 */
00029   if (sciGetEntityType (pobj) != SCI_SUBWIN)
00030   {
00031     sciprint("view property does not exist for this handle.\n");
00032     return  SET_PROPERTY_ERROR ;
00033   }
00034 
00035   if ( isStringParamEqual( stackPointer, "2d" ) )
00036   { 
00037     return sciSetIs3d( pobj, FALSE ) ;
00038   }
00039   else if ( isStringParamEqual( stackPointer, "3d" ) )
00040   {
00041     return sciSetIs3d( pobj, TRUE ) ;
00042   }
00043   else
00044   {
00045     sciprint("Second argument must be '2d' or '3d'.\n") ;
00046     return SET_PROPERTY_ERROR ;
00047   }
00048   return SET_PROPERTY_ERROR ;
00049 }

Here is the call graph for this function:

int set_viewport_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_viewport_property.c.

References FALSE, getDoubleMatrixFromStack(), isParameterDoubleMatrix(), SCI_FIGURE, sciGetEntityType(), sciprint(), sciSetFinalStatus(), sciSetResize(), sciSetViewport(), and SET_PROPERTY_ERROR.

00018 {
00019   int status1 ;
00020   int status2 ;
00021   double * values = getDoubleMatrixFromStack( stackPointer ) ;
00022 
00023   if ( !isParameterDoubleMatrix( valueType ) )
00024   {
00025     sciprint("Incompatible type for property viewport.\n") ;
00026     return SET_PROPERTY_ERROR ;
00027   }
00028 
00029   if ( sciGetEntityType(pobj) != SCI_FIGURE )
00030   {
00031     sciprint("viewport does not exist for this handle.\n") ;
00032     return SET_PROPERTY_ERROR ;
00033   }
00034 
00035   if ( nbRow * nbCol != 2 )
00036   {
00037     sciprint("Argument must be a vector of size 2.\n");
00038     return SET_PROPERTY_ERROR ;
00039   }
00040 
00041   /* force auto_resize. With auto_resize disable, resize does not work */
00042   status1 = sciSetResize( pobj, FALSE ) ;
00043   status2 = sciSetViewport( pobj, (int)values[0], (int)values[1]  ) ;
00044 
00045   return sciSetFinalStatus( (SetPropertyStatus)status1, (SetPropertyStatus)status2 ) ;
00046 }

Here is the call graph for this function:

int set_visible_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 16 of file set_visible_property.c.

References FALSE, getStringFromStack(), isParameterStringMatrix(), isStringParamEqual(), sciprint(), sciSetVisibility(), SET_PROPERTY_ERROR, and TRUE.

00017 {
00018   getStringFromStack( stackPointer ) ;
00019 
00020   if ( !isParameterStringMatrix( valueType ) )
00021   {
00022     sciprint("Incompatible type for property visible.\n") ;
00023     return SET_PROPERTY_ERROR ;
00024   }
00025 
00026   if ( isStringParamEqual( stackPointer, "on" ) )
00027   {
00028     return sciSetVisibility( pobj, TRUE ) ;
00029   }
00030   else if ( isStringParamEqual( stackPointer, "off" ) )
00031   {
00032     return sciSetVisibility( pobj, FALSE ) ;
00033   }
00034   else
00035   {
00036     sciprint("Value must be 'on' or 'off'.\n") ;
00037     return SET_PROPERTY_ERROR ;
00038   }
00039 }

Here is the call graph for this function:

int set_x_label_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_x_label_property.c.

References SCI_SUBWIN, sciGetEntityType(), sciprint(), and SET_PROPERTY_ERROR.

00018 {
00019   if ( sciGetEntityType(pobj) != SCI_SUBWIN )
00020   {
00021     sciprint("x_label property undefined for this object.\n") ;
00022     return SET_PROPERTY_ERROR ;
00023   }
00024   else
00025   {
00026     sciprint("can not set directly a label object.\n") ;
00027     return SET_PROPERTY_ERROR ;
00028   }
00029   return SET_PROPERTY_ERROR ;
00030 }

Here is the call graph for this function:

int set_x_location_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_x_location_property.c.

References isParameterStringMatrix(), isStringParamEqual(), pSUBWIN_FEATURE, SCI_SUBWIN, sciGetEntityType(), sciprint(), and SET_PROPERTY_ERROR.

00018 {
00019   
00020   if ( !isParameterStringMatrix( valueType ) )
00021   {
00022     sciprint("Incompatible type for property x_location.\n") ;
00023     return SET_PROPERTY_ERROR ;
00024   }
00025 
00026   if ( sciGetEntityType(pobj) != SCI_SUBWIN )
00027   {
00028     sciprint("x_location property does not exist for this handle.\n") ;
00029     return SET_PROPERTY_ERROR ;
00030   }
00031 
00032   if ( isStringParamEqual( stackPointer, "top" ) )
00033   {
00034     pSUBWIN_FEATURE(pobj)->axes.xdir = 'u' ;
00035   }
00036   else if ( isStringParamEqual( stackPointer, "bottom" ) )
00037   {
00038     pSUBWIN_FEATURE(pobj)->axes.xdir = 'd' ;
00039   }
00040   else if ( isStringParamEqual( stackPointer, "middle" ) )
00041   {
00042     pSUBWIN_FEATURE(pobj)->axes.xdir = 'c' ;
00043   }
00044   else  
00045   {
00046     sciprint("Second argument must be 'top', 'bottom' or 'middle'.\n") ;
00047     return SET_PROPERTY_ERROR ;
00048   }
00049   return SET_PROPERTY_ERROR ;
00050 }

Here is the call graph for this function:

int set_x_shift_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 18 of file set_x_shift_property.c.

References createCopyDoubleVectorFromStack(), FREE, isParameterDoubleMatrix(), n1, NULL, pPOLYLINE_FEATURE, SCI_POLYLINE, sciGetEntityType(), sciprint(), SET_PROPERTY_ERROR, and SET_PROPERTY_SUCCEED.

00019 {
00020 
00021   int nbElement = nbRow * nbCol ;
00022 
00023   if ( !isParameterDoubleMatrix( valueType ) )
00024   {
00025     sciprint("Incompatible type for property x_shift.\n") ;
00026     return SET_PROPERTY_ERROR ;
00027   }
00028 
00029   if ( sciGetEntityType(pobj) != SCI_POLYLINE )
00030   {
00031     sciprint( "This handle has no x_shift property.\n" ) ;
00032     return SET_PROPERTY_ERROR ;
00033   }
00034 
00035   if ( nbRow > 1 && nbCol > 1 )
00036   {
00037     sciprint( "Bad input, x_shift should be a row or column vector.\n" ) ;
00038     return SET_PROPERTY_ERROR ;
00039   }
00040 
00041   if ( nbElement != 0 && nbElement != pPOLYLINE_FEATURE (pobj)->n1 ) /* we can specify [] (null vector) to reset to default */
00042   {
00043     sciprint("Wrong size for input vector.\n");
00044     return SET_PROPERTY_ERROR ;
00045   }
00046 
00047   FREE( pPOLYLINE_FEATURE(pobj)->x_shift ) ;
00048   pPOLYLINE_FEATURE(pobj)->x_shift = NULL;
00049 
00050   if( nbElement != 0 )
00051   {
00052     pPOLYLINE_FEATURE(pobj)->x_shift = createCopyDoubleVectorFromStack( stackPointer, nbElement ) ;
00053 
00054     if ( pPOLYLINE_FEATURE (pobj)->x_shift == NULL )
00055     {
00056       sciprint("No memory left for allocating temporary tics_coord.\n") ;
00057       return SET_PROPERTY_ERROR ;
00058     }
00059   }
00060   return SET_PROPERTY_SUCCEED ;
00061 }

Here is the call graph for this function:

int set_x_ticks_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 21 of file set_x_ticks_property.c.

References AXES::auto_ticks, sciSubWindow::axes, ComputeNbSubTics(), createCopyDoubleMatrixFromList(), createCopyStringMatrixFromList(), createTlistForTicks(), destroyAssignedList(), destroyStringArray(), FALSE, FREE, i, isParameterTlist(), sciSubWindow::logflags, AXES::nbsubtics, NULL, pSUBWIN_FEATURE, SCI_SUBWIN, sciGetEntityType(), sciprint(), SET_PROPERTY_ERROR, SET_PROPERTY_SUCCEED, AXES::u_nxgrads, AXES::u_xgrads, and AXES::u_xlabels.

00022 {
00023   AssignedList * tlist     = NULL ;
00024   sciSubWindow * ppSubWin  = NULL ;
00025   int            nbTicsRow = 0    ;
00026   int            nbTicsCol = 0    ;
00027 
00028   if ( !isParameterTlist( valueType ) )
00029   {
00030     sciprint("Incompatible type for property x_ticks.\n") ;
00031     return SET_PROPERTY_ERROR ;
00032   }
00033 
00034   if ( sciGetEntityType(pobj) != SCI_SUBWIN )
00035   {
00036     sciprint( "x_ticks property does not exists for this handle.\n" ) ;
00037     return SET_PROPERTY_ERROR ;
00038   }
00039 
00040   ppSubWin = pSUBWIN_FEATURE(pobj) ;
00041 
00042   tlist = createTlistForTicks() ;
00043 
00044   if ( tlist == NULL )
00045   {
00046     return SET_PROPERTY_ERROR ;
00047   }
00048 
00049   /* locations */
00050   FREE( ppSubWin->axes.u_xgrads ) ;
00051   ppSubWin->axes.u_xgrads = NULL ;
00052 
00053   destroyStringArray( ppSubWin->axes.u_xlabels, ppSubWin->axes.u_nxgrads ) ;
00054   ppSubWin->axes.u_xlabels = NULL ;
00055 
00056   ppSubWin->axes.u_nxgrads = 0 ;
00057 
00058   ppSubWin->axes.u_xgrads = createCopyDoubleMatrixFromList( tlist, &nbTicsRow, &nbTicsCol ) ;
00059 
00060   if ( ppSubWin->axes.u_xgrads == NULL )
00061   {
00062     if ( nbTicsRow == -1 )
00063     {
00064       sciprint("Unable to assigned tics, memory full.\n") ;
00065       return SET_PROPERTY_ERROR ;
00066     }
00067     /* empty matrix nothing to do*/
00068     return SET_PROPERTY_SUCCEED ;
00069   }
00070 
00071   if ( ppSubWin->logflags[0] == 'l' )
00072   {
00073     int  i ;
00074     for ( i = 0 ; i < nbTicsCol * nbTicsCol ; i++ )
00075     {
00076       ppSubWin->axes.u_xgrads[i] = log10( ppSubWin->axes.u_xgrads[i] ) ;
00077     }
00078   }
00079   else
00080   {
00081      /* Nb of subtics computation and storage */ /* F.Leray 07.10.04 */
00082     ppSubWin->axes.nbsubtics[0] = ComputeNbSubTics( pobj,ppSubWin->axes.u_nxgrads,'n',NULL,ppSubWin->axes.nbsubtics[0] ) ;
00083   }
00084 
00085   /*  labels */
00086 
00087   ppSubWin->axes.u_xlabels = createCopyStringMatrixFromList( tlist, &nbTicsRow, &nbTicsCol ) ;
00088 
00089   ppSubWin->axes.u_nxgrads = nbTicsRow * nbTicsCol ;
00090   ppSubWin->axes.auto_ticks[0] = FALSE ;
00091 
00092   destroyAssignedList( tlist ) ;
00093 
00094   return SET_PROPERTY_SUCCEED ;
00095 
00096 }

Here is the call graph for this function:

int set_xtics_coord_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 20 of file set_xtics_coord_property.c.

References ComputeC_format(), ComputeXIntervals(), copyFormatedArray(), createCopyDoubleVectorFromStack(), destroyStringArray(), FREE, isParameterDoubleMatrix(), N, NULL, pAXES_FEATURE, SCI_AXES, sciGetEntityType(), sciprint(), SET_PROPERTY_ERROR, SET_PROPERTY_SUCCEED, and str.

00021 {
00022 
00023   int N = 0;
00024   double * vector = NULL;
00025   char c_format[5];
00026 
00027   if ( !isParameterDoubleMatrix( valueType ) )
00028   {
00029     sciprint("Incompatible type for property xtics_coord.\n") ;
00030     return SET_PROPERTY_ERROR ;
00031   }
00032 
00033   if ( sciGetEntityType(pobj) != SCI_AXES )
00034   {
00035     sciprint( "xtics_coord does not exist for this handle.\n" ) ;
00036     return SET_PROPERTY_ERROR ;
00037   }
00038 
00039   if ( nbRow != 1 )
00040   {
00041     sciprint( "Second argument must be a row vector.\n" ) ;
00042     return SET_PROPERTY_ERROR ;
00043   }
00044 
00045   if ( pAXES_FEATURE(pobj)->nx == 1 && nbCol != 1 )
00046   {
00047     sciprint("Second argument must be a scalar.\n") ;
00048     return SET_PROPERTY_ERROR ;
00049   }
00050 
00051   if (  pAXES_FEATURE(pobj)->nx != 1 && nbCol == 1 )
00052   {
00053     sciprint( "Second argument  must be a vector.\n" ) ;
00054     return SET_PROPERTY_ERROR ;
00055   }
00056 
00057   /* what follows remains here as it was */
00058 
00059   pAXES_FEATURE(pobj)->nx = nbCol ;
00060 
00061   FREE(pAXES_FEATURE(pobj)->vx); pAXES_FEATURE(pobj)->vx = NULL;
00062 
00063   pAXES_FEATURE(pobj)->vx = createCopyDoubleVectorFromStack( stackPointer, nbCol ) ;
00064 
00065 
00066   ComputeXIntervals( pobj, pAXES_FEATURE(pobj)->tics, &vector, &N, 0 ) ;
00067   ComputeC_format( pobj, c_format ) ;
00068 
00069   if( pAXES_FEATURE(pobj)->str != NULL )
00070   {
00071     destroyStringArray( pAXES_FEATURE(pobj)->str, pAXES_FEATURE(pobj)->nb_tics_labels ) ;
00072   }
00073 
00074   pAXES_FEATURE (pobj)->nb_tics_labels = N;
00075   pAXES_FEATURE(pobj)->str = copyFormatedArray( vector, N, c_format, 256 ) ;
00076 
00077 
00078   FREE( vector ) ;
00079 
00080   if ( pAXES_FEATURE(pobj)->str == NULL )
00081   {
00082     sciprint( "error allocating vector.\n");
00083     return SET_PROPERTY_ERROR ;
00084   }
00085 
00086   return SET_PROPERTY_SUCCEED ;
00087 
00088 }

Here is the call graph for this function:

int set_y_label_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_y_label_property.c.

References SCI_SUBWIN, sciGetEntityType(), sciprint(), and SET_PROPERTY_ERROR.

00018 {
00019 
00020   if ( sciGetEntityType(pobj) != SCI_SUBWIN )
00021   {
00022     sciprint("y_label property undefined for this object.\n") ;
00023     return SET_PROPERTY_ERROR ;
00024   }
00025   else
00026   {
00027     sciprint("can not set directly a label object.\n") ;
00028     return SET_PROPERTY_ERROR ;
00029   }
00030   return SET_PROPERTY_ERROR ;
00031 }

Here is the call graph for this function:

int set_y_location_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_y_location_property.c.

References isParameterStringMatrix(), isStringParamEqual(), pSUBWIN_FEATURE, SCI_SUBWIN, sciGetEntityType(), sciprint(), and SET_PROPERTY_ERROR.

00018 {
00019 
00020   if ( !isParameterStringMatrix( valueType ) )
00021   {
00022     sciprint("Incompatible type for property y_location.\n") ;
00023     return SET_PROPERTY_ERROR ;
00024   }
00025 
00026   if ( sciGetEntityType(pobj) != SCI_SUBWIN )
00027   {
00028     sciprint("y_location property does not exist for this handle.\n") ;
00029     return SET_PROPERTY_ERROR ;
00030   }
00031 
00032   if ( isStringParamEqual( stackPointer, "left" ) )
00033   {
00034     pSUBWIN_FEATURE(pobj)->axes.ydir = 'l' ;
00035   }
00036   else if ( isStringParamEqual( stackPointer, "right" ) )
00037   {
00038     pSUBWIN_FEATURE(pobj)->axes.ydir = 'r' ;
00039   }
00040   else if ( isStringParamEqual( stackPointer, "middle" ) )
00041   {
00042     pSUBWIN_FEATURE(pobj)->axes.ydir = 'c' ;
00043   }
00044   else  
00045   {
00046     sciprint("Second argument must be 'left', 'right' or 'middle'.\n") ;
00047     return SET_PROPERTY_ERROR ;
00048   }
00049   return SET_PROPERTY_ERROR ;
00050 }

Here is the call graph for this function:

int set_y_shift_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 18 of file set_y_shift_property.c.

References createCopyDoubleVectorFromStack(), FREE, isParameterDoubleMatrix(), n1, NULL, pPOLYLINE_FEATURE, SCI_POLYLINE, sciGetEntityType(), sciprint(), SET_PROPERTY_ERROR, and SET_PROPERTY_SUCCEED.

00019 {
00020 
00021   int nbElement = nbRow * nbCol ;
00022 
00023   if ( !isParameterDoubleMatrix( valueType ) )
00024   {
00025     sciprint("Incompatible type for property y_shift.\n") ;
00026     return SET_PROPERTY_ERROR ;
00027   }
00028 
00029   if ( sciGetEntityType(pobj) != SCI_POLYLINE )
00030   {
00031     sciprint( "This handle has no y_shift property.\n" ) ;
00032     return SET_PROPERTY_ERROR ;
00033   }
00034 
00035   if ( nbRow > 1 && nbCol > 1 )
00036   {
00037     sciprint( "Bad input, y_shift should be a row or column vector.\n" ) ;
00038     return SET_PROPERTY_ERROR ;
00039   }
00040 
00041   if ( nbElement != 0 && nbElement != pPOLYLINE_FEATURE (pobj)->n1 ) /* we can specify [] (null vector) to reset to default */
00042   {
00043     sciprint("Wrong size for input vector.\n");
00044     return SET_PROPERTY_ERROR ;
00045   }
00046 
00047   FREE( pPOLYLINE_FEATURE(pobj)->y_shift ) ;
00048   pPOLYLINE_FEATURE(pobj)->y_shift = NULL;
00049 
00050   if( nbElement != 0 )
00051   {
00052     pPOLYLINE_FEATURE(pobj)->y_shift = createCopyDoubleVectorFromStack( stackPointer, nbElement ) ;
00053 
00054     if ( pPOLYLINE_FEATURE (pobj)->y_shift == NULL )
00055     {
00056       sciprint("No memory left for allocating temporary tics_coord.\n") ;
00057       return SET_PROPERTY_ERROR ;
00058     }
00059   }
00060   return SET_PROPERTY_SUCCEED ;
00061 }

Here is the call graph for this function:

int set_y_ticks_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 21 of file set_y_ticks_property.c.

References AXES::auto_ticks, sciSubWindow::axes, ComputeNbSubTics(), createCopyDoubleMatrixFromList(), createCopyStringMatrixFromList(), createTlistForTicks(), destroyAssignedList(), destroyStringArray(), FALSE, FREE, i, isParameterTlist(), sciSubWindow::logflags, AXES::nbsubtics, NULL, pSUBWIN_FEATURE, SCI_SUBWIN, sciGetEntityType(), sciprint(), SET_PROPERTY_ERROR, SET_PROPERTY_SUCCEED, AXES::u_nygrads, AXES::u_ygrads, and AXES::u_ylabels.

00022 {
00023   AssignedList * tlist     = NULL ;
00024   sciSubWindow * ppSubWin  = NULL ;
00025   int            nbTicsRow = 0    ;
00026   int            nbTicsCol = 0    ;
00027 
00028   if ( !isParameterTlist( valueType ) )
00029   {
00030     sciprint("Incompatible type for property y_ticks.\n") ;
00031     return SET_PROPERTY_ERROR ;
00032   }
00033 
00034   if ( sciGetEntityType(pobj) != SCI_SUBWIN )
00035   {
00036     sciprint( "y_ticks property does not exists for this handle.\n" ) ;
00037     return SET_PROPERTY_ERROR ;
00038   }
00039 
00040   ppSubWin = pSUBWIN_FEATURE(pobj) ;
00041 
00042   tlist = createTlistForTicks() ;
00043 
00044   if ( tlist == NULL )
00045   {
00046     return SET_PROPERTY_ERROR ;
00047   }
00048 
00049   /* locations */
00050   FREE( ppSubWin->axes.u_ygrads ) ;
00051   ppSubWin->axes.u_ygrads = NULL ;
00052 
00053   destroyStringArray( ppSubWin->axes.u_ylabels, ppSubWin->axes.u_nygrads ) ;
00054   ppSubWin->axes.u_ylabels = NULL ;
00055 
00056   ppSubWin->axes.u_nygrads = 0 ;
00057 
00058   ppSubWin->axes.u_ygrads = createCopyDoubleMatrixFromList( tlist, &nbTicsRow, &nbTicsCol ) ;
00059 
00060   if ( ppSubWin->axes.u_ygrads == NULL )
00061   {
00062     if ( nbTicsRow == -1 )
00063     {
00064       sciprint("Unable to assigned tics, memory full.\n") ;
00065       return SET_PROPERTY_ERROR ;
00066     }
00067     /* empty matrix nothing to do*/
00068     return SET_PROPERTY_SUCCEED ;
00069   }
00070 
00071   if ( ppSubWin->logflags[1] == 'l' )
00072   {
00073     int  i ;
00074     for ( i = 0 ; i < nbTicsRow * nbTicsCol ; i++ )
00075     {
00076       ppSubWin->axes.u_ygrads[i] = log10( ppSubWin->axes.u_ygrads[i] ) ;
00077     }
00078   }
00079   else
00080   {
00081     /* Nb of subtics computation and storage */ /* F.Leray 07.10.04 */
00082     ppSubWin->axes.nbsubtics[1] = ComputeNbSubTics( pobj,ppSubWin->axes.u_nygrads,'n',NULL,ppSubWin->axes.nbsubtics[1] ) ;
00083   }
00084 
00085   /*  labels */
00086   ppSubWin->axes.u_ylabels = createCopyStringMatrixFromList( tlist, &nbTicsRow, &nbTicsCol ) ;
00087 
00088   ppSubWin->axes.u_nygrads = nbTicsRow * nbTicsCol ;
00089   ppSubWin->axes.auto_ticks[1] = FALSE ;
00090 
00091   destroyAssignedList( tlist ) ;
00092 
00093   return SET_PROPERTY_SUCCEED ;
00094 
00095 }

Here is the call graph for this function:

int set_ytics_coord_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 20 of file set_yticks_coord_property.c.

References ComputeC_format(), ComputeXIntervals(), copyFormatedArray(), createCopyDoubleVectorFromStack(), destroyStringArray(), FREE, N, NULL, pAXES_FEATURE, SCI_AXES, sciGetEntityType(), sciprint(), SET_PROPERTY_ERROR, SET_PROPERTY_SUCCEED, and str.

00021 {
00022 
00023   int N = 0;
00024   double * vector = NULL;
00025   char c_format[5];
00026 
00027   if ( sciGetEntityType(pobj) != SCI_AXES )
00028   {
00029     sciprint( "ytics_coord does not exist for this handle.\n" ) ;
00030     return SET_PROPERTY_ERROR ;
00031   }
00032 
00033   if ( nbRow != 1 )
00034   {
00035     sciprint( "Second argument must be a row vector.\n" ) ;
00036     return SET_PROPERTY_ERROR ;
00037   }
00038 
00039   if ( pAXES_FEATURE(pobj)->ny == 1 && nbCol != 1 )
00040   {
00041     sciprint("Second argument must be a scalar.\n") ;
00042     return SET_PROPERTY_ERROR ;
00043   }
00044 
00045   if (  pAXES_FEATURE(pobj)->ny != 1 && nbCol == 1 )
00046   {
00047     sciprint( "Second argument  must be a vector.\n" ) ;
00048     return SET_PROPERTY_ERROR ;
00049   }
00050 
00051   /* what follows remains here as it was */
00052 
00053   FREE(pAXES_FEATURE(pobj)->vy); pAXES_FEATURE(pobj)->vy = NULL;
00054 
00055   pAXES_FEATURE(pobj)->vy = createCopyDoubleVectorFromStack( stackPointer, nbCol ) ;
00056 
00057 
00058   ComputeXIntervals( pobj, pAXES_FEATURE(pobj)->tics, &vector, &N, 0 ) ;
00059   ComputeC_format( pobj, c_format ) ;
00060 
00061   if( pAXES_FEATURE(pobj)->str != NULL )
00062   {
00063     destroyStringArray( pAXES_FEATURE(pobj)->str, pAXES_FEATURE(pobj)->nb_tics_labels ) ;
00064   }
00065 
00066   pAXES_FEATURE (pobj)->nb_tics_labels = N;
00067   pAXES_FEATURE(pobj)->str = copyFormatedArray( vector, N, c_format, 256 ) ;
00068 
00069 
00070   FREE( vector ) ;
00071 
00072   if ( pAXES_FEATURE(pobj)->str == NULL )
00073   {
00074     sciprint( "error allocating vector.\n");
00075     return SET_PROPERTY_ERROR ;
00076   }
00077 
00078   return SET_PROPERTY_SUCCEED ;
00079 
00080 }

Here is the call graph for this function:

int set_z_bounds_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 20 of file set_z_bounds_property.c.

References getDoubleMatrixFromStack(), isParameterDoubleMatrix(), pFEC_FEATURE, SCI_FEC, sciGetEntityType(), sciprint(), SET_PROPERTY_ERROR, and SET_PROPERTY_SUCCEED.

00021 {
00022   double * values = getDoubleMatrixFromStack( stackPointer ) ;
00023 
00024   if ( !isParameterDoubleMatrix( valueType ) )
00025   {
00026     sciprint("Incompatible type for property z_bounds.\n") ;
00027     return SET_PROPERTY_ERROR ;
00028   }
00029 
00030   if ( sciGetEntityType(pobj) != SCI_FEC )
00031   {
00032     sciprint("z_bounds property does not exist for this handle.\n") ;
00033     return SET_PROPERTY_ERROR ;
00034   }
00035 
00036   if ( nbRow * nbCol != 2 )
00037   {
00038     sciprint("Second argument must have 2 elements.\n") ;
00039     return SET_PROPERTY_ERROR ;
00040   }
00041 
00042   pFEC_FEATURE (pobj)->zminmax[0] = values[0] ;
00043   pFEC_FEATURE (pobj)->zminmax[1] = values[1] ;
00044 
00045   return SET_PROPERTY_SUCCEED ;
00046 }

Here is the call graph for this function:

int set_z_label_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 17 of file set_z_label_property.c.

References SCI_SUBWIN, sciGetEntityType(), sciprint(), and SET_PROPERTY_ERROR.

00018 {
00019   if ( sciGetEntityType(pobj) != SCI_SUBWIN )
00020   {
00021     sciprint("z_label property undefined for this object.\n") ;
00022     return SET_PROPERTY_ERROR ;
00023   }
00024   else
00025   {
00026     sciprint("can not set directly a label object.\n") ;
00027     return SET_PROPERTY_ERROR ;
00028   }
00029   return SET_PROPERTY_ERROR ;
00030 }

Here is the call graph for this function:

int set_z_shift_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 18 of file set_z_shift_property.c.

References createCopyDoubleVectorFromStack(), FREE, isParameterDoubleMatrix(), n1, NULL, pPOLYLINE_FEATURE, SCI_POLYLINE, sciGetEntityType(), sciprint(), SET_PROPERTY_ERROR, and SET_PROPERTY_SUCCEED.

00019 {
00020 
00021   int nbElement = nbRow * nbCol ;
00022 
00023   if ( !isParameterDoubleMatrix( valueType ) )
00024   {
00025     sciprint("Incompatible type for property z_shift.\n") ;
00026     return SET_PROPERTY_ERROR ;
00027   }
00028 
00029   if ( sciGetEntityType(pobj) != SCI_POLYLINE )
00030   {
00031     sciprint( "This handle has no z_shift property.\n" ) ;
00032     return SET_PROPERTY_ERROR ;
00033   }
00034 
00035   if ( nbRow > 1 && nbCol > 1 )
00036   {
00037     sciprint( "Bad input, z_shift should be a row or column vector.\n" ) ;
00038     return SET_PROPERTY_ERROR ;
00039   }
00040 
00041   if ( nbElement != 0 && nbElement != pPOLYLINE_FEATURE (pobj)->n1 ) /* we can specify [] (null vector) to reset to default */
00042   {
00043     sciprint("Wrong size for input vector.\n");
00044     return SET_PROPERTY_ERROR ;
00045   }
00046 
00047   FREE( pPOLYLINE_FEATURE (pobj)->z_shift ) ;
00048   pPOLYLINE_FEATURE(pobj)->z_shift = NULL;
00049 
00050   if( nbElement != 0 )
00051   {
00052     pPOLYLINE_FEATURE(pobj)->y_shift = createCopyDoubleVectorFromStack( stackPointer, nbElement ) ;
00053 
00054     if ( pPOLYLINE_FEATURE (pobj)->y_shift == NULL )
00055     {
00056       sciprint("No memory left for allocating temporary tics_coord.\n") ;
00057       return SET_PROPERTY_ERROR ;
00058     }
00059   }
00060   return SET_PROPERTY_SUCCEED ;
00061 }

Here is the call graph for this function:

int set_z_ticks_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 21 of file set_z_ticks_property.c.

References AXES::auto_ticks, sciSubWindow::axes, ComputeNbSubTics(), createCopyDoubleMatrixFromList(), createCopyStringMatrixFromList(), createTlistForTicks(), destroyAssignedList(), destroyStringArray(), FALSE, FREE, i, isParameterTlist(), sciSubWindow::logflags, AXES::nbsubtics, NULL, pSUBWIN_FEATURE, SCI_SUBWIN, sciGetEntityType(), sciprint(), SET_PROPERTY_ERROR, SET_PROPERTY_SUCCEED, AXES::u_nzgrads, AXES::u_zgrads, and AXES::u_zlabels.

00022 {
00023   AssignedList * tlist     = NULL ;
00024   sciSubWindow * ppSubWin  = NULL ;
00025   int            nbTicsRow = 0    ;
00026   int            nbTicsCol = 0    ;
00027 
00028   if ( !isParameterTlist( valueType ) )
00029   {
00030     sciprint("Incompatible type for property z_ticks.\n") ;
00031     return SET_PROPERTY_ERROR ;
00032   }
00033 
00034   if ( sciGetEntityType(pobj) != SCI_SUBWIN )
00035   {
00036     sciprint( "z_ticks property does not exists for this handle.\n" ) ;
00037     return SET_PROPERTY_ERROR ;
00038   }
00039 
00040   ppSubWin = pSUBWIN_FEATURE(pobj) ;
00041 
00042   tlist = createTlistForTicks() ;
00043 
00044   if ( tlist == NULL )
00045   {
00046     return SET_PROPERTY_ERROR ;
00047   }
00048 
00049   /* locations */
00050   FREE( ppSubWin->axes.u_zgrads ) ;
00051   ppSubWin->axes.u_zgrads = NULL ;
00052 
00053   destroyStringArray( ppSubWin->axes.u_zlabels, ppSubWin->axes.u_nzgrads ) ;
00054   ppSubWin->axes.u_zlabels = NULL ;
00055 
00056   ppSubWin->axes.u_nzgrads = 0 ;
00057 
00058   ppSubWin->axes.u_zgrads = createCopyDoubleMatrixFromList( tlist, &nbTicsRow, &nbTicsCol ) ;
00059 
00060   if ( ppSubWin->axes.u_zgrads == NULL )
00061   {
00062     if ( nbTicsRow == -1 )
00063     {
00064       sciprint("Unable to assigned tics, memory full.\n") ;
00065       return SET_PROPERTY_ERROR ;
00066     }
00067     /* empty matrix nothing to do*/
00068     return SET_PROPERTY_SUCCEED ;
00069   }
00070 
00071   if ( ppSubWin->logflags[2] == 'l' )
00072   {
00073     int  i ;
00074     for ( i = 0 ; i < nbTicsCol * nbTicsCol ; i++ )
00075     {
00076       ppSubWin->axes.u_zgrads[i] = log10( ppSubWin->axes.u_zgrads[i] ) ;
00077     }
00078   }
00079   else
00080   {
00081     /* Nb of subtics computation and storage */ /* F.Leray 07.10.04 */
00082     ppSubWin->axes.nbsubtics[2] = ComputeNbSubTics( pobj,ppSubWin->axes.u_nzgrads,'n',NULL,ppSubWin->axes.nbsubtics[2] ) ;
00083   }
00084 
00085   /*  labels */
00086 
00087   ppSubWin->axes.u_zlabels = createCopyStringMatrixFromList( tlist, &nbTicsRow, &nbTicsCol ) ;
00088 
00089   ppSubWin->axes.u_nzgrads = nbTicsRow * nbTicsCol ;
00090   ppSubWin->axes.auto_ticks[2] = FALSE ;
00091 
00092   destroyAssignedList( tlist ) ;
00093 
00094   return SET_PROPERTY_SUCCEED ;
00095 
00096 }

Here is the call graph for this function:

int set_zoom_box_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 18 of file set_zoom_box_property.c.

References getDoubleMatrixFromStack(), isParameterDoubleMatrix(), SCI_SUBWIN, sciGetEntityType(), sciprint(), scizoom(), SET_PROPERTY_ERROR, and unzoom().

00019 {
00020 
00021   if ( !isParameterDoubleMatrix( valueType ) )
00022   {
00023     sciprint("Incompatible type for property zoom_box.\n") ;
00024     return SET_PROPERTY_ERROR ;
00025   }
00026 
00027   if ( sciGetEntityType(pobj) != SCI_SUBWIN )
00028   {
00029     sciprint( "zoom_box property does nor exist for this handle.\n" ) ;
00030     return SET_PROPERTY_ERROR ;
00031   }
00032 
00033   /* On doit avoir avoir une matrice 4x1 */
00034   if ( nbRow * nbCol == 4 )
00035   {
00036     scizoom( getDoubleMatrixFromStack( stackPointer ), pobj ) ;
00037   }
00038   else if ( nbCol * nbRow == 0 )
00039   {
00040     unzoom() ;
00041   }
00042   else
00043   {
00044     sciprint("Argument must be a vector of size 4.\n");
00045     return SET_PROPERTY_ERROR ;
00046   }
00047   return SET_PROPERTY_ERROR ;
00048 }

Here is the call graph for this function:

int set_zoom_state_property ( sciPointObj pobj,
int  stackPointer,
int  valueType,
int  nbRow,
int  nbCol 
)

Definition at line 18 of file set_zoom_state_property.c.

References FALSE, isParameterDoubleMatrix(), isStringParamEqual(), SCI_SUBWIN, sciGetEntityType(), sciGetZooming(), sciprint(), sciSetZooming(), SET_PROPERTY_ERROR, and unzoom().

00019 {
00020   
00021   if ( !isParameterDoubleMatrix( valueType ) )
00022   {
00023     sciprint("Incompatible type for property zoom_state.\n") ;
00024     return SET_PROPERTY_ERROR ;
00025   }
00026 
00027   if ( sciGetEntityType(pobj) != SCI_SUBWIN )
00028   {
00029     sciprint( "zoom_state property does not exist for this handle.\n" ) ;
00030     return SET_PROPERTY_ERROR ;
00031   }
00032 
00033   if ( isStringParamEqual( stackPointer, "on" ) )
00034   { 
00035     if ( ! sciGetZooming(pobj) )
00036     {
00037       sciprint("Object is already zoomed.\n") ;
00038       return SET_PROPERTY_ERROR ;
00039     }
00040     else
00041     {
00042       sciprint("set zoom box ( set('zoom_box',[xmin ymin xmax ymax])).\n") ;
00043       return SET_PROPERTY_ERROR ;
00044     }
00045   }
00046   else if ( isStringParamEqual( stackPointer, "off" ) ) 
00047   { 
00048     unzoom();
00049     return sciSetZooming( pobj, FALSE ) ;
00050   }
00051   else
00052   {
00053     sciprint("Value must be 'on/off'.\n") ;
00054     return SET_PROPERTY_ERROR ;
00055   }
00056   return SET_PROPERTY_ERROR ;
00057 }

Here is the call graph for this function:


Generated on Sun Mar 4 15:45:00 2007 for Scilab [trunk] by  doxygen 1.5.1