XmFileSelectionBox(3X) OSF/Motif XmFileSelectionBox(3X)NAMEXmFileSelectionBox - The FileSelectionBox widget class
SYNOPSIS
#include <Xm/FileSB.h>
DESCRIPTION
FileSelectionBox traverses through directories, views the files and
subdirectories in them, and then selects files.
A FileSelectionBox has five main areas: A text input field for display‐
ing and editing a directory mask used to select the files to be dis‐
played A scrollable list of filenames A scrollable list of subdirecto‐
ries A text input field for displaying and editing a filename A group
of PushButtons, labeled OK, Filter, Cancel, and Help
Additional children may be added to the FileSelectionBox after cre‐
ation. FileSelectionBox inherits the layout functionality provided by
SelectionBox for any additional children. The list of filenames, the
list of subdirectories, or both can be removed from the FileSelection‐
Box after creation by unmanaging the appropriate widgets and their
labels. The list and label widgets are obtained by calling the func‐
tion XmFileSelectionBoxGetChild. To remove either the directory list
or the file list, unmanage the parent of the appropriate list widget
and unmanage the corresponding label.
The user can specify resources in a resource file for the automatically
created widgets and gadgets of FileSelectionBox. The following list
identifies the names of these widgets (or gadgets) and the associated
FileSelectionBox areas.
Filter Label—"FilterLabel"
Filter Text—"Text"
Directory List—"DirList"
Directory List Label—"Dir"
The directory mask is a string specifying the base directory to be
examined and a search pattern. Ordinarily, the directory list displays
the subdirectories of the base directory, as well as the base directory
itself and its parent directory. The file list ordinarily displays all
files and/or subdirectories in the base directory that match the search
pattern.
A procedure specified by the XmNqualifySearchDataProc resource extracts
the base directory and search pattern from the directory mask. If the
directory specification is empty, the current working directory is
used. If the search pattern is empty, a pattern that matches all files
is used.
An application can supply its own XmNqualifySearchDataProc as well as
its own procedures to search for subdirectories and files. The default
XmNqualifySearchDataProc works as follows: The directory mask is a
pathname that can contain zero or more wildcard characters in its
directory portion, its file portion, or both.
The directory components of the directory mask up to, but not includ‐
ing, the first component with a wildcard character specify the direc‐
tory to be searched, relative to the current working directory. The
remaining components specify the search pattern. If the directory mask
is empty or if its first component contains a wildcard character, the
current working directory is searched. If no component of the direc‐
tory mask contains a wildcard character, the entire directory mask is
the directory specification, and all files in that directory are
matched.
The user can select a new directory to examine by scrolling through the
list of directories and selecting the desired directory or by editing
the directory mask. Selecting a new directory from the directory list
does not change the search pattern. A user can select a new search
pattern by editing the directory mask. Double clicking or pressing
KActivate on a directory in the directory list initiates a search for
files and subdirectories in the new directory, using the current search
pattern.
The user can select a file by scrolling through the list of filenames
and selecting the desired file or by entering the filename directly
into the text edit area. Selecting a file from the list causes that
filename to appear in the file selection text edit area.
The user may select a new file as many times as desired. The applica‐
tion is not notified until the user takes one of these actions: Selects
the OK PushButton. Presses KActivate while the selection text edit
area has the keyboard focus. Double clicks or presses KActivate on an
item in the file list
FileSelectionBox initiates a directory and file search when any of the
following occurs: The FileSelectionBox is initialized The function
XtSetValues is used to change XmNdirMask, XmNdirectory, XmNpattern, or
XmNfileTypeMask The user activates the Filter PushButton The user dou‐
ble clicks or presses KActivate on an item in the directory list The
application calls XmFileSelectionDoSearch The user presses KActivate
while the directory mask text edit area has the keyboard focus
When a file search is initiated, the FileSelectionBox takes the follow‐
ing actions: Constructs an XmFileSelectionBoxCallbackStruct structure
with values appropriate for the action that initiated the search Calls
the XmNqualifySearchDataProc with the callback structure as the data
input argument Sets XmNdirectoryValid and XmNlistUpdated to False Calls
the XmNdirSearchProc with the qualified data returned by the XmNquali‐
fySearchDataProc
If XmNdirectoryValid is True, the FileSelectionBox takes these addi‐
tional actions: Sets XmNlistUpdated to False Calls the XmNfileSearch‐
Proc with the qualified data returned by the XmNqualifySearchDataProc
(and possibly modified by the XmNdirSearchProc) If XmNlistUpdated is
True and the file list is empty, displays the XmNnoMatchString in the
file list and clears the selection text and XmNdirSpec If XmNlistUp‐
dated is True and the file list is not empty, sets the selection text
and XmNdirSpec to the qualified dir returned by the XmNqualifySearch‐
DataProc (and possibly modified by the XmNdirSearchProc) Sets the
directory mask text and XmNdirMask to the qualified mask returned by
the XmNqualifySearchDataProc (and possibly modified by the
XmNdirSearchProc) Sets XmNdirectory to the qualified dir returned by
the XmNqualifySearchDataProc (and possibly modified by the
XmNdirSearchProc) Sets XmNpattern to the qualified pattern returned by
the XmNqualifySearchDataProc (and possibly modified by the
XmNdirSearchProc)
Classes
FileSelectionBox inherits behavior and resources from Core, Composite,
Constraint, XmManager, XmBulletinBoard, and XmSelectionBox.
The class pointer is xmFileSelectionBoxWidgetClass.
The class name is XmFileSelectionBox.
New Resources
The following table defines a set of widget resources used by the pro‐
grammer to specify data. The programmer can also set the resource val‐
ues for the inherited classes to set attributes for this widget. To
reference a resource by name or by class in a .Xdefaults file, remove
the XmN or XmC prefix and use the remaining letters. To specify one of
the defined values for a resource in a .Xdefaults file, remove the Xm
prefix and use the remaining letters (in either lowercase or uppercase,
but include any underscores between words). The codes in the access
column indicate if the given resource can be set at creation time (C),
set by using XtSetValues (S), retrieved by using XtGetValues (G), or is
not applicable (N/A).
XmFileSelectionBox Resource Set
───────────────────────────────────────────────────────────────
Name Default Access
Class Type
───────────────────────────────────────────────────────────────
───────────────────────────────────────────────────────────────
XmNdirectory dynamic CSG
XmCDirectory XmString
───────────────────────────────────────────────────────────────
XmNdirectoryValid dynamic SG
XmCDirectoryValid Boolean
───────────────────────────────────────────────────────────────
XmNdirListItems dynamic SG
XmCDirListItems XmStringTable
───────────────────────────────────────────────────────────────
XmNdirListItemCount dynamic SG
XmCDirListItemCount int
───────────────────────────────────────────────────────────────
XmNdirListLabelString dynamic CSG
XmCDirListLabelString XmString
───────────────────────────────────────────────────────────────
XmNdirMask dynamic CSG
XmCDirMask XmString
───────────────────────────────────────────────────────────────
XmNdirSearchProc default procedure CSG
XmCDirSearchProc XmSearchProc
───────────────────────────────────────────────────────────────
XmNdirSpec dynamic CSG
XmCDirSpec XmString
───────────────────────────────────────────────────────────────
XmNfileListItems dynamic SG
XmCItems XmStringTable
───────────────────────────────────────────────────────────────
XmNfileListItemCount dynamic SG
XmCItemCount int
───────────────────────────────────────────────────────────────
XmNfileListLabelString dynamic CSG
XmCFileListLabelString XmString
───────────────────────────────────────────────────────────────
XmNfileSearchProc default procedure CSG
XmCFileSearchProc XmSearchProc
───────────────────────────────────────────────────────────────
XmNfileTypeMask XmFILE_REGULAR CSG
XmCFileTypeMask unsigned char
───────────────────────────────────────────────────────────────
XmNfilterLabelString dynamic CSG
XmCFilterLabelString XmString
───────────────────────────────────────────────────────────────
XmNlistUpdated dynamic SG
XmCListUpdated Boolean
───────────────────────────────────────────────────────────────
XmNnoMatchString " [ ] " CSG
XmCNoMatchString XmString
───────────────────────────────────────────────────────────────
XmNpattern dynamic CSG
XmCPattern XmString
───────────────────────────────────────────────────────────────
XmNqualifySearchDataProc default procedure CSG
XmCQualifySearchDataProc XmQualifyProc
───────────────────────────────────────────────────────────────
Specifies the base directory used in combination with XmNpattern in
determining the files and directories to be displayed. The default
value is determined by the XmNqualifySearchDataProc and depends on the
initial values of XmNdirMask, XmNdirectory, and XmNpattern. If the
default is NULL or empty, the current working directory is used. Spec‐
ifies an attribute that is set only by the directory search procedure.
The value is set to True if the directory passed to the directory
search procedure can actually be searched. If this value is False the
file search procedure is not called, and XmNdirMask, XmNdirectory, and
XmNpattern are not changed. Specifies the items in the directory list.
XtGetValues for this resource returns the list items themselves, not a
copy of the list items. The application must not free the returned
items. Specifies the number of items in the directory list. The value
must not be negative. Specifies the label string of the directory
list. The default for this resource depends on the locale. In the C
locale the default is "Directories". Specifies the directory mask used
in determining the files and directories to be displayed. The default
value is determined by the XmNqualifySearchDataProc and depends on the
initial values of XmNdirMask, XmNdirectory, and XmNpattern. Specifies
a directory search procedure to replace the default directory-search
procedure. FileSelectionBox's default directory-search procedure ful‐
fills the needs of most applications. Because it is impossible to
cover the requirements of all applications, you can replace the default
search procedure.
The directory search procedure is called with two arguments: the FileS‐
electionBox widget and a pointer to an XmFileSelectionBoxCallbackStruct
structure. The callback structure is generated by the XmNqualify‐
SearchDataProc and contains all information required to conduct a
directory search, including the directory mask and a qualified base
directory and search pattern. Once called, it is up to the search rou‐
tine to generate a new list of directories and update the FileSelec‐
tionBox widget by using XtSetValues.
The search procedure must set XmNdirectoryValid and XmNlistUpdated. If
it generates a new list of directories, it must also set XmNdirLis‐
tItems and XmNdirListItemCount.
If the search procedure cannot search the specified directory, it must
warn the user and set XmNdirectoryValid and XmNlistUpdated to False,
unless it prompts and subsequently obtains a valid directory. If the
directory is valid but is the same as the current XmNdirectory, the
search procedure must set XmNdirectoryValid to True, but it may elect
not to generate a new list of directories. In this case is must set
XmNlistUpdated to False.
If the search procedure generates a new list of directories, it must
set XmNdirListItems to the new list of directories and XmNdirListItem‐
Count to the number of items in the list. If there are no directories,
it sets XmNdirListItems to NULL and XmNdirListItemCount to 0. In
either case it must set XmNdirectoryValid and XmNlistUpdated to True.
The search procedure ordinarily should not change the callback struct.
But if the original directory is not valid, the search procedure may
obtain a new directory from the user. In this case it should set the
dir member of the callback struct to the new directory, call the XmN‐
qualifySearchDataProc with the callback struct as the input argument,
and copy the qualified data returned by the XmNqualifySearchDataProc
into the callback struct. Specifies the full file path specification.
This is the XmNtextString resource in SelectionBox, renamed for FileSe‐
lectionBox. The default value is determined by the FileSelectionBox
after conducting the initial directory and file search. Specifies the
items in the file list. This is the XmNlistItems resource in Selec‐
tionBox, renamed for FileSelectionBox. XtGetValues for this resource
returns the list items themselves, not a copy of the list items. The
application must not free the returned items. Specifies the number of
items in the file list. This is the XmNlistItemCount resource in
SelectionBox, renamed for FileSelectionBox. The value must not be neg‐
ative. Specifies the label string of the file list. This is the XmN‐
listLabelString resource in SelectionBox, renamed for FileSelectionBox.
The default for this resource depends on the locale. In the C locale
the default is "Files". Specifies a file search procedure to replace
the default file-search procedure. FileSelectionBox's default file-
search procedure fulfills the needs of most applications. Because it
is impossible to cover the requirements of all applications, you can
replace the default search procedure.
The file search procedure is called with two arguments: the FileSelec‐
tionBox widget and a pointer to an XmFileSelectionBoxCallbackStruct
structure. The callback structure is generated by the XmNqualify‐
SearchDataProc (and possibly modified by the XmNdirSearchProc). It
contains all information required to conduct a file search, including
the directory mask and a qualified base directory and search pattern.
Once called, it is up to the search routine to generate a new list of
files and update the FileSelectionBox widget by using XtSetValues.
The search procedure must set XmNlistUpdated. If it generates a new
list of files, it must also set XmNfileListItems and XmNfileListItem‐
Count.
The search procedure is recommended always to generate a new list of
files. If the mask member of the callback struct is the same as the
mask member of the callback struct in the preceding call to the search
procedure, the procedure may elect not to generate a new list of files.
In this case it must set XmNlistUpdated to False.
If the search procedure generates a new list of files, it must set XmN‐
fileListItems to the new list of files and XmNfileListItemCount to the
number of items in the list. If there are no files, it sets XmN‐
fileListItems to NULL and XmNfileListItemCount to 0. In either case it
must set XmNlistUpdated to True.
In constructing the list of files, the search procedure should include
only files of the types specified by the widget's XmNfileTypeMask.
Setting XmNdirSpec is optional, but recommended. Set this attribute to
the full file specification of the directory searched. The directory
specification is displayed below the directory and file lists. Speci‐
fies the type of files listed in the file list. Following are the pos‐
sible values: XmFILE_REGULAR restricts the file list to contain only
regular files. XmFILE_DIRECTORY restricts the file list to contain
only directories. XmFILE_ANY_TYPE allows the list to contain all file
types including directories. Specifies the label string for the text
entry field for the directory mask. The default for this resource
depends on the locale. In the C locale the default is "Filter". Spec‐
ifies an attribute that is set only by the directory and file search
procedures. Set to True if the search procedure updated the directory
or file list. Specifies a string to be displayed in the file list if
the list of files is empty. Specifies the search pattern used in com‐
bination with XmNdirectory in determining the files and directories to
be displayed. The default value is determined by the XmNqualifySearch‐
DataProc and depends on the initial values of XmNdirMask, XmNdirectory,
and XmNpattern. If the default is NULL or empty, a pattern that
matches all files is used. Specifies a search data qualification pro‐
cedure to replace the default data qualification procedure. FileSelec‐
tionBox's default data qualification procedure fulfills the needs of
most applications. Because it is impossible to cover the requirements
of all applications, you can replace the default procedure.
The data qualification procedure is called to generate a qualified
directory mask, base directory, and search pattern for use by the
directory and file search procedures. It is called with three argu‐
ments: the FileSelectionBox widget and pointers to two XmFileSelection‐
BoxCallbackStruct structures. The first callback struct contains the
input data. The second callback struct contains the output data, to be
filled in by the data qualification procedure.
If the input dir and pattern members are not NULL, the procedure must
copy them to the corresponding members of the output callback struct.
If the input dir is NULL, the procedure constructs the output dir as
follows: If the input mask member is NULL, the procedure uses the wid‐
get's XmNdirectory as the output dir; otherwise, it extracts the output
dir from the input mask. If the resulting output dir is empty, the
procedure uses the current working directory instead.
If the input pattern is NULL, the procedure constructs the output pat‐
tern as follows: If the input mask member is NULL, the procedure uses
the widget's XmNpattern as the output pattern; otherwise, it extracts
the output pattern from the input mask. If the resulting output pat‐
tern is empty, the procedure uses a pattern that matches all files
instead.
The data qualification procedure constructs the output mask from the
output dir and pattern. The procedure must ensure that the output dir,
pattern, and mask are fully qualified.
If the input value member is not NULL, the procedure must copy it to
the output value member; otherwise, the procedure must copy the wid‐
get's XmNdirSpec to the output value.
The data qualification procedure must calculate the lengths of the out‐
put value, mask, dir, and pattern members and must fill in the corre‐
sponding length members of the output callback struct.
The data qualification procedure must copy the input reason and event
members to the corresponding output members.
The values of the XmNdirSearchProc and XmNfileSearchProc are procedure
pointers of type XmSearchProc, defined as follows:
void (* XmSearchProc) (w, search_data) Widget w; XtPointer‐
search_data; The FileSelectionBox widget Pointer to an XmFileSelection‐
BoxCallbackStruct containing information for conducting a search
The value of the XmNqualifySearchDataProc resource is a procedure
pointer of type XmQualifyProc, defined as follows:
void (* XmQualifyProc) (w, input_data, output_data) Widget w;
XtPointerinput_data; XtPointeroutput_data; The FileSelection‐
Box widget Pointer to an XmFileSelectionBoxCallbackStruct containing
input data to be qualified Pointer to an XmFileSelectionBoxCallback‐
Struct containing output data to be filled in by the qualification pro‐
cedure
Inherited Resources
FileSelectionBox inherits behavior and resources from the following
superclasses. For a complete description of each resource, refer to
the man page for that superclass.
XmSelectionBox Resource Set
──────────────────────────────────────────────────────────────────
Name Default Access
Class Type
──────────────────────────────────────────────────────────────────
──────────────────────────────────────────────────────────────────
XmNapplyCallback NULL C
XmCCallback XtCallbackList
──────────────────────────────────────────────────────────────────
XmNapplyLabelString dynamic CSG
XmCApplyLabelString XmString
──────────────────────────────────────────────────────────────────
XmNcancelCallback NULL C
XmCCallback XtCallbackList
──────────────────────────────────────────────────────────────────
XmNcancelLabelString dynamic CSG
XmCCancelLabelString XmString
──────────────────────────────────────────────────────────────────
XmNchildPlacement XmPLACE_ABOVE_SELECTION CSG
XmCChildPlacement unsigned char
──────────────────────────────────────────────────────────────────
XmNdialogType XmDIALOG_FILE_SELECTION G
XmCDialogType unsigned char
──────────────────────────────────────────────────────────────────
XmNhelpLabelString dynamic CSG
XmCHelpLabelString XmString
──────────────────────────────────────────────────────────────────
XmNlistItemCount dynamic CSG
XmCItemCount int
──────────────────────────────────────────────────────────────────
XmNlistItems dynamic CSG
XmCItems XmStringTable
──────────────────────────────────────────────────────────────────
XmNlistLabelString dynamic CSG
XmCListLabelString XmString
──────────────────────────────────────────────────────────────────
XmNlistVisibleItemCount dynamic CSG
XmCVisibleItemCount int
──────────────────────────────────────────────────────────────────
XmNminimizeButtons False CSG
XmCMinimizeButtons Boolean
──────────────────────────────────────────────────────────────────
XmNmustMatch False CSG
XmCMustMatch Boolean
──────────────────────────────────────────────────────────────────
XmNnoMatchCallback NULL C
XmCCallback XtCallbackList
──────────────────────────────────────────────────────────────────
XmNokCallback NULL C
XmCCallback XtCallbackList
──────────────────────────────────────────────────────────────────
XmNokLabelString dynamic CSG
XmCOkLabelString XmString
──────────────────────────────────────────────────────────────────
XmNselectionLabelString dynamic CSG
XmCSelectionLabelString XmString
──────────────────────────────────────────────────────────────────
XmNtextAccelerators default C
XmCTextAccelerators XtAccelerators
──────────────────────────────────────────────────────────────────
XmNtextColumns dynamic CSG
XmCColumns short
──────────────────────────────────────────────────────────────────
XmNtextString dynamic CSG
XmCTextString XmString
──────────────────────────────────────────────────────────────────
XmBulletinBoard Resource Set
──────────────────────────────────────────────────────────
Name Default Access
Class Type
──────────────────────────────────────────────────────────
──────────────────────────────────────────────────────────
XmNallowOverlap True CSG
XmCAllowOverlap Boolean
──────────────────────────────────────────────────────────
XmNautoUnmanage False CG
XmCAutoUnmanage Boolean
──────────────────────────────────────────────────────────
XmNbuttonFontList dynamic CSG
XmCButtonFontList XmFontList
──────────────────────────────────────────────────────────
XmNcancelButton Cancel button SG
XmCWidget Widget
──────────────────────────────────────────────────────────
XmNdefaultButton OK button SG
XmCWidget Widget
──────────────────────────────────────────────────────────
XmNdefaultPosition True CSG
XmCDefaultPosition Boolean
──────────────────────────────────────────────────────────
XmNdialogStyle dynamic CSG
XmCDialogStyle unsigned char
──────────────────────────────────────────────────────────
XmNdialogTitle NULL CSG
XmCDialogTitle XmString
──────────────────────────────────────────────────────────
XmNfocusCallback NULL C
XmCCallback XtCallbackList
──────────────────────────────────────────────────────────
XmNlabelFontList dynamic CSG
XmCLabelFontList XmFontList
──────────────────────────────────────────────────────────
XmNmapCallback NULL C
XmCCallback XtCallbackList
──────────────────────────────────────────────────────────
XmNmarginHeight 10 CSG
XmCMarginHeight Dimension
──────────────────────────────────────────────────────────
XmNmarginWidth 10 CSG
XmCMarginWidth Dimension
──────────────────────────────────────────────────────────
XmNnoResize False CSG
XmCNoResize Boolean
──────────────────────────────────────────────────────────
XmNresizePolicy XmRESIZE_ANY CSG
XmCResizePolicy unsigned char
──────────────────────────────────────────────────────────
XmNshadowType XmSHADOW_OUT CSG
XmCShadowType unsigned char
──────────────────────────────────────────────────────────
XmNtextFontList dynamic CSG
XmCTextFontList XmFontList
──────────────────────────────────────────────────────────
XmNtextTranslations NULL C
XmCTranslations XtTranslations
──────────────────────────────────────────────────────────
XmNunmapCallback NULL C
XmCCallback XtCallbackList
──────────────────────────────────────────────────────────
XmManager Resource Set
────────────────────────────────────────────────────────────────
Name Default Access
Class Type
────────────────────────────────────────────────────────────────
────────────────────────────────────────────────────────────────
XmNbottomShadowColor dynamic CSG
XmCBottomShadowColor Pixel
────────────────────────────────────────────────────────────────
XmNbottomShadowPixmap XmUNSPECIFIED_PIXMAP CSG
XmCBottomShadowPixmap Pixmap
────────────────────────────────────────────────────────────────
XmNforeground dynamic CSG
XmCForeground Pixel
────────────────────────────────────────────────────────────────
XmNhelpCallback NULL C
XmCCallback XtCallbackList
────────────────────────────────────────────────────────────────
XmNhighlightColor dynamic CSG
XmCHighlightColor Pixel
────────────────────────────────────────────────────────────────
XmNhighlightPixmap dynamic CSG
XmCHighlightPixmap Pixmap
────────────────────────────────────────────────────────────────
XmNinitialFocus dynamic CSG
XmCInitialFocus Widget
────────────────────────────────────────────────────────────────
XmNnavigationType XmTAB_GROUP CSG
XmCNavigationType XmNavigationType
────────────────────────────────────────────────────────────────
XmNshadowThickness dynamic CSG
XmCShadowThickness Dimension
────────────────────────────────────────────────────────────────
XmNstringDirection dynamic CG
XmCStringDirection XmStringDirection
────────────────────────────────────────────────────────────────
XmNtopShadowColor dynamic CSG
XmCTopShadowColor Pixel
────────────────────────────────────────────────────────────────
XmNtopShadowPixmap dynamic CSG
XmCTopShadowPixmap Pixmap
────────────────────────────────────────────────────────────────
XmNtraversalOn True CSG
XmCTraversalOn Boolean
────────────────────────────────────────────────────────────────
XmNunitType dynamic CSG
XmCUnitType unsigned char
────────────────────────────────────────────────────────────────
XmNuserData NULL CSG
XmCUserData XtPointer
────────────────────────────────────────────────────────────────
Composite Resource Set
──────────────────────────────────────────────────────
Name Default Access
Class Type
──────────────────────────────────────────────────────
──────────────────────────────────────────────────────
XmNchildren NULL G
XmCReadOnly WidgetList
──────────────────────────────────────────────────────
XmNinsertPosition NULL CSG
XmCInsertPosition XtOrderProc
──────────────────────────────────────────────────────
XmNnumChildren 0 G
XmCReadOnly Cardinal
──────────────────────────────────────────────────────
Core Resource Set
─────────────────────────────────────────────────────────────────────
Name Default Access
Class Type
─────────────────────────────────────────────────────────────────────
─────────────────────────────────────────────────────────────────────
XmNaccelerators dynamic N/A
XmCAccelerators XtAccelerators
─────────────────────────────────────────────────────────────────────
XmNancestorSensitive dynamic G
XmCSensitive Boolean
─────────────────────────────────────────────────────────────────────
XmNbackground dynamic CSG
XmCBackground Pixel
─────────────────────────────────────────────────────────────────────
XmNbackgroundPixmap XmUNSPECIFIED_PIXMAP CSG
XmCPixmap Pixmap
─────────────────────────────────────────────────────────────────────
XmNborderColor XtDefaultForeground CSG
XmCBorderColor Pixel
─────────────────────────────────────────────────────────────────────
XmNborderPixmap XmUNSPECIFIED_PIXMAP CSG
XmCPixmap Pixmap
─────────────────────────────────────────────────────────────────────
XmNborderWidth 0 CSG
XmCBorderWidth Dimension
─────────────────────────────────────────────────────────────────────
XmNcolormap dynamic CG
XmCColormap Colormap
─────────────────────────────────────────────────────────────────────
XmNdepth dynamic CG
XmCDepth int
─────────────────────────────────────────────────────────────────────
XmNdestroyCallback NULL C
XmCCallback XtCallbackList
─────────────────────────────────────────────────────────────────────
XmNheight dynamic CSG
XmCHeight Dimension
─────────────────────────────────────────────────────────────────────
XmNinitialResourcesPersistent True C
XmCInitialResourcesPersistent Boolean
─────────────────────────────────────────────────────────────────────
XmNmappedWhenManaged True CSG
XmCMappedWhenManaged Boolean
─────────────────────────────────────────────────────────────────────
XmNscreen dynamic CG
XmCScreen Screen *
─────────────────────────────────────────────────────────────────────
XmNsensitive True CSG
XmCSensitive Boolean
─────────────────────────────────────────────────────────────────────
XmNtranslations dynamic CSG
XmCTranslations XtTranslations
─────────────────────────────────────────────────────────────────────
XmNwidth dynamic CSG
XmCWidth Dimension
─────────────────────────────────────────────────────────────────────
XmNx 0 CSG
XmCPosition Position
─────────────────────────────────────────────────────────────────────
XmNy 0 CSG
XmCPosition Position
─────────────────────────────────────────────────────────────────────
Callback Information
A pointer to the following structure is passed to each callback: type‐
def struct { int reason; XEvent * event; XmString value;
int length; XmString mask; int mask_length;
XmString dir; int dir_length; XmString pattern;
int pattern_length; } XmFileSelectionBoxCallbackStruct; Indi‐
cates why the callback was invoked Points to the XEvent that triggered
the callback Specifies the current value of XmNdirSpec Specifies the
number of bytes in value Specifies the current value of XmNdirMask
Specifies the number of bytes in mask Specifies the current base direc‐
tory Specifies the number of bytes in dir Specifies the current search
pattern Specifies the number of bytes in pattern
Translations
XmFileSelectionBox inherits translations from XmSelectionBox.
Accelerators
The XmNtextAccelerators from XmSelectionBox are added to the selection
and directory mask (filter) Text descendants of XmFileSelectionBox.
Action Routines
The XmFileSelectionBox action routines are described below: If neither
the selection text nor the directory mask (filter) text has the focus,
this action does nothing.
If the selection text has the focus, the term list in the following
description refers to the file list, and the term text refers to the
selection text. If the directory mask text has the focus, list refers
to the directory list, and text refers to the directory mask text.
When called with a 0 argument, selects the previous item in the list
and replaces the text with that item.
When called with a 1 argument, selects the next item in the list and
replaces the text with that item.
When called with a 2 argument, selects the first item in the list and
replaces the text with that item.
When called with a 3 argument, selects the last item in the list and
replaces the text with that item. If neither the selection text nor
the directory mask (filter) text has the focus, this action does noth‐
ing.
If the selection text has the focus, replaces the selection text with
the selected item in the file list. If no item in the file list is
selected, clears the selection text.
If the directory mask text has the focus, replaces the directory mask
text with a new directory mask constructed from the XmNdirectory and
XmNpattern resources.
Additional Behavior
The FileSelectionBox widget has the additional behavior described
below: Calls the activate callbacks for the cancel button if it is sen‐
sitive. If no cancel button exists and the parent of the FileSelec‐
tionBox is a manager, passes the event to the parent. Calls the selec‐
tion text widget's XmNactivateCallback callbacks. If XmNmustMatch is
True and the selection text does not match an item in the file list,
calls the XmNnoMatchCallback callbacks with reason XmCR_NO_MATCH. Oth‐
erwise, calls the XmNokCallback callbacks with reason XmCR_OK. Calls
the directory mask text widget's XmNactivateCallback callbacks. Initi‐
ates a directory and file search. Calls the XmNapplyCallback callbacks
with reason XmCR_APPLY. Calls the directory list widget's XmNdefault‐
ActionCallback callbacks. Initiates a directory and file search.
Calls the XmNapplyCallback callbacks with reason XmCR_APPLY. Calls the
file list widget's XmNdefaultActionCallback callbacks. Calls the
XmNokCallback callbacks with reason XmCR_OK. Generates a new directory
mask, using the selected list item as the directory and the pattern
extracted from the current directory mask text as the search pattern.
If the search pattern is empty, uses a pattern that matches all files
in the directory. Replaces the directory mask text with the new direc‐
tory mask. Replaces the selection text with the selected list item.
Drags the content of one or more selected list items using the drag and
drop facility. If BDrag is pressed on an unselected item, drags only
that item, excluding any other selected items.
The XmNexportTargets resource of the associated DragContext is set to
target types of COMPOUND_TEXT and FILE_NAME. The XmNclientData
resource is set to the index of the item in the list. Drags the con‐
tent of one or more selected list items using the drag and drop facil‐
ity. If BDrag is pressed on an unselected item, drags only that item,
excluding any other selected items.
The XmNexportTargets resource of the associated DragContext is set to
target types of COMPOUND_TEXT and FILE_NAME. The XmNclientData
resource is set to the index of the item in the list. Initiates a
directory and file search. Calls the XmNapplyCallback callbacks with
reason XmCR_APPLY. If XmNmustMatch is True and the selection text does
not match an item in the file list, calls the XmNnoMatchCallback call‐
backs with reason XmCR_NO_MATCH. Otherwise, calls the XmNokCallback
callbacks with reason XmCR_OK. Calls the XmNcancelCallback callbacks
with reason XmCR_CANCEL. Calls the XmNhelpCallback callbacks with rea‐
son XmCR_HELP. If no button, list widget, or text widget has the key‐
board focus: If XmNmustMatch is True and the selection text does not
match an item in the file list, calls the XmNnoMatchCallback callbacks
with reason XmCR_NO_MATCH. Otherwise, calls the XmNokCallback call‐
backs with reason XmCR_OK.
Virtual Bindings
The bindings for virtual keys are vendor specific. For information
about bindings for virtual buttons and keys, see VirtualBindings(3X).
RELATED INFORMATIONComposite(3X), Constraint(3X), Core(3X), XmBulletinBoard(3X), XmCreate‐
FileSelectionBox(3X), XmCreateFileSelectionDialog(3X), XmFileSelection‐
BoxGetChild(3X), XmFileSelectionDoSearch(3X), XmManager(3X), and XmSe‐
lectionBox(3X).
XmFileSelectionBox(3X)