TigerLogic.com
Products    |    Solutions    |    Support & Services    |    Education    |    Partners    |    Corporate    |    Events    |    Contact Us
mv•BASE Tech Tip: # mv141
Pertinent Release(s): All mvBase Releases
Pertinent Windows O/S: Win 9X and NT 4.0

The mv.TERM Client’s Handling of Page Depth and Page Width Parameters

In mvBase Release 1.3.02, the mv.TERM client application extended the functionality of its copy and paste feature to include back pages. Because the implementation of back pages causes some adjustments to the handling of screen page dimensions when resizing the mv.TERM window, an explanation of page parameters is required to help prevent confusion.

The mv.TERM Client in mvBase 1.3.01 and Prior

In mvBase Release 1.3.01 and previous releases, the mv.TERM client application does not support back pages. The user can only view and operate on the current screen page. When the user resizes the physical mv.TERM window by dragging the window border, the page width and page depth dimensions of the logical screen page remain unchanged.

Scroll bars are displayed when the window size is less than the page width or page depth dimensions of the screen page. The scroll bar size covers the full range of mv.TERM client’s screen page. The user can click on the scroll bar to adjust its position and view the entire screen page, even though only a portion of the screen page can be viewed at any given instance. The mv.TERM client application maintains an internal screen array buffer that contains an exact image of the data in the entire screen page and is used for displaying the entire screen page or portions of it when scroll bars are involved.

The mv.TERM Client in mvBase 1.3.02

In mvBase Release 1.3.02, the mv.TERM client application provides the back page capability, which allows the user to view the current screen page, and as many previous back pages that have been viewed. To allow the user to easily view the information in mv.TERM’s screen pages, the mv.TERM application provides menu entries and toolbar buttons to scroll to specific offsets within the screen pages. The copy and paste feature for selecting text by dragging the pressed left mouse button over screen text has been extended to scroll the mv.TERM window up or down when the mouse cursor is positioned above or below the mv.TERM window. This window scrolling allows text to be selected in multiple screen pages.

To allow the correct display of screen text when scrolling over screen pages, no unused areas of the window can exist (eg. blank space caused by increasing the vertical size of the window) and the number of entries in mv.TERM’s internal screen array buffer must exactly match the total number of rows (page depth) in all screen pages (all back pages + current screen page). To satisfy this requirement, the mv.TERM application must adjust its screen page depth parameter whenever the depth (vertical) size of the mv.TERM window changes. If the user increases the depth of the mv.TERM window by dragging the window border, the page depth parameter of mv.TERM’s screen page gets adjusted to match the new depth (vertical) size of the mv.TERM window. For example, if the mv.TERM window is currently configured for 20 rows (page depth) and the user drags the window border so that 30 rows exactly fit into the new depth (vertical) size, the mv.TERM application automatically sets its screen page depth parameter to 30 rows.

The same mechanism for automatically changing the page depth parameter exists in the mv.TERM application when the mv.TERM window is maximized. However, when the maximized window is restored, the page depth parameter is adjusted back to its original value.

Even though the mv.TERM application adjusts the size of its page depth parameter when the user drags the window border, it does not adjust the size of its page width parameter. This behavior is identical to the behavior that exists in mvBase Release 1.3.01 and previous releases. The mv.TERM application could have been implemented to adjust its page width parameter, in the same manner as it adjusts its page depth parameter. However, if this page width adjustment was incorporated and the user wanted to reduce the width of the mv.TERM window to allow more room on the desktop, the data in each screen pagerow would be truncated to the adjusted Windows width value and data would be lost. Because there wasn’t the same requirement for the page width parameter to support scrolling that existed for the page depth parameter, it was decided that it would be inappropriate for the mv.TERM application to force an adjustment of the page width parameter and cause display of data to be lost.

No display of data is lost by adjusting the Windows page depth parameter when the user reduces the depth of the mv.TERM window, because the extra screen rows are automatically stored in the back pages. However, if there are no configured back pages, the ability to display that data is lost.

The current page width and page depth parameter values are displayed in the mv.TERM application’s status bar to give the user visual feedback on the current dimensions of the mv.TERM window.

The mv.TERM application provides the same handling of its "Page Size" property sheet that exists in mvBase Release 1.3.01 and previous releases. In mvBase Release 1.3.02, the controls for the "Page Depth" and "Page Width" parameters have changed from radio buttons allowing only specific values to edit fields with corresponding spin controls, which allow a full range of values (page depth = 1-75 and page width = 1-132). Both the page depth and page width parameters get adjusted when the user changes the parameter values in the "Page Size" property sheet and click the "OK" button. If the user does not desire the behavior with dragging the mv.TERM window border causing the page depth to be adjusted, the user can choose to only adjust the mv.TERM window dimensions by making changes in the "Page Size" property sheet.

When the page depth and page width parameters get adjusted by changing the parameter values in the "Page Size" property sheet, by dragging the window border, by maximizing the window, or by restoring from a maximized window, these parameters get saved away as the current settings in an mv.TERM user profile. When starting a new mv.TERM session, these saved away user profile settings are used for the initial dimensions of the mv.TERM window. When opening a configuration file (.vtm) or when the mv.TERM application detects a default configuration file (default.vtm) when starting a new mv.TERM session, the parameters in the configuration file will be used instead of the parameter settings in mv.TERM’s user profile. If adjustments to the page depth and page width parameters cause problems when starting mv.TERM sessions, the user can use configuration files to force a specific initial configuration when starting an mv.TERM session.

The mvBase operating environment has a mechanism for specifying the page depth and page width parameters for terminal output. These parameters can be specified by the TERM command. In most cases, these parameters of the TERM command should match up with the same parameters in the mv.TERM session’s configuration. Mismatches in these parameters could cause problems in displaying the screen page data. For example, if the TERM command’s page depth is set to 20 and mv.TERM’s page depth is set to 25, the user will see 5 blank rows at the bottom of the screen page in the mv.TERM window. If the TERM command’s page depth is set to 25 and mv.TERM’s page depth is set to 20, the user will only see the last 20 rows of the screen page and the 5 top rows of the screen page will be moved into the bottom of the most recent back page. If there are no configured back pages, the 5 top rows will be lost to viewing. If the user is experiencing these type of display problems, there may be a mismatch in the parameters of the TERM command and the mv.TERM application.

 

Information
Product Information
2.1 Documentation
2.0 Documentation
1.x Documentation
Product Status Sheets
Updates
Patches
Copyright 2008. TigerLogic. All Rights Reserved