[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions , Volume 2


setscrreg or wsetscrreg Subroutine

Purpose

Creates a software scrolling region within a window.

Library

Curses Library (libcurses.a)

Syntax

#include <curses.h>


setscrreg( Tmargin, Bmargin)
int Tmargin, Bmargin;


wsetscrreg( Window, Tmargin, Bmargin)
WINDOW *Window;
int Tmargin, Bmargin;

Description

The setscrreg and wsetscrreg subroutines create a software scrolling region within a window. Use the setscrreg subroutine with the stdscr and the the wsetscrreg subroutine with user-defined windows.

You pass the setscrreg subroutines values for the top line and bottom line of the region. If the setscrreg subroutine and scrollok subroutine are enabled for the region, any attempt to move off the line specified by the Bmargin parameter causes all the lines in the region to scroll up one line.

Note: Unlike the idlok subroutine, the setscrreg subroutines have nothing to do with the use of a physical scrolling region capability that the terminal may or may not have.

Parameters


Bmargin Specifies the last line number in the scrolling region.
Tmargin Specifies the first line number in the scrolling region (0 is the top line of the window.)
Window Specifies the window to place the scrolling region in. You specify this parameter only with the wsetscrreg subroutine.

Examples

  1. To set a scrolling region starting at the 10th line and ending at the 30th line in the stdscr, enter:

    setscrreg(9, 29);
    

    Note: Zero is always the first line.
  2. To set a scrolling region starting at the 10th line and ending at the 30th line in the user-defined window my_window, enter:

    WINDOW *my_window;
    wsetscrreg(my_window, 9, 29);
    

Implementation Specifics

These subroutines are part of Base Operating System (BOS) Runtime.

Related Information

The idlok (idlok Subroutine) subroutine, scrollok (scrollok Subroutine) subroutine, wrefresh (refresh or wrefresh Subroutine) subroutine.

Curses Overview for Programming, List of Curses Subroutines, Manipulating Characters with Curses in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]