2 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 * Copyright (C) 2007 - INRIA - Vincent COUVERT
4 * Copyright (C) 2011 - DIGITEO - Bruno JOFRET
6 * This file must be used under the terms of the CeCILL.
7 * This source file is licensed as described in the file COPYING, which
8 * you should have received as part of this distribution. The terms
9 * are also available at
10 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
14 #include "GetUicontrolStyle.hxx"
18 #include "graphicObjectProperties.h"
19 #include "getGraphicObjectProperty.h"
23 ** \brief Get the style of an uicontrol object
26 static char *IntToStyle(int _iStyle)
30 case __GO_UI_CHECKBOX__ :
34 case __GO_UI_FRAME__ :
36 case __GO_UI_IMAGE__ :
38 case __GO_UI_LISTBOX__ :
40 case __GO_UI_POPUPMENU__ :
42 case __GO_UI_PUSHBUTTON__ :
44 case __GO_UI_RADIOBUTTON__ :
46 case __GO_UI_SLIDER__ :
48 case __GO_UI_TABLE__ :
55 int GetUicontrolStyle(void* _pvCtx, char *sciObjUID)
58 int *piStyle = &iStyle;
60 getGraphicObjectProperty(sciObjUID, __GO_STYLE__, jni_int, (void **) &piStyle);
64 return sciReturnString(_pvCtx, IntToStyle(iStyle));
68 Scierror(999, const_cast<char*>(_("No '%s' property for this object.\n")), "Style");