get_window_extentsπ
Short descriptionπ
get_window_extents β Information about a windowβs size and position.
Signatureπ
get_window_extents( window WindowHandle, out rectangle.origin.y Row, out rectangle.origin.x Column, out rectangle.extent.x Width, out rectangle.extent.y Height )
Descriptionπ
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.
Execution informationπ
Execution information
-
Multithreading type: reentrant (runs in parallel with non-exclusive operators).
-
Multithreading scope: global (may be called from any thread).
-
Processed without parallelization.
Parametersπ
WindowHandle (input_control) window β (handle)
Window handle.
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π
(HDevelop)
open_window(100,100,200,200,'root','visible','',WindowHandle)
fwrite_string(FileHandle, 'Move the window with the mouse!')
fnew_line(FileHandle)
repeat
get_mbutton(WindowHandle,_,_,Button)
get_window_extents(WindowHandle,Row,Column,Width,Height)
fwrite_string(FileHandle, ['(',Row,',',Column,')'])
fnew_line(FileHandle)
until(Button == 4)
open_window(100,100,200,200,"root","visible","",&WindowHandle)\;
fwrite_string(FileHandle,"Move the window with the mouse!")\;
fnew_line(FileHandle)\;
create_tuple(&String,1)\;
do
{
get_mbutton(WindowHandle,NULL,NULL,&Button)\;
get_window_extents(WindowHandle,&Row,&Column,&Width,&Height)\;
sprintf(buf,"Row %d Col %d ",Row,Column)\;
set_s(String,buf,0)\;
T_fwrite_string(FileHandle, String)\;
fnew_line(FileHandle)\;
}
while(Button < 4)\;
Resultπ
If the window is valid get_window_extents returns 2 (H_MSG_TRUE).
If necessary an exception is raised.
Combinations with other operatorsπ
Combinations
Possible predecessors
open_window, set_draw, set_color, set_colored, set_line_width
See also
Moduleπ
Foundation