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/Fl.H | |
| 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/Fl.H')
| -rw-r--r-- | FL/Fl.H | 32 |
1 files changed, 30 insertions, 2 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! |
