diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-07-23 16:28:19 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-07-23 16:28:19 +0000 |
| commit | d453884e0ffdc49bf42f373581210d95d56a0985 (patch) | |
| tree | 542a5a5c58704b8c8a1b1eefeda511b13aaff750 /FL | |
| parent | 745cd4204a3d9cc379e99db6f6cf9d75d4337c3b (diff) | |
Add wrap() method and bit for Fl_Input_, and make word wrap dependent
on this (wrap margin is the width of the widget less box borders)
Don't select the text in value() for a readonly() (output) field.
Display a caret instead of a vertical bar for the cursor in output fields.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2545 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL')
| -rw-r--r-- | FL/Fl_Input_.H | 12 |
1 files changed, 9 insertions, 3 deletions
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 $". // |
