[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Resizing and moving a window?



There is a way, I think of finding out whether a window is in the
'stdState' (i.e. zoomed state) by looking at the grafPtr's record of the
content region.

The bounding box of the content region and the 'stdState' rectangle are
both given in global coordinates. Therefore if the control region bounding
box is identical to the 'stdState' rectangle, the window must be in the
'stdState'.

This routine toggles between the 'userState' and the 'stdState':

        if(${$ptr->contRgn->rgnBBox} eq ${$ptr->stdState}) {
            ZoomWindow($ptr, 7, 1)
        }
        else {
            ZoomWindow($ptr, 8, 1)
        }

So far as I see this is not documented anywhere and I would value opinions
as to whether or not it is a sound scheme.

I hope this is some help to Kevin Reid who originally raised the question
of resizing windows.

Alan Fry



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch