Application pane size: determining at run time

Robert STRANDH <[email protected]> Thu, 8 Jan 2004 06:18:10 +0100
Newsgroups gmane.lisp.clim
Message-ID <[email protected]>
Paolo Amoroso writes:
 > Is it possible to determine the size of an application pane at run
 > time? 

[I haven't read the spec for a while, so I might be misremembering
things, but here is what I remember.] 

An application pane is a sheet which has an infinite drawing area, so
the size of an application pane does not make sense.  

 > If SHEET-REGION is passed an application pane as an argument, is
 > the function guaranteed to return a rectangle, or maybe a bounding
 > rectangle?

As far as I remember, you cannot be sure that it returns a rectangle,
and it does not necessarily return a bounding rectangle (though it
might, since the standard regions are all subclasses of
bounding-rectangle).  But you can compute the bounding rectangle of
the region by using the function bounding-rectangle*.

A better choice would be to use window-viewport which returns the
visible region of the application pane if it contained in a scroller
pane, and the sheet region otherwise. 

Hope this helps.
-- 
Robert Strandh

---------------------------------------------------------------------
Greenspun's Tenth Rule of Programming: any sufficiently complicated C
or Fortran program contains an ad hoc informally-specified bug-ridden
slow implementation of half of Common Lisp.
---------------------------------------------------------------------
--
[To unsubscribe to this list send an email to "[email protected]"
with the following text in the BODY of the message "unsubscribe clim"]