| 
 
  
    | 
    
    
    Command | 
    
    
    POSN | 
   
  
    | 
    
      | 
    
  | 
   
  
    | 
    Description | 
    
        Position Cursor  X,Y or +X or –X or X, Y, 
        Name/Page. 
        The cursor can be positioned on the display using absolute co-ordinates 
        or moved in 
        relation to it’s current position by using +/- offset values.
        The origin is located at the top left of the screen. 
          
        Re-position a previously placed entity by specifying the new 
        coo-ordinates and it's name. 
        This can be useful for indicator bars, simple movement animations and 
        moving text.  
         
        It may be necessary to place the cursor on another page to create a new 
        entity. | 
       
    
    | 
    
      | 
    
  | 
   
  
    | 
    
    Syntax/Parameters | 
    
    POSN(X,Y,Name/Page) | 
   
  
    | 
    
      | 
    
  | 
   
  
    | 
    Options | 
    
  Move multiple entities at the same time - v47.12 
  Multiple entities can be moved at the same time 
  POSN(x0,y0,Ent1,Ent2,Ent3,Ent4,...); 
        POSN(+10,+10,Img1,keyup,keydn); moves both image and keys 10 pixels in X and Y 
  direction 
        This is useful for slider bars where the bar image, key up and 
        key down objects move in sync. 
         
        Move with update=changed - v49.19 
        Movement of entities  POSN(x,y,ent); when update=changed supported. 
     
    
    POSN in DRAW, IMG, TEXT and KEY Commands-vv49.37 
    * Added initial positioning to commands: 
    a) DRAW(name,width,style,x,y); 
    DRAW(name,width,height,style,x,y); 
    DRAW(name,width,height,start,arc,style,x,y); 
    b) IMG(name,src,style,x,y); 
    c) TEXT(name,text,style,x,y); 
    d) KEY(name,func,width,height,style,x,y); 
    KEY(name,downFunc,upFunc,width,height,style,x,y); 
    KEY(name,downFunc,upFunc,repFunc,width,height,style,x,y); | 
   
  
    | 
    
      | 
    
  | 
   
  
    | 
    Example | 
    
        
        POSN(+25,+0);  moves the cursor 25 
        pixels to the right. 
        POSN(236,48); absolute position of x=236, y=48. 
        POSN(24,56,CalcPage); position cursor on calc page at x=24, y=56. 
        POSN(VarX,Vary); use variables with absolute values to control position of cursor 
        POSN(VarX,Vary,VertBar); use variables to move an entity - vertical bar 
        POSN(TOUCHX,TOUCHY,MyRectCursor); move a cursor to the contact point on 
        the screen.   
     
    Example 
        
STYLE(stPage, PAGE) { back=black; update=changed; } 
STYLE(stCircFg, DRAW) { type=Circle; col=white; } 
STYLE(stCircBg, stCircFg) { col=black; } 
             
VAR(x,0,S16); 
VAR(y,0,S16); 
             
PAGE(pgMain, stPage) 
{ 
POSN(x,y); 
DRAW(circBg, 60, 60, stCircBg); 
DRAW(circFg, 60, 60, stCircFg);  
LOOP(lpMain, FOREVER) 
{ 
POSN(x,y,circBg); 
LOAD(x,TOUCHX); 
LOAD(y,TOUCHY); 
POSN(x,y,circFg);; 
} 
} 
SHOW(pgMain); 
             
Note: It is advised not to move entities unless necessary as the rendering times are greatly increase
      
      
       | 
   
  
    | 
    
      | 
    
  | 
   
 
    
    | 
    Update Information | 
	
	
  
    
		
             Version  | 
			 Title  | 
			Date    | 
             Details  | 
   		 
        
            49.58  | 
             POSN  | 
            07 Sep 15   | 
			 | 	
		 
        
            * Current page position can be read using built in variables POSNX and POSNY 
             |  
            
                
                
                
                
             |    					
         
 
        
            49.58  | 
             POSN  | 
            07 Sep 15   | 
			 | 	
		 
        
            * Parameters can now by array type variables 
             |  
            
                
                
                
                
             |    					
         
 
        
            49.37  | 
             POSN in DRAW, IMG, TEXT and KEY Commands  | 
            10 Jun 13   | 
			 | 	
		 
        
            * Added initial positioning to commands:   a) DRAW(name,width,style,x,y);      DRAW(name,width,height,style,x,y);      DRAW(name,width,height,start,arc,style,x,y);   b) IMG(name,src,style,x,y);   c) TEXT(name,text,style,x,y);   d) KEY(name,func,width,height,style,x,y);      KEY(name,downFunc,upFunc,width,height,style,x,y);      KEY(name,downFunc,upFunc,repFunc,width,height,style,x,y);
  
             |  
            
                
                
                
                
             |    					
         
 
        
            49.19  | 
             POSN() - Support for moving entities POSN(x,y,ent); when update=changed added.  | 
            05 Oct 12   | 
			 | 	
		 
        
            Support for moving entities POSN(x,y,ent); when update=changed added. * Example:   STYLE(stPage, PAGE) { back=black; update=changed; }   STYLE(stCircFg, DRAW) { type=Circle; col=white; }   STYLE(stCircBg, stCircFg) { col=black; }      VAR(x,0,S16);   VAR(y,0,S16);      PAGE(pgMain, stPage)   {     POSN(x,y);     DRAW(circBg, 60, 60, stCircBg);     DRAW(circFg, 60, 60, stCircFg);      LOOP(lpMain, FOREVER)     {       POSN(x,y,circBg);       LOAD(x,TOUCHX);       LOAD(y,TOUCHY);       POSN(x,y,circFg);;     }   }   SHOW(pgMain);
  * Note: It is advised not to move entities unless necessary as the rendering times are greatly increase 
             |  
            
                
                
                
                
             |    					
         
 
        
            48.24  | 
             POSN() - POSN( x, y, ent ); now moves the entity 'ent' on all pages it appears on.   | 
            10 Mar 12   | 
			 | 	
		 
        
            POSN( x, y, ent ); now moves the entity 'ent' on all pages it appears on. This resolves a problem where an entity is moved before the page is displayed. 
             |  
            
                
                
                
                
             |    					
         
 
        
            47.12  | 
             POSN - extended to move multiple entities at the same time.  | 
            09 Sep 11   | 
			 | 	
		 
        
            extended to move multiple entities at the same time * Multiple entities can now be moved at the same time POSN(x0,y0,Ent1,Ent2,Ent3,Ent4,...);    POSN(+10,+10,Img1,Img2); moves both images 10 pixels in X and Y direction    This is useful for slider bars where the bar image, key up and key down objects move in sync. 
             |  
            
                
                
                
                
             |    					
         
 
        
            44.00  | 
             Entities Movement - When POSN(+x,+y,entname); is used, all entities with that name are moved.  | 
            20 May 11   | 
			 | 	
		 
        
            When POSN(+x,+y,entname); is used, all entities with that name are moved,         not just the first. 
             |  
            
                
                
                
                
             |    					
         
 
        
            39.00  | 
             Position - The POSN() command now takes any combination of integers/vars/pointers.  | 
            21 Jan 11   | 
			 | 	
		 
        
            The POSN() command now takes any combination of integers/vars/pointers. 
             |  
            
                
                
                
                
             |    					
         
 
        
            35.00  | 
             Cursor Positions - New options to simplify cursor positioning.  | 
            12 Nov 10   | 
			 | 	
		 
        
            To simplify cursor positioning, the following options now supported:        CC                    - centre, centre        TL or LT           - top, left        TC or CT           - top, centre        TR or RT           - top, right        RC or CR           - right, centre        BR or RB           - bottom, right        BC or CB           - bottom, centre        BL or LB           - bottom, left        LC or CL           - left, centre 
             |  
            
                
                
                
                
             |    					
         
 
        
            27.00  | 
             POSN - Corrected cursor centering positioning.  | 
            10 Sep 10   | 
			 | 	
		 
        
            Corrected cursor centering positioning (was 1 pixel in error). 
             |  
            
                
                
                
                
             |    					
         
 
        
            25.00  | 
             POSN Command  - Command now supports moving entities on the page.  | 
            03 Sep 10   | 
			 | 	
		 
        
            Command now supports moving entities on the page If Name is not a Page, the entity Name on the current page is moved to position x,y. If Name is a Page, the cursor is set to position x,y
  POSN(x,y,Name); moves entity to x,y 
             |  
            
                
                
                
                
             |    					
         
 
        
            23.00  | 
             POSN - Absolute cursor can now also be set using variables:  | 
            17 Aug 10   | 
			 | 	
		 
        
            Absolute cursor can now also be set using variables:   eg POSN(VarX,VarY[,PageName]); 
             |  
            
                
                
                
                
             |    					
         
 
        
            21.00  | 
             STYLE - Fixed error with default style initialization.   | 
            30 Jul 10   | 
			 | 	
		 
        
            Fixed error with default style initialization. Style parameter names for POSN, PAGE, TEXT, DRAW, IMAGE, KEY set up 
             |  
            
                
                
                
                
             |    					
         
 
   
	 
     
	 | 
 
 
 |