TPUHELP.HLB  —  MAP
  MAP

     Performs either of two functions depending on what parameters you
     specify.

     One variant associates a buffer with a window and makes the window
     visible on the screen.  Before using MAP you must already have created
     the buffer and the window.  (See help on CREATE_BUFFER and
     CREATE_WINDOW.)

     The other variant makes visible on the screen the DECwindows window
     associated with the specified widget, thereby making the widget
     visible.

  Syntax

     MAP (window, buffer)

         or

     MAP (widget)

  Parameters

     window     A window that you want to map to the screen.

     buffer     A buffer you want to associate with the window.

     widget     The widget you want to make visible.

  Comments

     MAP (widget) calls the Xlib routine XMapWindow to map the widget's
     DECwindows window to the screen.

     MAP (widget) is useful for the following tasks:

     1.  To make TPU's top-level widget visible sooner in the
         intitialization process than would happen by default.  For example,
         MAP (widget) is useful for enabling an application to display user
         information in a widget before the application's DECwindows startup
         is completed.

     2.  To make the specified widget visible again if it has been unmapped
         during a session.

  Examples

     1.  MAP (main_window, main_buffer);

         Associates the main buffer with the main window, and maps the main
         window to the screen.

     2.  MAP (example_widget);

         Causes the widget assigned to the variable "example_widget" to
         become visible, assuming that the widget has been created and
         managed but not mapped.

     3.  The following procedure creates a message buffer and a message
         window; it then associates the message buffer with the message
         window and maps the message window to the screen:

         PROCEDURE user_message_window

            ! Create a message buffer and a message window
            message_buffer := CREATE_BUFFER ("message");
            message_window := CREATE_WINDOW (23, 2, OFF);
            !   Set the attributes of the buffer and window
            SET (EOB_TEXT, message_buffer, "");
            SET (NO_WRITE, message_buffer);
            SET (SYSTEM, message_buffer);
            SET (VIDEO, message_window, NONE);
            MAP (message_window, message_buffer);
         ENDPROCEDURE;

  Related topics

     CREATE_BUFFER    CREATE_WINDOW    DELETE
     LOWER_WIDGET     MANAGE_WIDGET    RAISE_WIDGET
     REALIZE_WIDGET   SET(MAPPED_WHEN_MANAGED) UNMANAGE_WIDGET  UNMAP
Close Help