DESIGN (xvutils) functions


LIBRARY ROUTINE

xvu_choose_wait - pop up a choose dialog box; wait for response

LIBRARY CALL

int xvu_choose_wait(
    char  *prompt,
    char  **item_labels,
    int   item_num,
    int   default_val,
    int   user_defined,
    char  **return_string)

INPUT

OUTPUT

RETURN VALUE

Value returned to caller will be: 1 if user selected item1 2 if user selected item2 3 if user selected item3 N if user selected itemN. 0 if there was an error creating selection object, or the user clicked on CANCEL and no default value (ie, a default value of -1) was provided. -1 if the user_defined flag was passed in as TRUE, and the user entered their own item to use.

This routine will NOT return to the calling program until one of the items is chosen from the list.

DESCRIPTION

Creates and maps a pop-up choose dialog box that consists of a list with N items, and looks like:

------------------------------- | | | Choose One: | | | - - - - - - - - - - - - - - - - | item 1 | | item 2 | | item 3 | | item 4 | | : | | item 5 | - - - - - - - - - - - - - - - - | ---------- | | | Cancel | | | ---------- | -------------------------------

You may specify a prompt to replace "Choose 1". You may specify a label to replace "Cancel" on the button.

If desired, you may specify the "user defined" option to be TRUE, which will cause a text object to be created underneath the list. The user may then enter their own selection into the text object and hit <Enter>, which will cause the new selection to appear in the list, where it may be chosen.

IMPORTANT NOTE: to be consistent with the standards of the Khoros Software development system, you should really be calling kchoose(), not xvu_choose_wait().

ADDITIONAL INFORMATION

none

EXAMPLES

none

SIDE EFFECTS

none

RESTRICTIONS

none

MODIFICATION

none

FILES

$DESIGN/objects/library/xvutils/src/choose.c

SEE ALSO

xvutils(3)

COPYRIGHT

Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.