Re: [fltk.development] [RFE] STR #2948: Add a method to Fl_Widget that returns its top-level window

2013-04-12 Thread Greg Ercolano
DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW. [STR Pending] Link: http://www.fltk.org/str.php?L2948 Version: 1.3-feature Fix Version: 1.3-current (r9876) Sorry, as Ian points out on fltk.dev, meant to say const_cast<> in the above, not static_cast<>. Link: htt

Re: [fltk.development] [RFE] STR #2948: Add a method to Fl_Widget that returns its top-level window

2013-04-12 Thread Greg Ercolano
DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW. [STR Pending] Link: http://www.fltk.org/str.php?L2948 Version: 1.3-feature Fix Version: 1.3-current (r9876) Oh, I should add.. all mods to date (r9876, including static_cast<>) build OK on: redhat9, irix6.5, centos 5

Re: [fltk.development] [RFE] STR #2948: Add a method to Fl_Widget that returns its top-level window

2013-04-12 Thread Greg Ercolano
DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW. [STR Pending] Link: http://www.fltk.org/str.php?L2948 Version: 1.3-feature Fix Version: 1.3-current (r9876) Updated fixes in r9875 and r9876. About to close, unless there's more to add. Regarding const mods to at_w

Re: [fltk.development] [RFE] STR #2948: Add a method to Fl_Widget that returns its top-level window

2013-04-12 Thread Greg Ercolano
DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW. [STR Pending] Link: http://www.fltk.org/str.php?L2948 Version: 1.3-feature Fix Version: 1.3-current (r9871) Albrecht> We're only calling const methods anyway, as x(), y(), window(), Albrecht> and this code is not sub

Re: [fltk.development] [RFE] STR #2948: Add a method to Fl_Widget that returns its top-level window

2013-04-12 Thread Manolo Gouy
DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW. [STR Pending] Link: http://www.fltk.org/str.php?L2948 Version: 1.3-feature Fix Version: 1.3-current (r9871) @Greg: Yes to all proposed changes. There's no reason, but laziness, to loose const protection. Link: http

Re: [fltk.development] [RFE] STR #2948: Add a method to Fl_Widget that returns its top-level window

2013-04-12 Thread Albrecht Schlosser
DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW. [STR Pending] Link: http://www.fltk.org/str.php?L2948 Version: 1.3-feature Fix Version: 1.3-current (r9871) +1 for renaming to w instead of win (or maybe widget to avoid name clashes with w(), but that's not importan

Re: [fltk.development] [RFE] STR #2948: Add a method to Fl_Widget that returns its top-level window

