/*------------------------------------------------------------------------*/ void* get_mark_size_property(void* _pvCtx, int iObjUID) { int iMarkSize = 0; int* piMarkSize = &iMarkSize; int * markSizes = NULL; int numMarkSizes = 0; int * piNumMarkSizes = &numMarkSizes; getGraphicObjectProperty(iObjUID, __GO_NUM_MARK_SIZES__, jni_int, &piNumMarkSizes); if (numMarkSizes == 0) { getGraphicObjectProperty(iObjUID, __GO_MARK_SIZE__, jni_int, &piMarkSize); if (piMarkSize == NULL) { Scierror(999, _("'%s' property does not exist for this handle.\n"), "mark_size"); return NULL; } return sciReturnDouble(iMarkSize); } else { getGraphicObjectProperty(iObjUID, __GO_MARK_SIZES__, jni_int_vector, &markSizes); return sciReturnRowVectorFromInt(markSizes, numMarkSizes); } }
/*------------------------------------------------------------------------*/ void* get_mark_background_property(void* _pvCtx, int iObjUID) { int iMarkBackground = 0; int* piMarkBackground = &iMarkBackground; int * markBackgrounds = NULL; int numMarkBackgrounds = 0; int * piNumMarkBackgrounds = &numMarkBackgrounds; getGraphicObjectProperty(iObjUID, __GO_NUM_MARK_BACKGROUNDS__, jni_int, (void**)&piNumMarkBackgrounds); if (numMarkBackgrounds == 0) { getGraphicObjectProperty(iObjUID, __GO_MARK_BACKGROUND__, jni_int, &piMarkBackground); if (piMarkBackground == NULL) { Scierror(999, _("'%s' property does not exist for this handle.\n"), "mark_background"); return NULL; } return sciReturnDouble(iMarkBackground); } else { getGraphicObjectProperty(iObjUID, __GO_MARK_BACKGROUNDS__, jni_int_vector, &markBackgrounds); return sciReturnRowVectorFromInt(markBackgrounds, numMarkBackgrounds); } }
/*------------------------------------------------------------------------*/ int get_mark_background_property(void* _pvCtx, char* pobjUID) { int iMarkBackground = 0; int* piMarkBackground = &iMarkBackground; getGraphicObjectProperty(pobjUID, __GO_MARK_BACKGROUND__, jni_int, (void**)&piMarkBackground); if (piMarkBackground == NULL) { Scierror(999, _("'%s' property does not exist for this handle.\n"), "mark_background"); return -1; } return sciReturnDouble(_pvCtx, (double)iMarkBackground); }
/*------------------------------------------------------------------------*/ int get_bar_width_property(void* _pvCtx, char* pobjUID) { double dblBarWidth = 0.0; double *pdblBarWidth = &dblBarWidth; getGraphicObjectProperty(pobjUID, __GO_BAR_WIDTH__, jni_double, (void **)&pdblBarWidth); if (pdblBarWidth == NULL) { Scierror(999, _("'%s' property does not exist for this handle.\n"), "bar_width"); return -1; } return sciReturnDouble(_pvCtx, dblBarWidth); }
/*------------------------------------------------------------------------*/ void* get_font_angle_property(void* _pvCtx, int iObjUID) { double dblFontAngle = 0; double* pdblFontAngle = &dblFontAngle; getGraphicObjectProperty(iObjUID, __GO_FONT_ANGLE__, jni_double, (void **)&pdblFontAngle); if (pdblFontAngle == NULL) { Scierror(999, _("'%s' property does not exist for this handle.\n"), "font_angle"); return NULL; } return sciReturnDouble(RAD2DEG(dblFontAngle)); }
/*------------------------------------------------------------------------*/ int get_color_flag_property(void* _pvCtx, char* pobjUID) { int iColorFlag = 0; int* piColorFlag = &iColorFlag; getGraphicObjectProperty(pobjUID, __GO_COLOR_FLAG__, jni_int, (void **)&piColorFlag); if (piColorFlag == NULL) { Scierror(999, _("'%s' property does not exist for this handle.\n"), "color_flag"); return -1; } return sciReturnDouble(_pvCtx, (double)iColorFlag); }
/*------------------------------------------------------------------------*/ void* get_color_mode_property(void* _pvCtx, int iObjUID) { int iColorMode = 0; int* piColorMode = &iColorMode; getGraphicObjectProperty(iObjUID, __GO_COLOR_MODE__, jni_int, (void **)&piColorMode); if (piColorMode == NULL) { Scierror(999, _("'%s' property does not exist for this handle.\n"), "color_mode"); return NULL; } return sciReturnDouble(iColorMode); }
/*------------------------------------------------------------------------*/ int get_mark_stride_property(void* _pvCtx, int iObjUID) { int iMarkStride = 0; int* piMarkStride = &iMarkStride; getGraphicObjectProperty(iObjUID, __GO_MARK_STRIDE__, jni_int, (void**)&piMarkStride); if (piMarkStride == NULL) { Scierror(999, _("'%s' property does not exist for this handle.\n"), "mark_stride"); return -1; } return sciReturnDouble(_pvCtx, iMarkStride); }
/*------------------------------------------------------------------------*/ int get_tics_color_property(void* _pvCtx, int iObjUID) { int iTicksColor = 0; int* piTicksColor = &iTicksColor; getGraphicObjectProperty(iObjUID, __GO_TICKS_COLOR__, jni_int, (void**)&piTicksColor); if (piTicksColor == NULL) { Scierror(999, _("'%s' property does not exist for this handle.\n"), "tics_color"); return -1; } return sciReturnDouble(_pvCtx, iTicksColor); }
/*------------------------------------------------------------------------*/ int get_mark_foreground_property(void* _pvCtx, int iObjUID) { int iMarkForeground = 0; int* piMarkForeground = &iMarkForeground; getGraphicObjectProperty(iObjUID, __GO_MARK_FOREGROUND__, jni_int, (void**)&piMarkForeground); if (piMarkForeground == NULL) { Scierror(999, _("'%s' property does not exist for this handle.\n"), "mark_foreground"); return -1; } return sciReturnDouble(_pvCtx, iMarkForeground); }
/*------------------------------------------------------------------------*/ void* get_callback_type_property(void* _pvCtx, int iObjUID) { int iCallbackType = 0; int *piCallbackType = &iCallbackType; getGraphicObjectProperty(iObjUID, __GO_CALLBACKTYPE__, jni_int, (void **)&piCallbackType); if (piCallbackType == NULL) { Scierror(999, _("'%s' property does not exist for this handle.\n"), "callback_type"); return FALSE; } return sciReturnDouble(iCallbackType); }
/*------------------------------------------------------------------------*/ void* get_hidden_color_property(void* _pvCtx, int iObjUID) { int iHiddenColor = 0; int* piHiddenColor = &iHiddenColor; getGraphicObjectProperty(iObjUID, __GO_HIDDEN_COLOR__, jni_int, (void **)&piHiddenColor); if (piHiddenColor == NULL) { Scierror(999, _("'%s' property does not exist for this handle.\n"), "hidden_color"); return NULL; } return sciReturnDouble(iHiddenColor); }
/*------------------------------------------------------------------------*/ void* get_arrow_size_property(void* _pvCtx, int iObjUID) { double arrowSize = 0.0; double* pdblArrowSize = &arrowSize; getGraphicObjectProperty(iObjUID, __GO_ARROW_SIZE__, jni_double, (void **)&pdblArrowSize); if (pdblArrowSize == NULL) { Scierror(999, _("'%s' property does not exist for this handle.\n"), "arrow_size"); return NULL; } return sciReturnDouble(arrowSize); }
/*------------------------------------------------------------------------*/ void* get_line_width_property(void* _pvCtx, int iObjUID) { double dblLineWidth = 0.0; double *pdblLineWidth = &dblLineWidth; getGraphicObjectProperty(iObjUID, __GO_LINE_WIDTH__, jni_double, (void **)&pdblLineWidth); if (pdblLineWidth == NULL) { Scierror(999, _("'%s' property does not exist for this handle.\n"), "line_width"); return NULL; } return sciReturnDouble(dblLineWidth); }
/*------------------------------------------------------------------------*/ int get_background_property(void* _pvCtx, char* pobjUID) { int iBackground = 0; int *piBackground = &iBackground; getGraphicObjectProperty(pobjUID, __GO_BACKGROUND__, jni_int, (void **)&piBackground); if (piBackground == NULL) { /* This object has not a background color */ Scierror(999, _("'%s' property does not exist for this handle.\n"), "background"); return -1; } return sciReturnDouble(_pvCtx, iBackground); }
int GetUicontrolMax(void* _pvCtx, char *sciObjUID) { double maxValue = 0; double* pdblMaxValue = &maxValue; getGraphicObjectProperty(sciObjUID, __GO_UI_MAX__, jni_double, (void**) &pdblMaxValue); if (pdblMaxValue == NULL) { Scierror(999, const_cast<char*>(_("'%s' property does not exist for this handle.\n")), "Max"); return FALSE; } else { return sciReturnDouble(_pvCtx, maxValue); } }
void* GetUicontrolMin(void* _pvCtx, int iObjUID) { double minValue = 0; double* pdblMinValue = &minValue; getGraphicObjectProperty(iObjUID, __GO_UI_MIN__, jni_double, (void**) &pdblMinValue); if (pdblMinValue == NULL) { Scierror(999, const_cast<char*>(_("'%s' property does not exist for this handle.\n")), "Min"); return NULL; } else { return sciReturnDouble(minValue); } }
/*------------------------------------------------------------------------*/ int get_color_flag_property(char *pobjUID) { int iColorFlag; int* piColorFlag = &iColorFlag; #if 0 if (sciGetEntityType (pobj) != SCI_SURFACE) { Scierror(999, _("'%s' property does not exist for this handle.\n"),"color_flag"); return -1; } #endif getGraphicObjectProperty(pobjUID, __GO_COLOR_FLAG__, jni_int, &piColorFlag); if (piColorFlag == NULL) { Scierror(999, _("'%s' property does not exist for this handle.\n"),"color_flag"); return -1; } return sciReturnDouble(iColorFlag); }
/*------------------------------------------------------------------------*/ void* get_sub_tics_property(void* _pvCtx, int iObjUID) { int iType = -1; int *piType = &iType; int iSubTicks = 0; int* piSubTicks = &iSubTicks; /*Dj.A 17/12/2003*/ /* modified jb Silvy 01/2006 */ getGraphicObjectProperty(iObjUID, __GO_TYPE__, jni_int, (void **)&piType); if (piType == NULL) { Scierror(999, _("'%s' property does not exist for this handle.\n"), "type"); return NULL; } /* * Type test required as the Axis object stores subticks as a single int * whereas Axes maintain a 3-element int vector. */ if (iType == __GO_AXIS__) { getGraphicObjectProperty(iObjUID, __GO_SUBTICKS__, jni_int, (void**)&piSubTicks); if (piSubTicks == NULL) { Scierror(999, _("'%s' property does not exist for this handle.\n"), "sub_ticks"); return NULL; } return sciReturnDouble(iSubTicks); } else if (iType == __GO_AXES__) { double sub_ticks[3]; int iView = 0; int* piView = &iView; getGraphicObjectProperty(iObjUID, __GO_X_AXIS_SUBTICKS__, jni_int, (void**)&piSubTicks); if (piSubTicks == NULL) { Scierror(999, _("'%s' property does not exist for this handle.\n"), "sub_ticks"); return NULL; } sub_ticks[0] = iSubTicks; getGraphicObjectProperty(iObjUID, __GO_Y_AXIS_SUBTICKS__, jni_int, (void**)&piSubTicks); if (piSubTicks == NULL) { Scierror(999, _("'%s' property does not exist for this handle.\n"), "sub_ticks"); return NULL; } sub_ticks[1] = iSubTicks; getGraphicObjectProperty(iObjUID, __GO_Z_AXIS_SUBTICKS__, jni_int, (void**)&piSubTicks); if (piSubTicks == NULL) { Scierror(999, _("'%s' property does not exist for this handle.\n"), "sub_ticks"); return NULL; } sub_ticks[2] = iSubTicks; getGraphicObjectProperty(iObjUID, __GO_VIEW__, jni_int, (void**)&piView); if (piView == NULL) { Scierror(999, _("'%s' property does not exist for this handle.\n"), "view"); return NULL; } if (iView == 1) { return sciReturnRowVector(sub_ticks, 3); } else { return sciReturnRowVector(sub_ticks, 2); } } else { Scierror(999, _("'%s' property does not exist for this handle.\n"), "sub_ticks"); return NULL; } }
int get_UID(void* _pvCtx, int iObjUID) { return sciReturnDouble(_pvCtx, (double)iObjUID); }