Re: [fltk.general] Fl_Choice list openning direction

2011-11-14 Thread MacArthur, Ian (SELEX GALILEO, UK)

 I'm using a Fl_Choice widget which is located at the very 
 bottom of a fullscreen window.
 
 The issue is that when the list is showing up, it is shown 
 downward and thus not in the window which makes it 
 practically unusable. Is there a way to change this behaviour ?
 
 I guess I have to go directly in Fl_Choice code... Where 
 should I look ?

Which version of fltk and which host platform?

There was a bug in fltk-1.3.something that was computing the screen
boundaries incorrectly and then positioning the popped up menus badly -
much like you describe.

This is fixed (I believe) in more recent tarballs, so you could try a
recent build - also I think fltk-1.1 got this right.

Or...?



SELEX Galileo Ltd
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 
3EL
A company registered in England  Wales.  Company no. 02426132

This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.


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


Re: [fltk.general] Fl_Choice list openning direction

2011-11-14 Thread Mathieu Peyréga
FLTK 1.3 svn up to date version...

I changed Fl_Choice.cxx handle method :

  case FL_PUSH:
if (Fl::visible_focus()) Fl::focus(this);
  J1:
if (Fl::scheme()
|| fl_contrast(textcolor(), FL_BACKGROUND2_COLOR) != textcolor()) {
  //v = menu()-pulldown(x(), y(), w(), h(), mvalue(), this);
  v = menu()-pulldown(x(), y(), w(), 0, mvalue(), this);
} else {
  // In order to preserve the old look-n-feel of white menus,
  // temporarily override the color() of this widget...
  Fl_Color c = color();
  color(FL_BACKGROUND2_COLOR);
  //v = menu()-pulldown(x(), y(), w(), h(), mvalue(), this);
  v = menu()-pulldown(x(), y(), w(), 0, mvalue(), this);
  color(c);
}
if (!v || v-submenu()) return 1;
if (v != mvalue()) redraw();
picked(v);
return 1;

(changed the calls to pulldown)
and this gives an acceptable behaviour to my opinion.

Regards,

Mathieu



  I'm using a Fl_Choice widget which is located at the very=20
  bottom of a fullscreen window.
 =20
  The issue is that when the list is showing up, it is shown=20
  downward and thus not in the window which makes it=20
  practically unusable. Is there a way to change this behaviour ?
 =20
  I guess I have to go directly in Fl_Choice code... Where=20
  should I look ?

 Which version of fltk and which host platform?

 There was a bug in fltk-1.3.something that was computing the screen
 boundaries incorrectly and then positioning the popped up menus badly -
 much like you describe.

 This is fixed (I believe) in more recent tarballs, so you could try a
 recent build - also I think fltk-1.1 got this right.

 Or...?



 SELEX Galileo Ltd
 Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS=
 14 3EL
 A company registered in England  Wales.  Company no. 02426132
 
 This email and any attachments are confidential to the intended
 recipient and may also be privileged. If you are not the intended
 recipient please delete it from your system and notify the sender.
 You should not copy it or use it for any purpose nor disclose or
 distribute its contents to any other person.
 


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


Re: [fltk.general] Fl_Choice list openning direction

2011-11-14 Thread Greg Ercolano
On 11/13/11 23:34, Mathieu Peyréga wrote:
 I'm using a Fl_Choice widget which is located at the very bottom of a 
 fullscreen window.
 The issue is that when the list is showing up, it is shown downward and 
 thus not in the window which makes it practically unusable. Is there a way to 
 change this behaviour ?
 I guess I have to go directly in Fl_Choice code... Where should I look ?

Assuming its not a bug..

When the Fl_Choice menu runs off the edge of the screen,
you still should be able to move the mouse to the screen
edge, and it should auto-scroll.

If it's not, let us know which platform and which specific
version of fltk. (fltk 1.3.0, or 1.3.x svn current)

The Fl_Choice widget is unusual in that when you click on it,
it tries to position the menu such that the currently
chosen option is under the mouse when the menu opens.
This means the menu may have to roll off the screen edge
in order to do that, and is why it supports auto-scrolling.

Other menus like Fl_Menu_Button, Fl_Menu_Bar, etc. are able
to open menus to avoid screen edges when possible because
there's no restrictions on the menu's position when it opens.
___
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk


Re: [fltk.general] Fl_Choice list openning direction

2011-11-14 Thread Greg Ercolano
On 11/14/11 08:26, Greg Ercolano wrote:
 On 11/13/11 23:34, Mathieu Peyréga wrote:
 I'm using a Fl_Choice widget which is located at the very bottom of a 
 fullscreen window.
 The issue is that when the list is showing up, it is shown downward and 
 thus not in the window which makes it practically unusable. Is there a way 
 to change this behaviour ?
 I guess I have to go directly in Fl_Choice code... Where should I look ?
 
   Assuming its not a bug..
 
   When the Fl_Choice menu runs off the edge of the screen,
   you still should be able to move the mouse to the screen
   edge, and it should auto-scroll.
 
   If it's not, let us know which platform and which specific
   version of fltk. (fltk 1.3.0, or 1.3.x svn current)

BTW, while running the test/menubar app to test the above,
I noticed some other problems with how menus open which I've
reported in STR #2770:
http://fltk.org/str.php?L2770
___
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk


[fltk.general] Fl_Choice list openning direction

2011-11-13 Thread Mathieu Peyréga
Hello,

I'm using a Fl_Choice widget which is located at the very bottom of a 
fullscreen window.

The issue is that when the list is showing up, it is shown downward and thus 
not in the window which makes it practically unusable. Is there a way to change 
this behaviour ?

I guess I have to go directly in Fl_Choice code... Where should I look ?

Best regards,

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