A Foole's Thoughts on the windowBoundingRect
Rob Cozens
rcozens at pon.net
Wed Jun 14 13:14:30 EDT 2006
Hi Everyone,
Not too long ago I challenged the conventional wisdom that focused on
an image's imageData rather than its text property as the essence of
the image.
Today, I'm foolesh enough to challenge referencing the
windowBoundingRect when maximizing a stack to full screen.
1. The windowBoundingRect can be set from the Message Box or any
handler to be any value you choose.
1a. Rev Dictionary: "By default, the windowBoundingRect is set to the
screenRect. On Mac OS systems, the default windowBoundingRect is
adjusted to leave room for the menu bar. On Windows systems, the
default windowBoundingRect is adjusted to leave room for the task bar."
But that's just the default.
2. The windowBoundingRect changes depending on whether you are running
a stack or a standalone, because the Rev IDE resets the
windowBoundingRect to some value other than the default. Create a
stack with the openStack handler "put the windowBoundingRect into field
1". Run it in the IDE and then as a standalone. In the first instance
the windowBoundingRect is (on my TPC in portrait screen orientation)
89,114,768,994; in the second it is 0,0,768,865 with the TPC Input
Panel visible and 0,0,768,994 with it hidden.
From Rev Dictionary v2.7.1, re screenRect: "Adding the working
adjective to either form returns the virtual co-ordinates of each
screen's working-area. The working-area of a screen is defined to be
the area not covered by OS furniture (such as the task bar [and TPC
Input Panel] on Windows, and the Dock and Menubar on Mac OSX)."
If one replaces "windowBoundingRect" with "working screenRect" in the
test above, the result is consistent whether running from a stack or a
standalone.
As an aside, it appears the Rev IDE does not reference the
windowBoundingRect when it maximizes a stack, because we see above that
the wBR changes depending on visibility of the TPC Input Panel while
the maximize logic never grows the stack to full screen if the TPC IP
is hidden when the M/M button is clicked.
I believe using the working screenRect rather than the
windowBoundingRect is preferable in these cases.
Rob Cozens
CCW, Serendipity Software Company
"And I, which was two fooles, do so grow three;
Who are a little wise, the best fooles bee."
from "The Triple Foole" by John Donne (1572-1631)
More information about the use-livecode
mailing list