diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2010-10-31 22:39:40 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2010-10-31 22:39:40 +0000 |
| commit | 5560a4f0f1f5b4799a8c5162212e7ec22c601ae5 (patch) | |
| tree | 42be986576fa49dabfe7ba33af6eeb893c3ebff5 /FL | |
| parent | 1e26ada2c5be6bf9ca45884bebc0228319c3c226 (diff) | |
Fixed a few pedantic warnings. Added Fl::option as discussed in STR #2368, but I am not too happy with it yet. Please see discussion in that STR.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7789 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL')
| -rw-r--r-- | FL/Fl.H | 32 | ||||
| -rw-r--r-- | FL/Fl_Input.H | 10 | ||||
| -rw-r--r-- | FL/Fl_Multiline_Input.H | 5 | ||||
| -rw-r--r-- | FL/Fl_Multiline_Output.H | 4 |
4 files changed, 39 insertions, 12 deletions
@@ -106,13 +106,14 @@ typedef int (*Fl_Args_Handler)(int argc, char **argv, int &i); /** @} */ /* group callback_functions */ + /** The Fl is the FLTK global (static) containing state information and global methods for the current application. */ class FL_EXPORT Fl { Fl() {}; // no constructor! - + public: // should be private! #ifndef FL_DOXYGEN static int e_number; @@ -143,7 +144,34 @@ public: // should be private! If true then flush() will do something. */ static void damage(int d) {damage_ = d;} - + +public: + typedef enum { + /// If set, the arrow keys can change focus from a text widget to another + /// widget. If clear, only Tab and BackTab can. + OPTION_ARROW_FOCUS = 0, + /// If set, calls to fl_file_chooser will open the native file chooser. + /// If clear, the FLTK file chooser will open instead. + /// \todo Fl::OPTION_NATIVE_FILECHOOSER not yet supported + OPTION_NATIVE_FILECHOOSER, + // don't change this, leave it always as the last element + OPTION_LAST + } Fl_Option; + +private: + static unsigned char options_[OPTION_LAST]; + static unsigned char options_read_; + +public: + /** + Return a global setting for all FLTK applications, possibly overridden + by a setting specifically for this application. + + \param opt + \returns true or false + */ + static bool option(Fl_Option opt); + /** The currently executing idle callback function: DO NOT USE THIS DIRECTLY! diff --git a/FL/Fl_Input.H b/FL/Fl_Input.H index 05b870237..7e93d8e41 100644 --- a/FL/Fl_Input.H +++ b/FL/Fl_Input.H @@ -39,8 +39,8 @@ inset box and a white background. The text may contain any characters (even 0), and will correctly display any UTF text, using ^X notation for unprintable control characters. It assumes the - font can draw any characters of the used scripts, which is true - for standard fonts under MSWindows and Mac OS X.</P> + font can draw any characters of the used scripts, which is true + for standard fonts under MSWindows and Mac OS X.</P> <CENTER><TABLE border=1 WIDTH=90% summary="Fl_Input keyboard and mouse bindings."> @@ -114,10 +114,10 @@ also be able to type "dead key" prefix characters. On X you will actually be able to see what dead key you typed, and if you then move the cursor without completing the sequence the accent will remain - inserted. + inserted. - <p>Under Mac OS X, character composition is done as for any Mac application - using Mac OS-defined keystroke series.</TD></TR> + <p>Under Mac OS X, character composition is done as for any Mac application + using Mac OS-defined keystroke series.</TD></TR> </TABLE></CENTER> <!-- NEW PAGE --> diff --git a/FL/Fl_Multiline_Input.H b/FL/Fl_Multiline_Input.H index 609f8cc31..955400e92 100644 --- a/FL/Fl_Multiline_Input.H +++ b/FL/Fl_Multiline_Input.H @@ -38,15 +38,14 @@ This input field displays '\n' characters as new lines rather than ^J, and accepts the Return, Tab, and up and down arrow keys. This is for editing multiline text. - <P> + This is far from the nirvana of text editors, and is probably only good for small bits of text, 10 lines at most. Note that this widget does not support scrollbars or per-character color control. - <P> + If you are presenting large amounts of text and need scrollbars or full color control of characters, you probably want Fl_Text_Editor instead. - <P> */ class Fl_Multiline_Input : public Fl_Input { public: diff --git a/FL/Fl_Multiline_Output.H b/FL/Fl_Multiline_Output.H index 04f89b6d5..2d6e60ca9 100644 --- a/FL/Fl_Multiline_Output.H +++ b/FL/Fl_Multiline_Output.H @@ -37,10 +37,10 @@ This widget is a subclass of Fl_Output that displays multiple lines of text. It also displays tab characters as whitespace to the next column. - <P> + Note that this widget does not support scrollbars, or per-character color control. - <P> + If you are presenting large amounts of read-only text and need scrollbars, or full color control of characters, then use Fl_Text_Display. If you want to display HTML text, |
