The text of a manual · part 19 of 25
JANUS PSK for Ada Reference Manual, pages 181 to 190
Pages 181 to 190 of 250
The original document is the PDF (415 KB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Intermec J2020, Intermec J2010 and Intermec J2050
Page 181
im_viewport_home
3 im_viewport_home Purpose:
This function sets the viewport to the upper left corner (home) of the virtual display.
Syntax:
With Intrmecd_IO, Intrmecp_IO; Use Intrmecd_IO, Intrmecp_IO; procedure im_viewport_home;
IN Parameters:
None.
OUT Parameters:
None.
Return Value:
None.
Notes:
This function has no effect on the JANUS 2050.
See Also:
im_cursor_to_viewport, im_viewport_end, im_viewport_page_down, im_viewport_page_up, im_viewport_to_cursor, im_viewport_move
Example With System, Intrmecd_IO, Intrmecp_IO; Use System, Intrmecd_IO, Intrmecp_IO; procedure vp_home Is begin im_viewport_home; end vp_home;
3-141
Page 182
im_viewport_move im_viewport_move Purpose:
This function sets the viewport row and column to an offset from the current value.
Syntax:
With Intrmecd_IO, Intrmecp_IO; Use Intrmecd_IO, Intrmecp_IO; procedure im_viewport_move ( direction : IN IM_VIEWPORT_DIRECTION; distance : IN System.Word; row : OUT System.Word; column : OUT System.Word; status_code : OUT System.Word);
IN Parameter:
The direction is one of the following values: IM_VIEWPORT_LEFT IM_VIEWPORT_RIGHT IM_VIEWPORT_UP IM_VIEWPORT_DOWN
0 1 2 3
The distance parameter indicates the number of units to move the viewport and is either a numeric value between 1 and 70 or IM_DEFAULT_DISTANCE. If the distance parameter is IM_DEFAULT_DISTANCE, the default step size is used. The distance moved is a configurable parameter. For more information on configuring the viewport, see your JANUS user’s manual. OUT Parameter:
The row parameter retrieves the row number to which the viewport has moved. The column parameter retrieves the column number to which the viewport has moved. The status_code parameter is a standard status code listed in Appendix A, “Status Codes.”
Return Value:
3-142
None.
Page 183
im_viewport_move
Notes:
3
The (Row, Column) pair represents the upper left corner of the viewport being displayed. The minimum value for both the Row and Column is (0,0), which is the upper left corner of the virtual window. The maximum value is determined by the video mode and the number of lines and columns displayed. For example, for the normal video mode 3 (80X25 display) with a 20X16 display size, the maximum value of Row is 9 (25 minus 16) and the maximum value of Column is 60 (80 minus 20). Do not wraparound when changing the row and column viewport settings. They are set to the maximum allowed for the current mode and display size. To determine the actual values set, check the returned values of row and col. This function has no effect on the JANUS 2050.
See Also:
im_viewport_end, im_viewport_home, im_viewport_page_down, im_viewport_page_up, im_viewport_to_cursor, im_cursor_to_viewport
Example With System, Bit, Text_IO, Intrmecd_IO, Intrmecp_IO; Use System, Bit, Text_IO, Intrmecd_IO, Intrmecp_IO; procedure vp_move Is package STATUS_IO is new INTEGER_IO (System.Word); package SYSWORD_IO is new INTEGER_IO (System.Word); direction : IM_VIEWPORT_DIRECTION; dir_type : Character := ' '; distance : System.Word; row : System.Word; col : System.Word; status : System.Word; begin Put_Line ("Enter direction "); Put_Line (" 1 : up"); Put_Line (" 2 : down"); Put_Line (" 3 : left"); Put_Line (" 4 : right"); Put_Line (">>> "); Get (dir_type); case dir_type Is when '1' => direction := IM_VIEWPORT_UP; when '2' => direction := IM_VIEWPORT_DOWN; when '3' => direction := IM_VIEWPORT_LEFT; when '4' => direction := IM_VIEWPORT_RIGHT;
3-143
Page 184
im_viewport_move when others => direction := IM_VIEWPORT_RIGHT; end case; Put_Line ("Enter distance : "); Put_Line (">>> "); SYSWORD_IO.Get (distance); New_Line; im_viewport_move (direction, distance, row, col, status); if im_issuccess (status) then Put ("Row "); SYSWORD_IO.Put (row, WIDTH => 4); New_Line; Put ("Col "); SYSWORD_IO.Put (col, WIDTH => 4); New_Line; else Put ("VP Move Error = "); SYSWORD_IO.Put (status, WIDTH => 8); New_Line; end if; end vp_move;
3-144
Page 185
im_viewport_page_down
3 im_viewport_page_down Purpose:
This procedure moves the viewport down one viewport length.
Syntax:
With Intrmecd_IO, Intrmecp_IO; Use Intrmecd_IO, Intrmecp_IO; procedure im_viewport_page_down;
IN Parameters:
None.
OUT Parameters:
None.
Return Value:
None.
Notes:
This function has no effect on the JANUS 2050.
See Also:
im_cursor_to_viewport, im_viewport_end, im_viewport_home, im_viewport_page_up, im_viewport_to_cursor, im_viewport_move, im_viewport_setxy
Example With System, Intrmecd_IO, Intrmecp_IO; Use System, Intrmecd_IO, Intrmecp_IO; procedure vp_down Is begin im_viewport_page_down; end vp_down;
3-145
Page 186
im_viewport_page_up im_viewport_page_up Purpose:
This procedure moves the viewport up one viewport length.
Syntax:
With Intrmecd_IO, Intrmecp_IO; Use Intrmecd_IO, Intrmecp_IO; procedure im_viewport_page_up;
IN Parameters:
None.
OUT Parameters:
None.
Return Value:
None.
Notes:
This function has no effect on the JANUS 2050.
See Also:
im_cursor_to_viewport, im_viewport_end, im_viewport_home, im_viewport_page_down, im_viewport_to_cursor, im_viewport_move, im_viewport_setxy
Example With System, Intrmecd_IO, Intrmecp_IO; Use System, Intrmecd_IO, Intrmecp_IO IO; procedure view_up Is begin im_viewport_page_up; end view_up;
3-146
Page 187
im_viewport_setxy
3 im_viewport_setxy Purpose:
This function sets the viewport row and column to a specific value when moving between two screens.
Syntax:
With Intrmecd_IO, Intrmecp_IO; Use Intrmecd_IO, Intrmecp_IO; function im_viewport_setxy ( row : IN OUT System.Word; colum : IN OUT System.Word ) return System.Word;
IN Parameter:
None.
IN OUT
The row parameter sets the row value (Y-coordinate) of the viewport. The colum parameter sets the column value (X-coordinate) of the viewport.
OUT Parameter:
None.
Return Value:
This function returns one of the standard status codes listed in Appendix A, “Status Codes.”
Notes:
The (row, col) pair represents the upper left corner of the viewport being displayed. The minimum values for both the row and col are (0,0), which is the upper left corner of the virtual window. For the normal video mode 3 (80X25 display) with 20X6 display character size, the maximum value of row is 9 (25 minus 16) and the maximum value of col is 60 (80 minus 20). The row and column viewport settings are set to the maximum allowed for the current mode and display size. To determine the actual values set, check the returned values of row and col. This function has no effect on the JANUS 2050.
See Also:
im_viewport_move, im_viewport_getxy
Example See example for im_viewport_getxy.
3-147
Page 188
im_viewport_to_cursor im_viewport_to_cursor Purpose:
This function centers the viewport around the cursor.
Syntax:
With Intrmecd_IO, Intrmecp_IO; Use Intrmecd_IO, Intrmecp_IO; procedure im_viewport_to_cursor;
IN Parameters:
None.
OUT Parameters:
None.
Return Value:
None.
Notes:
This function has no effect on the JANUS 2050.
See Also:
im_cursor_to_viewport, im_viewport_end, im_viewport_home, im_viewport_page_down, im_viewport_to_cursor, im_viewport_move, im_viewport_setxy
Example With System, Text_IO, Intrmecd_IO, Intrmecp_IO; Use System, Text_IO, Intrmecd_IO, Intrmecp_IO; procedure vp2cursr Is package STATUS_IO is new INTEGER_IO (System.Word); row, col : System.Word; status : System.Word; begin im_viewport_end; im_viewport_getxy (row,col,status); status := im_standby_wait (5000); im_viewport_to_cursor; --show that viewport moved to end, then back to cursor status := im_standby_wait (5000); STATUS_IO.Put (row); STATUS_IO.Put (col); New_Line; end vp2cursr;
3-148
Page 189
A Appendix A: Status Codes