Also I propose add this function to Fl_Widget:

   /** Returns a pointer to the root parent widget.
       Usually this is a Fl_Window.
       \retval NULL if the widget has no root parent
    */
   Fl_Group* root_parent() const;

Fl_Group* Fl_Widget::root_parent() const {
     Fl_Group *result = parent();
     while(result) {
         if(!result->parent()) return result;
         result = result->parent();
     }
     return NULL;
}



_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to