diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2015-02-03 12:19:01 +0000 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2015-02-03 12:19:01 +0000 |
| commit | 84f87addfc5afcb54c5d18bac1c97345afaa0ef7 (patch) | |
| tree | 67fc83e859b3e47861b285deb3567cdf8bacecf2 | |
| parent | f3cd33bb917a3405842a01fcf87244012226645e (diff) | |
Add method Fl_Widget::is_label_copied() as discussed in fltk.general.
Thread was: "How get X,Y,W,H for current clip region ?" on Feb 2-3, 2015.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10552 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | FL/Fl_Widget.H | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/FL/Fl_Widget.H b/FL/Fl_Widget.H index f340ffb85..b70732e3a 100644 --- a/FL/Fl_Widget.H +++ b/FL/Fl_Widget.H @@ -235,6 +235,16 @@ public: */ virtual int handle(int event); + /** Returns whether the current label was assigned with copy_label(). + + This can be useful for temporarily overwriting the widget's label + and restoring it later. + + \retval 0 current label was assigned with label(). + \retval 1 current label was assigned with copy_label(). + */ + int is_label_copied() const {return ((flags_ & COPIED_LABEL) ? 1 : 0);} + /** Returns a pointer to the parent widget. Usually this is a Fl_Group or Fl_Window. \retval NULL if the widget has no parent |
