get_window_extents ( : : WindowHandle : Row, Column, Width, Height )

Information about a window's size and position.

get_window_extents returns the position of the upper left corner, as well as width and height of the output window.


Attention

Size and position of a window may be modified by the window manager, without explicit instruction in the program. Therefore the values which are returned by get_window_extents may change cause of side effects.


Parameters

WindowHandle (input_control)
window -> integer
Window identifier.

Row (output_control)
rectangle.origin.y -> integer
Row index of upper left corner of the window.

Column (output_control)
rectangle.origin.x -> integer
Column index of upper left corner of the window.

Width (output_control)
rectangle.extent.x -> integer
Window width.

Height (output_control)
rectangle.extent.y -> integer
Window height.


Example
open_window(100,100,200,200,'root','visible','',WindowHandle) 
fwrite_string('Move the window with the mouse!') 
fnew_line() 
repeat() 
get_mbutton(WindowHandle,_,_,Button) 
get_window_extents(WindowHandle,Row,Column,Width,Height) 
fwrite(['('Row,',',Column,')']) 
fnew_line() 
until(Button = 4).

Result

If the window is valid get_window_extents returns 2 (H_MSG_TRUE). If necessary an exception handling is raised.


Parallelization Information

get_window_extents is reentrant, local, and processed without parallelization.


Possible Predecessors

open_window, set_draw, set_color, set_colored, set_line_width, open_textwindow


See also

set_window_extents, open_window, open_textwindow


Module

Foundation



Copyright © 1996-2008 MVTec Software GmbH