Ralf Reköndt wrote: > many years ago, I was thinking about the way, QLib handles it's own > "Applikation Window" under PE. I do not really think, it heavily uses WMAN, > but I always wanted to know, how it does, what it does.
Actually it doesn't use WMAN at all. They've implemented their own little WMAN (in BASIC, nonetheless). Long story short: the loose item highlight is drawn in BASIC and if no PE is present changed according to the cursor keys as any other none-PE program could do. If the PE ist present WM_RPTR is called (the Basic routine mentioned, not the WMAN vector WM.RPTR! Remember, WMAN is not used. The routine uses IOP.RPTR internally), which (among others) returns when the mouse is moved. If it is, FWIND is called which apparently looks through an array of coordinates of the loose items to find whether one of them is under the mouse pointer. If yes and it's a different one, the highlight is changed and it's back to WM_RPTR. So nothing really special here, the routines are really just a thin wrapper around PTR_GEN, the only exception being FWIND which is used to speed up hit testing but in itself is very very simple and could be implemented in BASIC if it wasn't for speed concerns back then. You can do the same with any PE toolkit, like QPTR, EasyPtr and I'm sure TurboPtr, too. Marcel _______________________________________________ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
