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 General Public License 15 * along with XForms. If not, see <http://www.gnu.org/licenses/>. 16 */ 17 18 19 #ifndef PINPUT_H 20 #define PINPUT_H 21 22 typedef struct { 23 char * str; /* the input text */ 24 FL_COLOR textcol; /* text color */ 25 FL_COLOR curscol; /* cursor color */ 26 int position; /* cursor position (in chars) */ 27 int beginrange; /* start of the range */ 28 int endrange; /* end of the range */ 29 int size; /* size of the string */ 30 int changed; /* whether the field has changed */ 31 int drawtype; /* if to draw text with background */ 32 int noscroll; /* true if no scrollis allowed */ 33 int maxchars; /* limit for normal_input */ 34 int attrib1; 35 int attrib2; 36 FL_INPUT_VALIDATOR validate; 37 38 /* scroll stuff. */ 39 40 FL_OBJECT * dummy; /* only for the size of composite */ 41 FL_OBJECT * hscroll; 42 FL_OBJECT * vscroll; 43 FL_OBJECT * input; 44 int xoffset; 45 int yoffset; 46 int screenlines; 47 int topline; 48 int lines; /* total number of lines in the field */ 49 int xpos, /* current cursor position in char,line */ 50 ypos; 51 int cur_pixels; /* current line length in pixels */ 52 int max_pixels; /* max length of all lines */ 53 int max_pixels_line; 54 int charh; /* character height */ 55 int h, /* text area */ 56 w; 57 double hsize, 58 vsize; 59 double hval, 60 vval; 61 double hinc1, 62 hinc2; 63 double vinc1, 64 vinc2; 65 int h_pref, /* scrollbar preference */ 66 v_pref; 67 int vw, 68 vw_def; 69 int hh, 70 hh_def; 71 int h_on, 72 v_on; 73 int dead_area, 74 attrib; 75 int cursor_visible; 76 int field_char; 77 } FLI_INPUT_SPEC; 78 79 80 #endif /* INPUT_H */ 81 82 83 /* 84 * Local variables: 85 * tab-width: 4 86 * indent-tabs-mode: nil 87 * End: 88 */ 89