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 function would be useful. Can the knowledge of
the top enclosing window of an object be useful without knowledge of 
the object coordinates relatively to this window?
May be what is needed would be along this line:
Fl_Window* Fl_Widget::top_window_offset(int xoff, int yoff)


Link: http://www.fltk.org/str.php?L2948
Version: 1.3-feature

___
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev


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 window?

Simple case would be a widget (say a button) that wants to hide
the window its in. If the button is in a subwindow, window() wouldn't
work, bot top_window() would.

 May be what is needed would be along this line:
 Fl_Window* Fl_Widget::top_window_offset(int xoff, int yoff)

Actually just added such a thing in r9866 a few days ago to solve
STR#2944, but called it window_offset(). Perhaps I should add top_
to it though.. its not too late.


Link: http://www.fltk.org/str.php?L2948
Version: 1.3-feature

___
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev


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 favor
of as_window().

WRT window_offset() vs. top_window_offset(): I strongly vote for the
latter and consistent naming, i.e. top_window() and top_window_offset().

+1 for the patch with mods as written.


Link: http://www.fltk.org/str.php?L2948
Version: 1.3-feature

___
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev


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_Window, etc)

 window_offset() vs. top_window_offset(): I strongly vote for
 the latter and consistent naming

Agreed.

Will make changes and implement.

 We should remove this old and error-prone w-type() = FL_WINDOW
 from the entire lib in favor of as_window().

OK, I'll try to handle that too, but as a separate commit.


Link: http://www.fltk.org/str.php?L2948
Version: 1.3-feature

___
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev


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 disambiguate:

o There's currently a method Fl_Window::top_window_offset()
  (just renamed it from window_offset() in r9870)

o We're proposing in this STR a new Fl_Widget::top_window().

I can see where the existing top_window_offset() should really
be a method of Fl_Widget, not just Fl_Window.. so that even
non-windows can find their offset relative to the top window
to be more useful.

So will look into changing that as well.


Link: http://www.fltk.org/str.php?L2948
Version: 1.3-feature

___
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev


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)
  and moved it near top_window() and window().


Link: http://www.fltk.org/str.php?L2948
Version: 1.3-feature

___
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev


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?L2948
Version: 1.3-feature
Fix Version: 1.3-current (r9871)

___
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev


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't realize that it was Fl_Window:: before.


Link: http://www.fltk.org/str.php?L2948
Version: 1.3-feature
Fix Version: 1.3-current (r9871)

___
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev


Re: [fltk.development] fltk and high res retina display?

2013-04-10 Thread Evan Laforge
On Fri, Apr 5, 2013 at 2:21 AM, Christophe Geuzaine cgeuza...@ulg.ac.be wrote:
 Adding

 keyNSHighResolutionCapable/keytrue/

Indeed, that did the trick!  Thanks so much!  I updated my make_bundle
script, presumably fltk could do the same with the official one,
provided there are no side-effects on non-retina systems.

 in the app's Info.plist makes standard FLTK widgets/fonts draw fairly well 
 (there are some small artifacts and off-by-one line drawings here and 
 there, but nothing major). OpenGL windows are still drawn at half-resolution, 
 though...

Yeah, I remember the Apple docs said that opengl, being pixel based,
isn't quite so simple to convert to retina.

___
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev