From 3ce67eb59440f5719f472796f7c6fecd2ff47f1c Mon Sep 17 00:00:00 2001 From: Lauri Kasanen Date: Mon, 8 Sep 2014 08:55:49 +0000 Subject: Expose the INACTIVE flag in Fl_Widget similarly to other flags. STR #3122 git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10289 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- FL/Fl_Widget.H | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/FL/Fl_Widget.H b/FL/Fl_Widget.H index 6f55652b4..f340ffb85 100644 --- a/FL/Fl_Widget.H +++ b/FL/Fl_Widget.H @@ -777,6 +777,18 @@ public: */ void clear_changed() {flags_ &= ~CHANGED;} + /** Marks the widget as inactive without sending events or changing focus. + This is mainly for specialized use, for normal cases you want deactivate(). + \see deactivate() + */ + void clear_active() {flags_ |= INACTIVE;} + + /** Marks the widget as active without sending events or changing focus. + This is mainly for specialized use, for normal cases you want activate(). + \see activate() + */ + void set_active() {flags_ &= ~INACTIVE;} + /** Gives the widget the keyboard focus. Tries to make this widget be the Fl::focus() widget, by first sending it an FL_FOCUS event, and if it returns non-zero, setting -- cgit v1.2.3