1 /* 2 * This file is part of the XForms library package. 3 * 4 * XForms is free software; you can redistribute it and/or modify it 5 * under the terms of the GNU Lesser General Public License as 6 * published by the Free Software Foundation; either version 2.1, or 7 * (at your option) any later version. 8 * 9 * XForms is distributed in the hope that it will be useful, but 10 * WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Lesser General Public License for more details. 13 * 14 * You should have received a copy of the GNU Lesser General Public License 15 * along with XForms. If not, see <http://www.gnu.org/licenses/>. 16 */ 17 18 /********************** crop here for forms.h **********************/ 19 20 #ifndef FL_SPINNER_H 21 #define FL_SPINNER_H 22 23 typedef enum { 24 FL_INT_SPINNER, 25 FL_FLOAT_SPINNER 26 } FL_SPINNER_TYPE; 27 28 FL_EXPORT FL_OBJECT * fl_create_spinner( int type, 29 FL_Coord x, 30 FL_Coord y, 31 FL_Coord w, 32 FL_Coord h, 33 const char * label ); 34 35 FL_EXPORT FL_OBJECT * fl_add_spinner( int type, 36 FL_Coord x, 37 FL_Coord y, 38 FL_Coord w, 39 FL_Coord h, 40 const char * label ); 41 42 FL_EXPORT double fl_get_spinner_value( FL_OBJECT * obj ); 43 44 FL_EXPORT double fl_set_spinner_value( FL_OBJECT * obj, 45 double val ); 46 47 FL_EXPORT void fl_set_spinner_bounds( FL_OBJECT * obj, 48 double min, 49 double max ); 50 51 FL_EXPORT void fl_get_spinner_bounds( FL_OBJECT * obj, 52 double * min, 53 double * max ); 54 55 FL_EXPORT void fl_set_spinner_step( FL_OBJECT * obj, 56 double step ); 57 58 FL_EXPORT double fl_get_spinner_step( FL_OBJECT * obj ); 59 60 FL_EXPORT void fl_set_spinner_precision( FL_OBJECT * obj, 61 int prec ); 62 63 FL_EXPORT int fl_get_spinner_precision( FL_OBJECT * obj ); 64 65 FL_EXPORT FL_OBJECT * fl_get_spinner_input( FL_OBJECT * obj ); 66 67 FL_EXPORT FL_OBJECT * fl_get_spinner_up_button( FL_OBJECT * obj ); 68 69 FL_EXPORT FL_OBJECT * fl_get_spinner_down_button( FL_OBJECT * obj ); 70 71 72 #endif /* ! defined FL_SPINNER_H */ 73