summaryrefslogtreecommitdiff
path: root/FL/Fl_Input_.H
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2020-07-01 18:03:10 +0200
committerAlbrecht Schlosser <albrechts.fltk@online.de>2020-07-06 20:28:20 +0200
commitf09e17c3c564e8310125a10c03397cbf473ff643 (patch)
tree8d0fd4a28e3686c33aaa140d07ddba26ab28bdc2 /FL/Fl_Input_.H
parentb0e0c355edaa2e23148cb0260ada907aec930f05 (diff)
Remove $Id$ tags, update URL's, and more
- remove obsolete svn '$Id$' tags from all source files - update .fl files and generated files accordingly - replace 'http://www.fltk.org' URL's with 'https://...' - replace bug report URL 'str.php' with 'bugs.php' - remove trailing whitespace - fix other whitespace errors flagged by Git - add and/or fix missing or wrong standard headers - convert tabs to spaces in all source files The only relevant code changes are in the fluid/ folder where some .fl files and other source files were used to generate the '$Id' headers and footers.
Diffstat (limited to 'FL/Fl_Input_.H')
-rw-r--r--FL/Fl_Input_.H112
1 files changed, 53 insertions, 59 deletions
diff --git a/FL/Fl_Input_.H b/FL/Fl_Input_.H
index a07a70282..315f24a68 100644
--- a/FL/Fl_Input_.H
+++ b/FL/Fl_Input_.H
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Input base class header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2015 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// the file "COPYING" which should have been included with this file. If this
// file is missing or damaged, see the license at:
//
-// http://www.fltk.org/COPYING.php
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
/* \file
@@ -26,18 +24,18 @@
#include "Fl_Widget.H"
#endif
-#define FL_NORMAL_INPUT 0
-#define FL_FLOAT_INPUT 1
-#define FL_INT_INPUT 2
-#define FL_HIDDEN_INPUT 3
-#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_NORMAL_INPUT 0
+#define FL_FLOAT_INPUT 1
+#define FL_INT_INPUT 2
+#define FL_HIDDEN_INPUT 3
+#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)
/**
@@ -54,16 +52,16 @@
setting type() to one of the following values:
\code
- #define FL_NORMAL_INPUT 0
- #define FL_FLOAT_INPUT 1
- #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_NORMAL_INPUT 0
+ #define FL_FLOAT_INPUT 1
+ #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)
\endcode
@@ -113,8 +111,8 @@ class FL_EXPORT Fl_Input_ : public Fl_Widget {
If \p position_ equals \p mark_, no text is selected */
int mark_;
- /** \internal Behavior of Tab key in multiline input widget.
- If enabled (default) Tab causes focus nav, otherwise Tab is inserted
+ /** \internal Behavior of Tab key in multiline input widget.
+ If enabled (default) Tab causes focus nav, otherwise Tab is inserted
as a character. */
int tab_nav_;
@@ -180,7 +178,7 @@ protected:
/* Find the start of a line. */
int line_start(int i) const;
-
+
/* Find the end of a line. */
int line_end(int i) const;
@@ -238,8 +236,8 @@ public:
This function returns the current value, which is a pointer
to the internal buffer and is valid only until the next event is
handled.
-
- \return pointer to an internal buffer - do not free() this
+
+ \return pointer to an internal buffer - do not free() this
\see Fl_Input_::value(const char*)
*/
const char* value() const {return value_;}
@@ -248,9 +246,9 @@ public:
Fl_Char index(int i) const;
/**
- Returns the number of bytes in value().
-
- This may be greater than <tt>strlen(value())</tt> if there are
+ Returns the number of bytes in value().
+
+ This may be greater than <tt>strlen(value())</tt> if there are
\c nul characters in the text.
\return number of bytes in the text
@@ -283,7 +281,7 @@ public:
*/
int position() const {return position_;}
- /** Gets the current selection mark.
+ /** Gets the current selection mark.
\return index into the text */
int mark() const {return mark_;}
@@ -298,9 +296,9 @@ public:
*/
int position(int p) {return position(p, p);}
- /** Sets the current selection mark.
+ /** Sets the current selection mark.
mark(n) is the same as <tt>position(position(),n)</tt>.
- \param m new index of the mark
+ \param m new index of the mark
\return 0 if the mark did not change
\see position(), position(int, int) */
int mark(int m) {return position(position(), m);}
@@ -377,11 +375,11 @@ public:
\see Fl_Button::shortcut() */
int shortcut() const {return shortcut_;}
- /**
+ /**
Sets the shortcut key associated with this widget.
Pressing the shortcut key gives text editing focus to this widget.
- \param [in] s new shortcut keystroke
- \see Fl_Button::shortcut()
+ \param [in] s new shortcut keystroke
+ \see Fl_Button::shortcut()
*/
void shortcut(int s) {shortcut_ = s;}
@@ -414,52 +412,52 @@ public:
\see textcolor() */
void textcolor(Fl_Color n) {textcolor_ = n;}
- /** Gets the color of the cursor.
+ /** Gets the color of the cursor.
\return the current cursor color */
Fl_Color cursor_color() const {return cursor_color_;}
- /** Sets the color of the cursor.
+ /** Sets the color of the cursor.
The default color for the cursor is \c FL_BLACK.
\param [in] n the new cursor color */
void cursor_color(Fl_Color n) {cursor_color_ = n;}
- /** Gets the input field type.
+ /** Gets the input field type.
\return the current input type */
int input_type() const {return type() & FL_INPUT_TYPE; }
- /** Sets the input field type.
+ /** Sets the input field type.
A redraw() is required to reformat the input field.
\param [in] t new input type */
void input_type(int t) { type((uchar)(t | readonly())); }
- /** Gets the read-only state of the input field.
+ /** Gets the read-only state of the input field.
\return non-zero if this widget is read-only */
int readonly() const { return type() & FL_INPUT_READONLY; }
- /** Sets the read-only state of the input field.
+ /** Sets the read-only state of the input field.
\param [in] b if \p b is 0, the text in this widget can be edited by the user */
void readonly(int b) { if (b) type((uchar)(type() | FL_INPUT_READONLY));
else type((uchar)(type() & ~FL_INPUT_READONLY)); }
/**
- Gets the word wrapping state of the input field.
+ Gets the word wrapping state of the input field.
Word wrap is only functional with multi-line input fields.
*/
int wrap() const { return type() & FL_INPUT_WRAP; }
/**
- Sets the word wrapping state of the input field.
+ Sets the word wrapping state of the input field.
Word wrap is only functional with multi-line input fields.
*/
void wrap(int b) { if (b) type((uchar)(type() | FL_INPUT_WRAP));
else type((uchar)(type() & ~FL_INPUT_WRAP)); }
/**
- Sets whether the Tab key does focus navigation,
+ Sets whether the Tab key does focus navigation,
or inserts tab characters into Fl_Multiline_Input.
- By default this flag is enabled to provide the 'normal' behavior
- most users expect; Tab navigates focus to the next widget.
+ By default this flag is enabled to provide the 'normal' behavior
+ most users expect; Tab navigates focus to the next widget.
To inserting an actual Tab character, users can use Ctrl-I
or copy/paste.
@@ -468,8 +466,8 @@ public:
only the mouse can be used to navigate to the next field.
History: This flag was provided for backwards support of FLTK's old 1.1.x
- behavior where Tab inserts a tab character instead of navigating
- focus to the next widget. This behavior was unique to Fl_Multiline_Input.
+ behavior where Tab inserts a tab character instead of navigating
+ focus to the next widget. This behavior was unique to Fl_Multiline_Input.
With the advent of Fl_Text_Editor, this old behavior has been deprecated.
\param [in] val If \p val is 1, Tab advances focus (default).<BR>
@@ -496,8 +494,4 @@ public:
}
};
-#endif
-
-//
-// End of "$Id$".
-//
+#endif