QPTR Toolkit Window Redefine

Anything QL Software or Programming Related.
Post Reply
Derek_Stewart
Font of All Knowledge
Posts: 3958
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

QPTR Toolkit Window Redefine

Post by Derek_Stewart »

Hi,

I have been looking at the QPTR Toolkit, which has some example programmes to open a QPTR Window, place some loose items, allow moving of the primary window.

I do not see an QPTR Toolkit function to allow changing the dimensions of the primary window.

I thought about changing the initial parameters of the primary window, but this does not seem the right way to do this.

Can anyone help here?
Last edited by Derek_Stewart on Tue Mar 12, 2024 4:05 pm, edited 1 time in total.


Regards,

Derek
User avatar
pjw
QL Wafer Drive
Posts: 1300
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: QPTR Toolkit Window Redefine

Post by pjw »

Without more details its hard to say. You may have to poke the scaling flags into your window definition. Then use CH_WIN to make the changes.
QPTR is a hard slog, although the documentation is invaluable. EasyPtr is much easier to use!
Wolfgang only uses Qptr, I believe, so he's the one to ask ;) Or look at some of his programs. Usually the source code is included.


Per
dont be happy. worry
- ?
User avatar
tofro
Font of All Knowledge
Posts: 2701
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: QPTR Toolkit Window Redefine

Post by tofro »

Derek,

In principly, a PE window (if that's what you're asking) is resized just like any other QDOS window: Using WINDOW in S*Basic or some form of command that in essence boils down to a SD.WDEF trap. This will resize the window, as long as it fits into the available outline.

When the QPTR toolkit was designed, there was no way to resize menu definitions (If that is what you're asking). The only way to write applications with menus that can change their size, was to provide various menu definitions like "small", "medium", "large", and have WMAN decide initially which fits best for your requested window size.

Scalable windows were introduced later - In the menu definition, you have to set the scaling flags to allow the window manager to re-size a window outside fixed boundaries. Once that is done, you can resize the menu with the CH_WIN QPTR PROCedure.

Today, I would not recommend to even look at QPTR toolkit anymore (Wolfgang might probably disagree...) - It is way too cumbersome to write applications with it, EasyPTR is much easier (hence the name ;) ).

Tobias


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
Derek_Stewart
Font of All Knowledge
Posts: 3958
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: QPTR Toolkit Window Redefine

Post by Derek_Stewart »

Hi,

I think you are correct, in that EasyPTR is the seat way to do to resize a PE window.

I was just trying to understand the QPTR Toolkit documentation.


Regards,

Derek
User avatar
NormanDunbar
Forum Moderator
Posts: 2274
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: QPTR Toolkit Window Redefine

Post by NormanDunbar »

Derek_Stewart wrote:I was just trying to understand the QPTR Toolkit documentation.
Many have tried Derek! ;)


Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts

No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
Post Reply