Alvin wrote:
> I just need to figure out how to determine if the window is already
> maximised :) Oh, and how to "restore" the window as well.
Here's a post showing how to do it under Microsoft Windows;
specifically, see the Is_Maximized(Fl_Window*) function in this posting:
http://fltk.org/newsgroups.php?s1+gfltk.general+v2+T0+Q%22maximize+the+window%2C+icons%22
For X11, I think Mike posted this link describing the list of
window manager "hints":
http://standards.freedesktop.org/wm-spec/wm-spec-1.3.html
Sorry, I didn't see any posts suggesting on how to do this in OSX.
Maybe someone on the core can accumulate all of these X11 and Windows
examples and roll it all up into the FLTK API, eg:
Fl_Window::maximize()
Fl_Window::minimize()
Fl_Window::normalize()
Fl_Window::ismaximized()
Fl_Window::isminimized()
Fl_Window::isnormalized()
..might be a nice way to do it.
Certainly this seems to come up a lot.
It's often been mentioned these are only 'hints' to the window
manager, and that it may not abide by them.. but a short sentence
or two for each in the docs should make this clear.
I'd try accumulating this stuff myself, but I don't know all the
ins and outs of this, such as whether maximize should fill both
screens on a dual monitor setup, or just one. (Maybe an optional
flag can be specified to maximize() for this)
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk