Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:15:25

0001 /* 
0002  * Motif
0003  *
0004  * Copyright (c) 1987-2012, The Open Group. All rights reserved.
0005  *
0006  * These libraries and programs are free software; you can
0007  * redistribute them and/or modify them under the terms of the GNU
0008  * Lesser General Public License as published by the Free Software
0009  * Foundation; either version 2 of the License, or (at your option)
0010  * any later version.
0011  *
0012  * These libraries and programs are distributed in the hope that
0013  * they will be useful, but WITHOUT ANY WARRANTY; without even the
0014  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
0015  * PURPOSE. See the GNU Lesser General Public License for more
0016  * details.
0017  *
0018  * You should have received a copy of the GNU Lesser General Public
0019  * License along with these librararies and programs; if not, write
0020  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
0021  * Floor, Boston, MA 02110-1301 USA
0022 */ 
0023 #ifndef _XmFSelectP_h
0024 #define _XmFSelectP_h
0025 
0026 #include <Xm/SelectioBP.h>
0027 #include <Xm/FileSB.h>
0028 
0029 #ifdef __cplusplus
0030 extern "C" {
0031 #endif
0032 
0033 /* Defines for use in allocation geometry matrix. */
0034 
0035 #define XmFSB_MAX_WIDGETS_VERT   12 
0036 
0037 /* Bit locations for the state_flags bit field.
0038 */
0039 #define XmFS_NO_MATCH       (1 << 0)
0040 #define XmFS_IN_FILE_SEARCH (1 << 1)
0041 #define XmFS_DIR_SEARCH_PROC    (1 << 2)
0042 
0043 /* Constraint part record for FileSelectionBox widget */
0044 
0045 typedef struct _XmFileSelectionBoxConstraintPart
0046 {
0047    char unused;
0048 } XmFileSelectionBoxConstraintPart, * XmFileSelectionBoxConstraint;
0049 
0050 /*  New fields for the FileSelectionBox widget class record  */
0051 
0052 typedef struct
0053 {
0054     XtPointer           extension;      /* Pointer to extension record */
0055 } XmFileSelectionBoxClassPart;
0056 
0057 
0058 /* Full class record declaration */
0059 
0060 typedef struct _XmFileSelectionBoxClassRec
0061 {
0062    CoreClassPart       core_class;
0063    CompositeClassPart  composite_class;
0064    ConstraintClassPart constraint_class;
0065    XmManagerClassPart  manager_class;
0066    XmBulletinBoardClassPart    bulletin_board_class;
0067    XmSelectionBoxClassPart    selection_box_class;
0068    XmFileSelectionBoxClassPart    file_selection_box_class;
0069 } XmFileSelectionBoxClassRec;
0070 
0071 externalref XmFileSelectionBoxClassRec xmFileSelectionBoxClassRec;
0072 
0073 
0074 /* New fields for the FileSelectionBox widget record */
0075 
0076 typedef struct
0077 {
0078     XmString        directory;        /* directory specification */
0079     XmString        pattern;          /* file search pattern */
0080     Widget          dir_list_label;   /* directory list Label */
0081     XmString        dir_list_label_string;/* directory list label text */
0082     Widget          dir_list;         /* directory List */
0083     XmString *      dir_list_items;   /* items in directory List */
0084     int             dir_list_item_count;/* number of items in directory List */
0085     int             dir_list_selected_item_position;
0086     Widget          filter_label;     /* file search filter label */
0087     XmString        filter_label_string;/* filter label text */
0088     Widget          filter_text;      /* filter text entry field */
0089     XmString        dir_mask;         /* string in filter text entry field */
0090     XmString        no_match_string;  /* string in list when no file match */
0091     XmQualifyProc   qualify_search_data_proc; /* directory and mask routine */
0092     XmSearchProc    dir_search_proc;  /* change directory routine */
0093     XmSearchProc    file_search_proc; /* file search routine */
0094     unsigned char   file_type_mask;   /* mask for type of files in file list */
0095     Boolean         list_updated;     /* flag to indicate file list update   */
0096     Boolean         directory_valid ; /* flag to indicate valid new directory*/
0097     unsigned char   state_flags ;     /* internal flags to indicate state.   */
0098 
0099     XtEnum   path_mode ;
0100     XtEnum   file_filter_style ;
0101     Widget          dir_text ; 
0102     Widget          dir_text_label ;
0103     XmString        dir_text_label_string ;
0104     time_t          prev_dir_modtime;
0105 } XmFileSelectionBoxPart;
0106 
0107 
0108 /****************************************************************
0109  *
0110  * Full instance record declaration
0111  *
0112  ****************************************************************/
0113 
0114 typedef struct _XmFileSelectionBoxRec
0115 {
0116     CorePart                core;
0117     CompositePart           composite;
0118     ConstraintPart          constraint;
0119     XmManagerPart           manager;
0120     XmBulletinBoardPart     bulletin_board;
0121     XmSelectionBoxPart      selection_box;
0122     XmFileSelectionBoxPart  file_selection_box;
0123 } XmFileSelectionBoxRec;
0124 
0125 
0126 /* Access macros */
0127 
0128 #define FS_Directory( w) \
0129                 (((XmFileSelectionBoxWidget)(w))->file_selection_box.directory)
0130 #define FS_DirMask( w) \
0131                  (((XmFileSelectionBoxWidget)(w))->file_selection_box.dir_mask)
0132 #define FS_DirListLabel( w) \
0133            (((XmFileSelectionBoxWidget)(w))->file_selection_box.dir_list_label)
0134 #define FS_DirListLabelString( w) \
0135     (((XmFileSelectionBoxWidget)(w))->file_selection_box.dir_list_label_string)
0136 #define FS_DirList( w) \
0137                  (((XmFileSelectionBoxWidget)(w))->file_selection_box.dir_list)
0138 #define FS_DirListItems( w) \
0139            (((XmFileSelectionBoxWidget)(w))->file_selection_box.dir_list_items)
0140 #define FS_DirListItemCount( w) \
0141       (((XmFileSelectionBoxWidget)(w))->file_selection_box.dir_list_item_count)
0142 #define FS_FilterLabel( w) \
0143              (((XmFileSelectionBoxWidget)(w))->file_selection_box.filter_label)
0144 #define FS_FilterLabelString( w) \
0145       (((XmFileSelectionBoxWidget)(w))->file_selection_box.filter_label_string)
0146 #define FS_FilterText( w) \
0147               (((XmFileSelectionBoxWidget)(w))->file_selection_box.filter_text)
0148 #define FS_Pattern( w) \
0149                   (((XmFileSelectionBoxWidget)(w))->file_selection_box.pattern)
0150 #define FS_NoMatchString( w) \
0151           (((XmFileSelectionBoxWidget)(w))->file_selection_box.no_match_string)
0152 #define FS_QualifySearchDataProc( w) (((XmFileSelectionBoxWidget) \
0153                              (w))->file_selection_box.qualify_search_data_proc)
0154 #define FS_DirSearchProc( w) \
0155           (((XmFileSelectionBoxWidget)(w))->file_selection_box.dir_search_proc)
0156 #define FS_FileSearchProc( w) \
0157          (((XmFileSelectionBoxWidget)(w))->file_selection_box.file_search_proc)
0158 #define FS_RealDefaultButton( w) \
0159       (((XmFileSelectionBoxWidget)(w))->file_selection_box.real_default_button)
0160 #define FS_FileTypeMask( w) \
0161            (((XmFileSelectionBoxWidget)(w))->file_selection_box.file_type_mask)
0162 #define FS_ListUpdated( w) \
0163              (((XmFileSelectionBoxWidget)(w))->file_selection_box.list_updated)
0164 #define FS_DirectoryValid( w) \
0165           (((XmFileSelectionBoxWidget)(w))->file_selection_box.directory_valid)
0166 #define FS_StateFlags( w) \
0167               (((XmFileSelectionBoxWidget)(w))->file_selection_box.state_flags)
0168 #define FS_DirListSelectedItemPosition( w) (((XmFileSelectionBoxWidget) w) \
0169                           ->file_selection_box.dir_list_selected_item_position)
0170 
0171 #define FS_PathMode( w) (((XmFileSelectionBoxWidget) w) \
0172                           ->file_selection_box.path_mode)
0173 #define FS_FileFilterStyle( w) (((XmFileSelectionBoxWidget) w) \
0174                           ->file_selection_box.file_filter_style)
0175 #define FS_DirText( w) (((XmFileSelectionBoxWidget) w) \
0176                           ->file_selection_box.dir_text)
0177 #define FS_DirTextLabel( w) (((XmFileSelectionBoxWidget) w) \
0178                           ->file_selection_box.dir_text_label)
0179 #define FS_DirTextLabelString( w) (((XmFileSelectionBoxWidget) w) \
0180                           ->file_selection_box.dir_text_label_string)
0181 #define FS_PrevDirModTime( w) (((XmFileSelectionBoxWidget) w) \
0182                           ->file_selection_box.prev_dir_modtime)
0183 
0184 
0185 /********    Private Function Declarations    ********/
0186 
0187 
0188 /********    End Private Function Declarations    ********/
0189 
0190 
0191 #ifdef __cplusplus
0192 }  /* Close scope of 'extern "C"' declaration which encloses file. */
0193 #endif
0194 
0195 #endif /* _XmFSelectP_h */
0196 /* DON'T ADD ANYTHING AFTER THIS #endif */