[Overview][Constants][Types][Procedures and functions][Variables][Index] Reference for unit 'Intuition' (#aros)

ScreenPosition

Move screens with greater control.

Declaration

Source position: intuition.pas line 3312

procedure ScreenPosition(

  Screen: PScreen;

  Flags: LongWord;

  X1: LongInt;

  Y1: LongInt;

  X2: LongInt;

  Y2: LongInt

);

Arguments

Screen

  

A pointer to a Screen structure

Flags

  

Set to one of SPOS_RELATIVE, SPOS_ABSOLUTE, or SPOS_MAKEVISIBLE. You may additionally set SPOS_FORCEDRAG if you need. Use SPOS_RELATIVE (zero) for normal use (move screen a relative amount expressed by x1,y1). Set the SPOS_ABSOLUTE flag if you wish x1 and y1 to be absolute coordinates to move the screen to. Set SPOS_MAKEVISIBLE to position an oversized scrolling screen so that the rectangle described by (x1,y1)-(x2,y2) is on the visible part of the display. (A word-processor may wish to support autoscrolling as the user types. In that case, it could call ScreenPosition() with the SPOS_MAKEVISIBLE flag and a rectangle that encompasses the cursor with some space around it. In addition to any one of the above choices, you can additionally set SPOS_FORCEDRAG if you wish to reposition a screen that was opened with the [SA_Draggable, False] attribute.

X1

  

Absolute position or change in position you wish to apply to the screen, when using SPOS_ABSOLUTE or SPOS_RELATIVE.

Y1

  

When using SPOS_MAKEVISIBLE, these variables describe the upper-left corner of the rectangle you would like to ensure is on the visible part of a scrolling screen.

X2

  

Ignored when using SPOS_ABSOLUTE or SPOS_RELATIVE. When using SPOS_MAKEVISIBLE, these variables describe the lower-right corner of the rectangle you would like to ensure is on the visible part of a scrolling screen.

Y2

  

Note that these coordinates are in the same resolution as the screen (such as HIRES or INTERLACE)

Description

Moves the screen to the specified position or by the specified increment, in screen pixel resolution coordinates.

If the x1 and y1 variables you specify would move the screen in a way that violates any restrictions, the screen will be moved as far as possible. You may examine the LeftEdge and TopEdge fields of the Screen structure after this function returns to see where the screen really ended up.

Note that negative values for screen LeftEdge and TopEdge are valid for screens bigger than their display clip.

See also

MoveScreen

  

Attempt to move the screen by the increments provided.

RethinkDisplay

  

Grand manipulation of the entire Intuition display.


Documentation generated on: 2017-01-10