From 84f87addfc5afcb54c5d18bac1c97345afaa0ef7 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Tue, 3 Feb 2015 12:19:01 +0000 Subject: 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 --- FL/Fl_Widget.H | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 -- cgit v1.2.3