Re: [Ql-Users] EasyPtr and rescalable windows.

2017-09-09 Thread Daniel Baum via Ql-Users
Thanks to everyone for your help.

I got it to work,

D.

On Sat, Sep 9, 2017 at 1:15 PM, Bob Spelten via Ql-Users <
ql-users@lists.q-v-d.com> wrote:

> Op Fri, 08 Sep 2017 19:59:28 +0200 schreef Daniel Baum via Ql-Users <
> ql-users@lists.q-v-d.com>:
>
> Hi all,
>>
>> I am trying to get my head around EasyPtr (again).
>>
>> I have been playing with the new ability to create resizable windows. This
>> turns out to be not terribly difficult, and I was able to create a
>> resizable version of the calculator from Norman Dunbar's tutorial without
>> suffering too much.
>>
>> However, creating a freely resizable version of QBase is dependent on
>> being
>> able to read the size of the newly resized window.and its components. I
>> have been unable to find any obvious way to do this.
>>
>> Does anyone know how this is accomplished?
>>
>> I use the following routine after every move or resize.
> It has the advantage of returning the actual values, because calculated
> values given to MDRAW for a new position or size can be adjusted by WMAN2.
> That may make X even and will always keep the window inside the screen,
> including shadow spaces.
>
> ::
>  DEFine PROCedure MENU_XYS (kanal%,wdef,xs%,ys%,xo%,yo%)
>  REM >>> get coords of current outline channel
>   wdef= MWDEF(#kanal%) : REM >>> get address working definition
>   xs%= PEEK_W(wdef +32): ys%= PEEK_W(wdef +34) : REM >>> get size
>   xo%= PEEK_W(wdef +36): yo%= PEEK_W(wdef +38) : REM >>> get position
>  END DEFine MENU_XYS
>  ::
>
> Bob
>
> --
> The BSJR QL software site at: "http://members.upc.nl/b.spelten/ql/;
> ___
> QL-Users Mailing List
>
___
QL-Users Mailing List


Re: [Ql-Users] EasyPtr and rescalable windows.

2017-09-08 Thread Norman Dunbar via Ql-Users
This might be handy too then, it's the official 68000 programmers manual, 
covering all the cpus:

http://www.nxp.com/docs/en/reference-manual/M68000PRM.pdf


Have fun.


Cheers,
Norm.
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.
___
QL-Users Mailing List


Re: [Ql-Users] EasyPtr and rescalable windows.

2017-09-08 Thread Daniel Baum via Ql-Users
Hi Norman,

I am familiar with your excellent Assembly Language book.

I will take a look at the toolkit that you mention; it certainly sounds as
if it could be used as a template for what I am looking for.

Come to think of it, I have actually never written any assembly language on
the QL, as far as I remember. The last time I attempted to write assembly,
it was 68000 code on an Atari ST. The ST went up into the attic in the
early 90s (it is still there), so it must have been before that.

D.

PS. Thanks for the great EasyPtr tutorial too.

On Sat, Sep 9, 2017 at 12:09 AM, Norman Dunbar via Ql-Users <
ql-users@lists.q-v-d.com> wrote:

> Evening Daniel,
>
> Re assembly language and writing extensions, my eBook has a few chapters
> on that. Help yourself to http://qdosmsq.dunbar-it.co.
> uk/downloads/QLToday/QL_Assembly.pdf.
>
> If you need to return two values, or four, then take a look at the
> DJTOOLKIT sources at https://github.com/SinclairQL/DJToolkit, you will be
> interested in the MAX_CON function which is passed a channel I'd and 4
> integers, and returns an error code as the result, plus updates the 4
> integers with the channel's window or console sizes and positions:
>
> **
> * error = MAX_CON #channel, x%, y%, xo%, yo% => returns an error and
> *updates the 4 (non-channel) parameters to be the
> *maximum sizes & positions that a CON channel is.
> **
>
> You could write something similar quite easily, I'm sure.
>
> HTH
>
> Cheers,
> Norm.
>
> --
> Sent from my Android device with K-9 Mail. Please excuse my brevity.
> ___
> QL-Users Mailing List
>
___
QL-Users Mailing List


Re: [Ql-Users] EasyPtr and rescalable windows.

2017-09-08 Thread Norman Dunbar via Ql-Users
Evening Daniel,

Re assembly language and writing extensions, my eBook has a few chapters on 
that. Help yourself to 
http://qdosmsq.dunbar-it.co.uk/downloads/QLToday/QL_Assembly.pdf.

If you need to return two values, or four, then take a look at the DJTOOLKIT 
sources at https://github.com/SinclairQL/DJToolkit, you will be interested in 
the MAX_CON function which is passed a channel I'd and 4 integers, and returns 
an error code as the result, plus updates the 4 integers with the channel's 
window or console sizes and positions:

**
* error = MAX_CON #channel, x%, y%, xo%, yo% => returns an error and
*updates the 4 (non-channel) parameters to be the
*maximum sizes & positions that a CON channel is.
**

You could write something similar quite easily, I'm sure.

HTH

Cheers,
Norm.

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.
___
QL-Users Mailing List


Re: [Ql-Users] EasyPtr and rescalable windows.

2017-09-08 Thread Daniel Baum via Ql-Users
Hi François,

Thanks for the pointer to Dilwyn's tutorial.

It is helpful but it doesn't contain what I was looking for. I did
eventually find the answer here:

http://www.qlforum.co.uk/viewtopic.php?f=3=1027

The solution involves PEEKing the window definition table, which is
effective, but not exactly obvious, at least if you've become unaccustomed
to 1980s programming conventions.

I have never written a Basic extension - it's a very long time since I last
attempted to write something in assembler, but this seems like a prime
candidate for my first attempt, assuming it doesn't already exist somewhere.

Rgds,

Daniel

On Fri, Sep 8, 2017 at 9:32 PM, François Van Emelen via Ql-Users <
ql-users@lists.q-v-d.com> wrote:

> Op 8/09/2017 om 19:59 schreef Daniel Baum via Ql-Users:
>
>> Hi all,
>>
>> I am trying to get my head around EasyPtr (again).
>>
>> I have been playing with the new ability to create resizable windows. This
>> turns out to be not terribly difficult, and I was able to create a
>> resizable version of the calculator from Norman Dunbar's tutorial without
>> suffering too much.
>>
>> However, creating a freely resizable version of QBase is dependent on
>> being
>> able to read the size of the newly resized window.and its components. I
>> have been unable to find any obvious way to do this.
>>
>> Does anyone know how this is accomplished?
>>
>> Thanks
>>
>> Daniel
>> ___
>> QL-Users Mailing List
>>
>>
>> Hi,
>
> Dilwyn have explained this in 'SCALING IN EASYPTR 4'. Can't remember the
> name of the file. Have a look at his website.
>
> François Van Emelen
>
>
>
>
> ___
> QL-Users Mailing List
___
QL-Users Mailing List

Re: [Ql-Users] EasyPtr and rescalable windows.

2017-09-08 Thread François Van Emelen via Ql-Users

Op 8/09/2017 om 19:59 schreef Daniel Baum via Ql-Users:

Hi all,

I am trying to get my head around EasyPtr (again).

I have been playing with the new ability to create resizable windows. This
turns out to be not terribly difficult, and I was able to create a
resizable version of the calculator from Norman Dunbar's tutorial without
suffering too much.

However, creating a freely resizable version of QBase is dependent on being
able to read the size of the newly resized window.and its components. I
have been unable to find any obvious way to do this.

Does anyone know how this is accomplished?

Thanks

Daniel
___
QL-Users Mailing List



Hi,

Dilwyn have explained this in 'SCALING IN EASYPTR 4'. Can't remember the 
name of the file. Have a look at his website.


François Van Emelen




___
QL-Users Mailing List