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
This commit is contained in:
Albrecht Schlosser 2015-02-03 12:19:01 +00:00
parent f3cd33bb91
commit 84f87addfc
1 changed files with 10 additions and 0 deletions

View File

@ -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