diff --git a/CHANGES b/CHANGES index 9e433e455..7903a8ee8 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,11 @@ CHANGES IN FLTK 1.1.0rc5 + - Added "wrap" type bit to Fl_Input_, so you can now + have a multiline text field that wraps text. + - Setting the value() of an output text field no longer + selects the text in it. + - Output text fields now show a caret for the cursor + instead of the vertical bar. - The newButton and previewButton widgets are now public members of the Fl_File_Chooser class. This allows developers to disable or hide the "new directory" and diff --git a/FL/Fl_Input_.H b/FL/Fl_Input_.H index b0504412d..1e6db90e2 100644 --- a/FL/Fl_Input_.H +++ b/FL/Fl_Input_.H @@ -1,5 +1,5 @@ // -// "$Id: Fl_Input_.H,v 1.6.2.4.2.4 2002/04/11 11:52:40 easysw Exp $" +// "$Id: Fl_Input_.H,v 1.6.2.4.2.5 2002/07/23 16:28:18 easysw Exp $" // // Input base class header file for the Fast Light Tool Kit (FLTK). // @@ -40,6 +40,9 @@ #define FL_INPUT_READONLY 8 #define FL_NORMAL_OUTPUT (FL_NORMAL_INPUT | FL_INPUT_READONLY) #define FL_MULTILINE_OUTPUT (FL_MULTILINE_INPUT | FL_INPUT_READONLY) +#define FL_INPUT_WRAP 16 +#define FL_MULTILINE_INPUT_WRAP (FL_MULTILINE_INPUT | FL_INPUT_WRAP) +#define FL_MULTILINE_OUTPUT_WRAP (FL_MULTILINE_INPUT | FL_INPUT_READONLY | FL_INPUT_WRAP) class Fl_Input_ : public Fl_Widget { @@ -126,11 +129,14 @@ public: void input_type(int t) { type(t | readonly()); } int readonly() const { return type() & FL_INPUT_READONLY; } void readonly(int b) { if (b) type(type() | FL_INPUT_READONLY); - else type(type() & FL_INPUT_TYPE); } + else type(type() & ~FL_INPUT_READONLY); } + int wrap() const { return type() & FL_INPUT_WRAP; } + void wrap(int b) { if (b) type(type() | FL_INPUT_WRAP); + else type(type() & ~FL_INPUT_WRAP); } }; #endif // -// End of "$Id: Fl_Input_.H,v 1.6.2.4.2.4 2002/04/11 11:52:40 easysw Exp $". +// End of "$Id: Fl_Input_.H,v 1.6.2.4.2.5 2002/07/23 16:28:18 easysw Exp $". // diff --git a/documentation/Fl_Input_.html b/documentation/Fl_Input_.html index 18aff8a0f..72792528f 100644 --- a/documentation/Fl_Input_.html +++ b/documentation/Fl_Input_.html @@ -41,6 +41,13 @@ setting type() to one of the following values:
#define FL_INT_INPUT 2 #define FL_MULTILINE_INPUT 4 #define FL_SECRET_INPUT 5 +#define FL_INPUT_TYPE 7 +#define FL_INPUT_READONLY 8 +#define FL_NORMAL_OUTPUT (FL_NORMAL_INPUT | FL_INPUT_READONLY) +#define FL_MULTILINE_OUTPUT (FL_MULTILINE_INPUT | FL_INPUT_READONLY) +#define FL_INPUT_WRAP 16 +#define FL_MULTILINE_INPUT_WRAP (FL_MULTILINE_INPUT | FL_INPUT_WRAP) +#define FL_MULTILINE_OUTPUT_WRAP (FL_MULTILINE_INPUT | FL_INPUT_READONLY | FL_INPUT_WRAP)Gets or sets the read-only state of the input field. +
Gets or sets the word wrapping state of the input field. Word +wrap is only functional with multi-line input fields. +