Here I'm presenting a patch to Fl_Input_ and derived classes that add the folowing:
- A compiler flag "CTRL_A_SELECT_ALL" to allow ctrl+a do select all text
instead of go to begining of the line.
- Add the possibility of having number formatted and right aligned with
custom decimal and thousands separator also number of decimal places,
there is both global and per widget settings:
/*[0] = decimal_places, [1] = decimal_separator, [3] =
thousands_separator*/
char Fl_Input::default_number_format_[4] = "\2.,";
int right_to_left() {return right_to_left_;};
void right_to_left(int bool_right_to_left) {right_to_left_ =
bool_right_to_left;};
static const char *default_number_format();
static void default_number_format(const char *format);
const char *number_format() {return number_format_;};
void number_format(const char *format);
int decimal_places();
void decimal_places(int count);
- New functions to get/sete integers and floats:
int value_int(int v);
int value_int();
int value_float(double v);
double value_float();
- New function to select all text:
int markall() {position(0); return position(size(), mark());}
I'm not sure how it will work with apple because I don't have one.
It doesn't take in account the use of locale.
I hope it can be added to the fltk 1.3 official repository.
Any comments are welcome !
fl_input.patch
Description: Binary data
_______________________________________________ fltk-dev mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-dev
