Craig D wrote:
> I have a TextDisplay that I toggle (show/hide) with a button. The problem is 
> if the TextDisplay is obscured, I'd like the button to raise it to the top of 
> the stack instead of hiding it (which show does) but I don't know if the 
> TextDisplay is obscured (ie visible & visible_r both return true once show 
> has been called, even when the TD is completely covered).

        Telling the *parent window* to show() should pop it to the front.
        I assume by 'stacking order' you mean the stacking order of the window
        the TextDisplay is in.

> Any suggustions on how to tell if a widget is partially or totaly obscured 
> (testing for top of stack would work in this case)?

        No, I don't think you can determine where your window is in the global
        window manager stacking order.. not through FLTK anyway. Possibly 
through
        the native window manager, but hopefully you don't need to do that. Just
        show()ing the window will pop it if it's below other windows, and will 
have
        no effect if it's already at the top.

> Thanks,Craig
> ps - the documentation for visible_r doesn't match the behavior I'm seeing 
> (which is on WinXP):
> Returns true if the widget and all of its parents are visible. Only if this 
> is true can the user see the widget

        By "visible" it means it's not hidden with hide(), and should be visible
        unless obscured by other windows.

        Window obscuring, TMK, is never considered.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to