Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.acorn.programmer > #5702 > unrolled thread

Re-Sizing a window's work area.

Started byusenet@garethlock.com
First post2019-03-06 03:59 -0800
Last post2019-03-06 23:27 +0000
Articles 8 — 4 participants

Back to article view | Back to comp.sys.acorn.programmer


Contents

  Re-Sizing a window's work area. usenet@garethlock.com - 2019-03-06 03:59 -0800
    Re: Re-Sizing a window's work area. Martin <News03@avisoft.f9.co.uk> - 2019-03-06 12:45 +0000
    Re: Re-Sizing a window's work area. News <chrisjohnson@spamcop.net> - 2019-03-06 13:08 +0000
      Re: Re-Sizing a window's work area. usenet@garethlock.com - 2019-03-06 07:25 -0800
        Re: Re-Sizing a window's work area. Martin <News03@avisoft.f9.co.uk> - 2019-03-06 16:19 +0000
        Re: Re-Sizing a window's work area. News <chrisjohnson@spamcop.net> - 2019-03-06 16:24 +0000
          Re: Re-Sizing a window's work area. Steve Fryatt <news@stevefryatt.org.uk> - 2019-03-06 18:16 +0000
            Re: Re-Sizing a window's work area. News <chrisjohnson@spamcop.net> - 2019-03-06 23:27 +0000

#5702 — Re-Sizing a window's work area.

Fromusenet@garethlock.com
Date2019-03-06 03:59 -0800
SubjectRe-Sizing a window's work area.
Message-ID<f922c21f-e7c7-4ec1-9e0c-30e81ae16222@googlegroups.com>
Can one re-size a window's work area on the fly, after a window has been created?

I'm working on !Lorum again after finally sorting out the window redraw dance. I even have scroll events sorted. The one problem I have is that I don't know the size of the output until after I create the window.

The easy way around this is to increase / decrease the work area in the Y direction to fit the output length and scroll accordingly.

[toc] | [next] | [standalone]


#5703

FromMartin <News03@avisoft.f9.co.uk>
Date2019-03-06 12:45 +0000
Message-ID<579080c01fNews03@avisoft.f9.co.uk>
In reply to#5702
On 06 Mar in article
<f922c21f-e7c7-4ec1-9e0c-30e81ae16222@googlegroups.com>,
   <usenet@garethlock.com> wrote:
> Can one re-size a window's work area on the fly, after a window has
> been created?

Certainly. See SWI Wimp_SetExtent

-- 
Martin Avison 
Note that unfortunately this email address will become invalid
without notice if (when) any spam is received. 

[toc] | [prev] | [next] | [standalone]


#5704

FromNews <chrisjohnson@spamcop.net>
Date2019-03-06 13:08 +0000
Message-ID<579082e6e5chrisjohnson@spamcop.net>
In reply to#5702
In article <f922c21f-e7c7-4ec1-9e0c-30e81ae16222@googlegroups.com>,
   <usenet@garethlock.com> wrote:
> Can one re-size a window's work area on the fly, after a window has
> been created?

Wimp_SetExtent.

-- 
Chris Johnson

[toc] | [prev] | [next] | [standalone]


#5706

Fromusenet@garethlock.com
Date2019-03-06 07:25 -0800
Message-ID<b8459245-0960-4bd3-8638-0f26a7366d17@googlegroups.com>
In reply to#5704
Ok... Thanks all... Just working out how to best implement it in code.

I'm assuming you can use the same call to shrink as well...

[toc] | [prev] | [next] | [standalone]


#5708

FromMartin <News03@avisoft.f9.co.uk>
Date2019-03-06 16:19 +0000
Message-ID<5790945a5dNews03@avisoft.f9.co.uk>
In reply to#5706
On 06 Mar in article
<b8459245-0960-4bd3-8638-0f26a7366d17@googlegroups.com>,
   <usenet@garethlock.com> wrote:
> Ok... Thanks all... Just working out how to best implement it in
> code.

> I'm assuming you can use the same call to shrink as well...

Yup 
But see restriction re visible area (see PRMs or StrongHelp manual)

-- 
Martin Avison 
Note that unfortunately this email address will become invalid
without notice if (when) any spam is received. 

[toc] | [prev] | [next] | [standalone]


#5709

FromNews <chrisjohnson@spamcop.net>
Date2019-03-06 16:24 +0000
Message-ID<579094d95echrisjohnson@spamcop.net>
In reply to#5706
In article <b8459245-0960-4bd3-8638-0f26a7366d17@googlegroups.com>,
   <usenet@garethlock.com> wrote:
> Ok... Thanks all... Just working out how to best implement it in
> code.

> I'm assuming you can use the same call to shrink as well...

Yes. The caveat is that you cannot make the new work area smaller
than the current size of the visible window. If you do need to shrink
it smaller than the current size then call Wimp_OpenWindow with a
very small size, change the extent, then do another Wimp_OpenWindow
at your new required size.

The SWI takes only two parameters. R0 = window handle. R1 is a
pointer to a block - new min x, new min y, new max x, new max y.

-- 
Chris Johnson

[toc] | [prev] | [next] | [standalone]


#5710

FromSteve Fryatt <news@stevefryatt.org.uk>
Date2019-03-06 18:16 +0000
Message-ID<mpro.pnyirz00ec4k301ph.news@stevefryatt.org.uk>
In reply to#5709
On 6 Mar, News wrote in message
    <579094d95echrisjohnson@spamcop.net>:

> The caveat is that you cannot make the new work area smaller than the
> current size of the visible window. If you do need to shrink it smaller
> than the current size then call Wimp_OpenWindow with a very small size,
> change the extent, then do another Wimp_OpenWindow at your new required
> size.

Can't you just call Wimp_OpenWindow to size and scroll the window as
required, then call Wimp_SetExtent?  Is the double call to Wimp_OpenWindow
necessary?

-- 
Steve Fryatt - Leeds, England

http://www.stevefryatt.org.uk/

[toc] | [prev] | [next] | [standalone]


#5711

FromNews <chrisjohnson@spamcop.net>
Date2019-03-06 23:27 +0000
Message-ID<5790bb94aachrisjohnson@spamcop.net>
In reply to#5710
In article <mpro.pnyirz00ec4k301ph.news@stevefryatt.org.uk>,
   Steve Fryatt <news@stevefryatt.org.uk> wrote:
> Can't you just call Wimp_OpenWindow to size and scroll the window
> as required, then call Wimp_SetExtent?  Is the double call to
> Wimp_OpenWindow necessary?

Yes, you are right - I was overthinking it.

-- 
Chris Johnson

[toc] | [prev] | [standalone]


Back to top | Article view | comp.sys.acorn.programmer


csiph-web