On 14 Jun 2009, at 00:22, Frank-Guido Dibowski wrote:


I want to manage for example a QL-Screen picture (512x256) or a text- file on a application subwindow (200x100) with pan and scroll bars (like QDesign or QD
(Sorry Jochen, not with QMenu ;-)) but i don't know how.
I work with EasyPtr4, C68 and a little bit assembler.
Can everybody help me?


Application Windows

Pan and scroll bars can be produced as part of an "application window" by the use of the PE software window manager vectors WM.INDEX and WM.MDRAW. If SETW is used to produce a window definition (for TurboPTR, CPTR and EayPEasy) containing an application window with items, scroll bars and arrows are automatically produced when the working definition is set up if the application window is too small to show all the items.

Sometimes you may want to set items to an application window after the program has started. An example is showing the directory of FLP1. In this case TurboPTR has the function "set_ap" which does this, with scroll bars and arrows if needed. The same can be done in assembler using EasyPEasy which provides the subroutine "set_ap". The example EX2 is available in TurboPTR and EasyPEasy. This shows in detail how it works.

QD Type Scrolling

The movement of text in QD can be done by using the vertical scroll bar. There are no arrows. I have done this in my programs by using the Trap IO.RPTR to read the pointer instead of the vector WM.RPTR. I detect when the left mouse key is pressed when the pointer is inside a scroll bar. I make the icon invisible until the key is lifted and move the scroll bar as the mouse is moved. The way this is done is shown in the example EX4 in TurboPTR and in EasyPEasy.

One problem with using IOP.RPTR instead of WM.RPTR is that you have to program for the detection of loose items both to draw and undraw borders round them when the pointer is on them or has moved away from them and also to activate the loose items when the mouse key is clicked.

In CPTR, the example EX2 shows text being displayed with scroll bars when the window is too small.


George
_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm

Reply via email to