PAD_$CREATE Domain/OS PAD_$CREATE
NAME
pad_$create - create a new pad and window pane
SYNOPSIS (C)
#include <apollo/base.h>
#include <apollo/pad.h>
void pad_$create(
char *pathname,
pinteger name_length,
pad_$type_t pad_type,
ios_$id_t stream_id,
pad_$side_t side,
pad_$cre_opt_t pane_options,
short pane_size,
ios_$id_t *pane_stream_id,
status_$t status)
SYNOPSIS (Pascal)
%include '/sys/ins/base.ins.pas';
%include '/sys/ins/pad.ins.pas';
procedure pad_$create(
in pathname: univ name_$long_pname_t;
in name_length: pinteger;
in pad_type: pad_$type_t;
in related_stream_id: ios_$id_t;
in side: pad_$side_t;
in pane_options: pad_$cre_opt_t;
in pane_size: integer;
out pane_stream_id: ios_$id_t;
out status: status_$t);
SYNOPSIS (FORTRAN)
%include '/sys/ins/base.ins.ftn'
%include '/sys/ins/pad.ins.ftn'
character pathname*1023
integer*4 status
integer*2 name_length, pad_type, related_stream_id
integer*2 side, pane_options, pane_size, pane_stream_id
call pad_$create(pathname, name_length, pad_type,
& related_stream_id, side, pane_options,
& pane_size, pane_stream_id, status)
DESCRIPTION
Pad_$create creates a new pad and pane in an existing window. There can
be up to 40 pads and 60 panes in any given window. The only way to
create an input pad for an existing transcript pad is with pad_$create.
The related stream, designated by related_stream_id, can be open on a
transcript pad previously created with a call to pad_$create or
pad_$create_window. For transcript pads, the stream ID can be a standard
output stream such as ios_$stdout or ios_$errout.
pathname
The name of the file to open the new pad on. If the file exists,
the created window is positioned at the beginning of the file (BOF).
If the file does not exist, then it is created. A null pathname
creates a temporary file that disappears when the pad is closed.
Transcript pads are usually created with null pathnames, and input
pads must always be created with null pathnames.
name_length
The number of bytes in pathname. A null pathname has zero length.
pad_type
The type of pad to create. Specify one of the following:
pad_$edit
Create an edit pad for viewing and editing the file.
pad_$input
Create an input pad for an existing transcript pad. The path-
name argument must be null to create an input pad.
pad_$read_edit
Create an edit pad for viewing but not modifying the file.
pad_$transcript
Create a transcript pad. A null pathname is usually used with
this option.
related_stream_id
The stream ID of the pad whose window the new pad and associated
window pane will be created in. The argument is the stream ID for
the pad viewed by the existing window.
Use ios_$stdout or ios_$errout for the related_stream_id to create a
transcript pad in an existing window. To create an input pad in an
existing transcript window, related_stream_id should be the stream
ID of the transcript pad in the window. When creating an input pad
with pad_$create and a pad_type of pad_$input, the transcript pad
specified by related_stream_id must not have any other input pads
associated with it. In other words, there can only be one input pad
per transcript pad.
side The side of the existing window that the new pane will occupy.
Specify one of the following:
pad_$bottom
Create the new pane at the bottom of the existing window. This
is the required location for an input pane in a transcript win-
dow.
pad_$left
Create the new pane at the left side of the existing window.
pad_$right
Create the new pane at the right side of the existing window.
pad_$top
Create the new pane at the top of the existing window.
pane_options
This is a set of attributes for the new pad and pane. Choose from
the following elements:
pad_$abs_size
Pane_size is an absolute dimension. If this is not chosen,
then pane_size scales with the existing window.
pad_$curs_off
Create a window that is not reachable by Display Manager com-
mands that move the cursor between windows. Specify
pad_$curs_off when there is no use for the cursor in the new
window.
pad_$init_raw
The new pad is initially in raw mode rather than in cooked
mode.
To choose none of the above attributes, pass an empty Pascal
set "[]" or, in C and FORTRAN, set pane_options to 0.
pane_size
The size of the new pane. A pane created with pad_$create
always takes up one full side of an existing window. Pane_size
specifies the remaining dimension.
Express the pane size either as a percentage relative to the
existing window or as an absolute value multiplied by the
current scale factor. Unless pad_$abs_size is included in
pane_options, pad_$create assumes that pane_size is a relative
size.
If pad_$abs_size is included in pane_options, the Display
Manager attempts to keep the window pane at the absolute size
defined by pane_size. However, the window pane can never
extend beyond the related window; so, if the related window
shrinks below the size requested, the window pane will also
shrink. An absolute pane_size is multiplied by the current
scale factors to yield raster units. The default scale factors
are the current font dimensions; so, unless the scale is
changed from the default express pane_size in terms of lines or
characters.
An input window pane will normally hold only one line, but it
can grow and shrink, depending on how many lines of input are
waiting for action. When creating an input pad, the pane_size
argument specifies the maximum number of lines that the input
window pane can occupy. The absolute size of an input window
pane can never be less than 1. A good relative size is 20.
pane_stream_id
The stream ID for the new pad.
status
The completion status.
SEE ALSO
pad_$create_frame, pad_$create_icon, pad_$create_window, pad_$set_scale.