C_METHLST

Process a child list

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
subroutine C_METHLST, reentrant
in    req container_id          ,n
in    req type                  ,n
in    req child_id              ,n
in    req reason                ,a
opt record                      ,a
opt a_methoddata1               ,any
        .
        .
        .
opt a_methoddata20              ,any

container_id

This argument is not used by the default processing methods. However, it passes the ID of the container window in case a method you supply needs this information. (n)

type

This argument is not used by the default processing methods. However, it passes one of the following (defined in tools.def) in case a method you supply needs this information: DC_LIST for a standard Toolkit list or an ActiveX Toolkit list, or DC_WINDOW for a Toolkit window. (n)

child_id

The ID for the child list. (n)

reason

This argument is not used by the default method C_METHLST. However, it is passed for methods that do need the reason the child was activated. Reason can be blank (indicating that the child was already activated), a program-supplied reason passed because the child was activated programmatically, or one of the following: (a)

C_FIRST = Focus moved in attempt to reach first child.

C_LAST = Focus moved in attempt to reach last child.

C_NEXT = Focus moved from previous child (e.g., tab).

C_PREV = Focus moved from next child (e.g., shift+tab).

C_SET = Child explicitly activated. For example, this could be the result of a mouse click, or it could be that the child was activated programmatically without a specified reason.

record

(optional) The data area for input for the child list. (a)

a_methoddata1 through a_methoddata20

(optional) Up to 20 additional data arguments. (any)

C_METHLST is a Toolkit-supplied processing method that C_PROCESS calls by default when processing a child that is a standard Toolkit list or an ActiveX Toolkit list. If you want something other than the default processing described below, you can instruct C_PROCESS to call a different routine by passing the routine’s name in the DC_ADD call for the list.

For record, C_PROCESS passes the a_methoddata argument specified by the recordindex argument in the DC_ADD call for the window. For details, see the information on recordindex in the DC_ADD Discussion, and see the information on the a_methoddata arguments in the C_PROCESS Discussion.

C_METHLST does the following:

1. Sets the highlight style for the selected item to highlight (as opposed to outline or off) by calling %L_SELSTYLE with D_ON.
2. If on UNIX or OpenVMS, calls L_ENABLE. (See note below.)
3. Calls L_CTRCONTEXT to set focus to either the list or a button for the list, depending on reason.
4. Processes the list by calling L_SELECT and passing the following: the ID of the list (child_id), a D_LNOP request code, the record argument passed to this method, and all the a_methoddata arguments passed to this method.
5. If g_select is false when control is returned to C_METHLST (indicating that an item was selected), C_METHLST then calls %M_SIGNAL, passing “C_NEXT” as the menu entry name to signal. This passes context to the next child (or the first button for the composite container window, if there are no more children). If g_select is true, context remains on the list.
6. If on UNIX or OpenVMS, calls L_DISABLE. (See note below.)
7. Sets the highlight style for the selected item to outline by calling %L_SELSTYLE with D_OUTLINE.

To visually indicate when a child list is active on Windows, the default method sets the highlight style for the selected item to highlight (step 1 above) when the child list is active and to outline (step 7 above) when the child list is not active. This is generally effective for standard Toolkit lists in Windows environments, but not in UNIX and OpenVMS environments, where this doesn’t result in any visual difference. (On UNIX and OpenVMS, D_OUTLINE has the same effect as D_ON). So for UNIX and OpenVMS, this method enables the list when active (step 2 above) and disables the list when inactive (step 6 above).

ActiveX Toolkit lists ignore %L_SELSTYLE settings, but automatically have a bold frame when active.

Note

To view the code for this method, see the ctrmeths.dbl file included in your UI Toolkit distribution. This file is distributed simply as a reference and a starting point for writing your own composite window processing methods; modifying or compiling this file will not change the default methods.