2013-04-12 Thread MacArthur, Ian (Selex ES, UK)
> @manolo: Great -- agree with all, except perhaps loosing const here: > > - const Fl_Window *win = (const Fl_Window*)this; > + Fl_Widget *win = (Fl_Widget*)this; > > I think we can maintain const protection on the variable this way: > > const Fl_Widget *win = this; > : > return (

Re: [fltk.development] [RFE] STR #2948: Add a method to Fl_Widget that returns its top-level window

2013-04-11 Thread Greg Ercolano
DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW. [STR Pending] Link: http://www.fltk.org/str.php?L2948 Version: 1.3-feature Fix Version: 1.3-current (r9871) @manolo: Great -- agree with all, except perhaps loosing const here: - const Fl_Window *win = (const Fl_Wi

Re: [fltk.development] [RFE] STR #2948: Add a method to Fl_Widget that returns its top-level window

2013-04-11 Thread Manolo Gouy
DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW. [STR Pending] Link: http://www.fltk.org/str.php?L2948 Version: 1.3-feature Fix Version: 1.3-current (r9871) Attached file "window.patch"... Link: http://www.fltk.org/str.php?L2948 Version: 1.3-feature Fix Version: 1

Re: [fltk.development] [RFE] STR #2948: Add a method to Fl_Widget that returns its top-level window

2013-04-11 Thread Manolo Gouy
DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW. [STR Pending] Link: http://www.fltk.org/str.php?L2948 Version: 1.3-feature Fix Version: 1.3-current (r9871) Thanks Greg for implementing exactly what I was getting at. I still have a few remarks about the current im

Re: [fltk.development] [RFE] STR #2948: Add a method to Fl_Widget that returns its top-level window

2013-04-10 Thread Albrecht Schlosser
DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW. [STR Pending] Link: http://www.fltk.org/str.php?L2948 Version: 1.3-feature Fix Version: 1.3-current (r9871) Comments? Yes: Great, thanks. BTW: good catch that top_window_offset() should be a Fl_Widget method. I didn

Re: [fltk.development] [RFE] STR #2948: Add a method to Fl_Widget that returns its top-level window

2013-04-10 Thread Greg Ercolano
DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW. [STR Pending] Link: http://www.fltk.org/str.php?L2948 Version: 1.3-feature Fix Version: 1.3-current (r9871) ..and finally: r9873: CHANGES file updated. Comments before close? Link: http://www.fltk.org/str.php?L

Re: [fltk.development] [RFE] STR #2948: Add a method to Fl_Widget that returns its top-level window

2013-04-10 Thread Greg Ercolano
DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW. [STR Pending] Link: http://www.fltk.org/str.php?L2948 Version: 1.3-feature OK: r9871: top_window(): implemented (using as_window()) r9872: top_window_offset() now a member of Fl_Widget (was Fl_Window)

Re: [fltk.development] [RFE] STR #2948: Add a method to Fl_Widget that returns its top-level window

2013-04-10 Thread Greg Ercolano
DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW. [STR Pending] Link: http://www.fltk.org/str.php?L2948 Version: 1.3-feature Oh, BTW, I think I missed what Manolo might have been getting at wrt the 'top_window_offset()' method. So where we're at now, just to disamb

Re: [fltk.development] [RFE] STR #2948: Add a method to Fl_Widget that returns its top-level window

2013-04-10 Thread Greg Ercolano
DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW. [STR Pending] Link: http://www.fltk.org/str.php?L2948 Version: 1.3-feature > as_window() Yes, that looks good.. I'll do some tests; want to make sure it inherits through all the window options we have (Fl_Gl

Re: [fltk.development] [RFE] STR #2948: Add a method to Fl_Widget that returns its top-level window

2013-04-10 Thread Albrecht Schlosser
DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW. [STR Pending] Link: http://www.fltk.org/str.php?L2948 Version: 1.3-feature Patch looks good, except what Manolo wrote already. We should remove this old and error-prone "w->type() >= FL_WINDOW" from the entire lib in

Re: [fltk.development] [RFE] STR #2948: Add a method to Fl_Widget that returns its top-level window

2013-04-10 Thread Greg Ercolano
DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW. [STR Pending] Link: http://www.fltk.org/str.php?L2948 Version: 1.3-feature > Can the knowledge of the top enclosing window of an object > be useful without knowledge of the object coordinates > relatively to this win

Re: [fltk.development] [RFE] STR #2948: Add a method to Fl_Widget that returns its top-level window

2013-04-10 Thread Manolo Gouy
DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW. [STR Pending] Link: http://www.fltk.org/str.php?L2948 Version: 1.3-feature - The last statement of the Fl_Widget::top_window() function may be written more simply: return w->as_window(); - I'm unsure this functio

Re: [fltk.development] [RFE] STR #2948: Add a method to Fl_Widget that returns its top-level window

2013-04-09 Thread Greg Ercolano
DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW. [STR Pending] Link: http://www.fltk.org/str.php?L2948 Version: 1.3-feature Attached file "test-top_window.cxx"... Link: http://www.fltk.org/str.php?L2948 Version: 1.3-feature#include #include #include #include

[fltk.development] [RFE] STR #2948: Add a method to Fl_Widget that returns its top-level window

2013-04-09 Thread Greg Ercolano
DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW. [STR Active] Link: http://www.fltk.org/str.php?L2948 Version: 1.3-feature This STR spawned from a discussion on fltk.development, Subject: "RFC: method to find top level window?" The suggestion is to add a method th