Stan wrote:
> [..]
>>>>    In this case, FLTK is just passing the values on to the
>>>>       window manager, and the wm 'does what it does' with the
>>      but the window manager gets the "last say",
> [..]
> 
> One reason among many to use a toolkit like fltk is to abstract
> away platform differences.  In fact, fltk does this quite well.
> In rare cases the toolkit is at the mercy of the platform, and
> the documentation can, should, and usually does identify these
> cases.
> 
> If size_range() is such a case the doc can just say so, as it
> does elsewhere.  To be frank, I suspect it isn't, because
> the X window manager has no problem supplying a window with
> a width restriction and no height restriction, and if
> size_range(W, 0) doesn't express that, it's an odd interface
> indeed.

        Looking back at your original post, if you're saying size_range(W,0)
        is setting (changing?) the windows height to zero, that sounds like
        an FLTK bug, as size_range() shouldn't change the size of the window.

        I don't see this myself, though. At least not on linux with fltk-1.1.x;
        when I set my window's minh to zero, the window opens normally,
        and is not scrunched to any different height, and esp. not zero height.

        Example:

#include <FL/Fl.H>
#include <FL/Fl_Window.H>
int main() {
    Fl_Window *win = new Fl_Window(400,300,"Example Wizard");
    win->end();
    win->size_range(400,0);     // minw, minh
    win->show();
    return(Fl::run());
}

        In noodling with the above, it seems that the '0' tells FLTK to keep
        the default; if I set 'minh=0', I can't make my window smaller than
        about 50 pixels before it 'stops'. This is the same as the default
        behavior, ie. if I comment out size_range() altogether, so it is
        likely a 'default'.

        If I change the minh=0 to minh=5, then it will let me size the
        window down to 5 pixels in height.

        The docs don't indicate zero as being a special value for minw/minh,
        so I'd say that's an omission and needs an STR (#1796)
        http://fltk.org/str.php?L1796

        If you're seeing the behavior you described where the window size
        is scrunched down to zero when you set the size_range(), I'd definitely
        recommend reporting that as a separate bug. (esp. if the above program
        works as you describe in the original post)

> Anyway, let's drop it.

        The thread may have deviated from your original intent.. to report
        a buggy behavior. Might be my fault it derailed.

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

Reply via email to