In order for this site to work correctly, and for us to improve the site, we need to store a small file (called a cookie) on your computer.
By continuing to use this website, you agree to our cookies and privacy policy.
  
Home page Home page Home page Home page
Pixel
Pixel Header R1 C1 Pixel
Pixel Header R2 C1 Pixel
Pixel Header R3 C1 Pixel
Pixel

Uncommon Knowledge - Window_Common% in Paint - Part III

As promised in issue 7, in this issue we present the rest of the Window_Common% variables used in PAINT. Whilst not all of these are useful they are included here for the sake of completeness.

The following article details the main differences between the WINDOW_COMMON area in normal usage, and its behaviour while in PAINT. Testing so far has not identified any areas where flag variables (such as WC_VALID%, WC_DISPLAY_ACTION%, WC_RESET%, WC_MPR_MODE% etc.) are used, so these are not included in the list. Other items not included are the fact that some null or zero variables are assigned differently - e.g. WC_FORCE_CHANGE% in PAINT is null whereas it will be set to zero in normal window processing when false.

 WC_BROWSE_LIST%   BROWSE_LIST contains a copy of the %FIELDS% dictionary
                   item from the table whose handle is present in
                   WC_SRC_DICT%. Other columns can be appended to this list
                   via a macro to allow quick painting of columns from other
                   tables into the window (e.g. to include common symbolics
                   from the DICT.VOC table) - PAINT will throw up a column
                   not found message when this is done, but this does not
                   affect the functionality.

 WC_DELIM%         Seems to always contain 4.

 WC_EXCEPT_KEYS%   Contains the scan codes for Shift-F1 through to Shift-F10
                   although some of these are only active when editing a
                   prompt.

 WC_JOINED_LOCKS%  An array containing up to six fields representing the
                   last option chosen from the options popup. As there may
                   be six different type of options popup (See
                   WC_Table_Exit_Mode%), each field in the array represents
                   the position in the corresponding options popup.

 WC_KEY_FULL%      WC_KEY_FULL% contains a parameter string for INRECT (see
                   REVMEDIA passim) which identifies the hot areas for the
                   visible prompts and labels. These areas are stored
                   relative to the top left hand corner of the window, and
                   are stored in reverse order, with the last prompt's entry
                   area being the first 4 byte sequence in the INRECT
                   string.

 WC_LABEL%         Similar to the normal window definitions but with some
                   differences to cope with box drawing. Field mark
                   delimited array with one field per label. Each field has
                   9 values, with contents as follows

                    <X,1>     X position
                    <X,2>     Y position
                    <X,3>     Colour escape sequence
                    <X,4>     Screen literal in the case of normal or smart
                              labels. In the case of a box, a value between
                              1 and 5 depending upon the box type as
                              selected from the popup "BORDERS".
                    <X,5>     Depth of box
                    <X,6>     Width of display or box
                    <X,7>     Code if "Smart" label
                    <X,8>     Command if "Smart" label
                    <X,9>     Offset byte for this label into the compiled
                              print image contained in WC_XREF_WINDOW% (cf).
                              Thus if this contained 6, the compiled label
                              image would begin at byte position 6 in
                              WC_XREF_WINDOW%. According to internal RevTI
                              sources, this use of offsets into the compiled
                              print image is in no small way responsible for
                              the increased speed of the new paint
                              processor.

 WC_MPR_MODE%      Indicates that the last resize operation was carried out
                   by mouse. Values identified thus far are

                    1    Resizing by mousing right side
                    2    Resizing by mousing bottom side
                    3    Resizing by mousing at bottom right corner
                    4    Resizing by mousing left side
                    5    Does not seem to be used
                    6    Resizing by mousing at bottom left corner

                   Note that resizing using Ctrl-F7 does not set this flag.

 WC_OREC%          Contains a copy of the original template structure - this
                   is used to create the .BAK row in the windows table if
                   changes made during the paint session are committed.

 WC_PREC%          Seems to be used to indicate whether there has yet been
                   a key field added to the window. If true there has been.

 WC_PROMPTS%       Prompts is a copy of the prompt information stored in
                   WC_OREC% with any general video information swapped for
                   its full escape sequence. E.g. ^PE^ in WC_OREC% might
                   become ESC-C74 in WC_PROMPTS%. WC_PROMPTS% can be used in
                   conjunction with WC_REDISPLAY_LIST% to identify
                   highlighted areas (see previous issue.)

                   Note that in Paint, three new values are added to
                   Prompts, in values 56, 57 and 58. These contain the
                   following :-

                    56   This is an offset pointer into WC_XREF_WINDOW% for
                         the prompt literal, per WC_LABEL% qv.
                    57   This is an offset pointer into WC_XREF_WINDOW% for
                         the prompt entry per WC_LABEL% qv
                    58   The word "Selected" if the prompt is currently
                         selected.

 WC_PROMPT_TYPE%   The prompt type currently selected. Values identified
                   thus far are as follows

                    1    Prompt label
                    2    Prompt entry
                    3    Display label
                    4    Box label

 WC_QUERY_MODE%     Indicates the current binding mode. Possible values are

                    0    Labels
                    1    Bind Off
                    2    Bind On

 WC_QUERY_TEMPLATE% After the options key has been pressed, this contains a
                    field mark delimited array with fields 2-7 of SYSTEXT
                    record PAINT*PARMS.

 WC_RECALC%         RECALC seems always to be set to the literal ALL while
                    in PAINT.

 WC_REDISPLAY_LIST% This variable contains the list of prompts and
                    labels which are tagged as having being selected in
                    PAINT, in the form of a two dimensional dynamic array.
                    Its behaviour is fully documented in issue 7.

 WC_REGISTER%()     When in either SF5 or SF6, Register(1) contains the
                    dictionary file name and Register(2) contains the
                    dictionary file variable.

 WC_SRC_DICT%       WC_SRC_DICT% holds the handle for the associated data
                    table's dictionary, just as it does normally. This is in
                    contrast to the behaviour of WC_SRC_FILE% below.

 WC_SRC_FILE%       In PAINT, WC_SRC_FILE% contains the handle for the
                    WINDOWS table which stores the template, NOT the data
                    portion of the associated table as is normal.

 WC_STOP_LIST%      Another INRECT parameter string, this time composed of
                    seven 4-byte sequences as follows:

                    (1)  The visible area within the window borders.
                    (2)  The position of the ESC button on the top border.
                    (3)  The top border itself.
                    (4)  The left hand border.
                    (5)  The bottom right hand corner of the window.
                    (6)  The right hand border.
                    (7)  The bottom border.

                    The top border is the most dominant, and the bottom
                    border is the least i.e. the top left hand corner
                    belongs to the TOP border, not the left, while the
                    bottom left hand corner belongs to the LEFT border, not
                    the bottom. The bottom right hand corner is identified
                    separately to allow the special resize operation which
                    affects both axes simultaneously.

 WC_TABLE_EXIT_MODE% Set to a different value depending upon what is
                     currently selected in Paint. Values thus far identified
                     are

                     1    No objects selected
                     2    One prompt or prompt entry area
                     3    One label
                     4    A number of prompts/prompt entry areas (including
                          just one associated prompt and prompt entry area).
                     5    A number of labels
                     6    A number of objects of different types

 WC_WEXIT_KEYS%     Set to NULL in PAINT. Most of their window functionality
                    seems to have been taken on by WC_EXCEPT_KEYS%, above.

 WC_WST_CHAR%       Contains the row number of the item on the Paste popup
                    last chosen.

 WC_XREF_WINDOW%    Contains the print string for the currently visible
                    window area, including position and colour sequences,
                    but NOT including border detail.
(Volume 4, Issue 9, Pages 7-10)
Pixel
Pixel Footer R1 C1 Pixel
Pixel
Pixel
Pixel