home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 January / Chip_1997-01_cd.bin / ms95 / disk22 / dir04 / f011070.re_ / f011070.re
Text File  |  1996-04-02  |  7KB  |  188 lines

  1. /*----------------------------------------------------------------------+
  2. |                                    |
  3. |  Copyright (c) 1985-93;  Bentley Systems, Inc., All rights reserved.    |
  4. |                                    |
  5. | "MicroStation", "MDL", and "MicroCSL" are trademarks of Bentley    |
  6. |  Systems, Inc.                            |
  7. |                                    |
  8. |  Limited permission is hereby granted to reproduce and modify this    |
  9. |  copyrighted material provided that the resulting code is used only     |
  10. |  in conjunction with Bentley Systems products under the terms of the    |
  11. |  license agreement provided therein, and that this notice is retained    |
  12. |  in its entirety in any such reproduction or modification.        |
  13. |                                    |
  14. +----------------------------------------------------------------------*/
  15. /*----------------------------------------------------------------------+
  16. |                                    |
  17. |   $Workfile:   filelist.h  $
  18. |   $Revision:   6.9  $
  19. |          $Date:   19 Sep 1995 14:01:46  $
  20. |                                    |
  21. +----------------------------------------------------------------------*/
  22. #ifndef __filelistH__
  23. #define __filelistH__
  24.  
  25. #if !defined (__rscdefsH__)
  26. #   include <rscdefs.h>
  27. #endif
  28.  
  29. /*----------------------------------------------------------------------+
  30. |                                    |
  31. |   File User Message Constants                        |
  32. |                                    |
  33. +----------------------------------------------------------------------*/
  34. #define FILELISTTYPE_UPDATE        1
  35. #define FILELISTTYPE_SETFILENAME    2
  36. #define FILELISTTYPE_SETFILTER        3
  37. #define FILELISTTYPE_CLEARFILENAME  4
  38. #define FILELISTTYPE_SETDIRECTORY   5
  39.  
  40. #define FILELISTDATA_DRIVES        1
  41. #define FILELISTDATA_DIRECTORIES    2
  42. #define FILELISTDATA_FILES        3
  43.  
  44. /*----------------------------------------------------------------------+
  45. |                                    |
  46. |   File List Attributes Constants                    |
  47. |                                    |
  48. +----------------------------------------------------------------------*/
  49. #define FILELISTATTR_SORT        0x00000001
  50. #define FILELISTATTR_UNIQUE        0x00000002
  51. #define FILELISTATTR_CASESENSITIVE    0x00000004
  52. #define FILELISTATTR_MULTIPLE        0x00000008
  53. #define FILELISTATTR_CANSELECTEXISTING  0x00000010
  54. #define FILELISTATTR_CANSELECTNEW    0x00000020
  55.  
  56. #define FILELISTATTR_DRIVES        0x00000040
  57. #define FILELISTATTR_DIRECTORIES    0x00000080
  58. #define FILELISTATTR_FILES        0x00000100
  59.  
  60. /*----------------------------------------------------------------------+
  61. |                                    |
  62. | FILELISTATTR_REPLACEDIRDOTS will return the names of the current and  |
  63. |    parent directories.  It will also replace ".." and "." with the    |
  64. |    actual directory names.  Note that this is only valid in        |
  65. |    combination with FILELISTATTR_DIRECTORIES                |
  66. |                                    |
  67. +----------------------------------------------------------------------*/
  68. #define FILELISTATTR_REPLACEDIRDOTS    0x00000200  
  69.  
  70. /*----------------------------------------------------------------------+
  71. |                                        |
  72. |   If FILELISTATTR_DRIVES is set FILELISTATTR_NODRIVEBRACKETS will     |
  73. |   return a drive list (on DOS & NT) without the enclosing "[]".       |
  74. |                                        |
  75. +----------------------------------------------------------------------*/
  76. #define FILELISTATTR_NODRIVEBRACKETS    0x00000400
  77.  
  78. /*----------------------------------------------------------------------+
  79. |                                        |
  80. |   If FILELISTATTR_DIRECTORIES is set FILELISTATTR_NOPARENTDIR         |
  81. |       will keep parent directory out of list.                    |
  82. |                                        |
  83. +----------------------------------------------------------------------*/
  84. #define FILELISTATTR_NOPARENTDIR    0x00000800
  85.  
  86. /*----------------------------------------------------------------------+
  87. |                                    |
  88. | If you are doing a create and the file to be created already exists,  |
  89. | specifying the following attribute will put up an alert asking you    |
  90. | to confirm that choice. Choosing OK will overwrite the existing file, |
  91. | Cancel will allow you to choose another file to create.        |
  92. | Ignored for FILELISTATTR_MULTIPLE.                    |
  93. |                                    |
  94. +----------------------------------------------------------------------*/
  95. #define FILELISTATTR_ALERTONCREATEEXIST    0x00001000
  96.  
  97. /*----------------------------------------------------------------------+
  98. |                                    |
  99. | Part of FILELISTATTR_CREATEFROMSEED.                        |
  100. |                                    |
  101. +----------------------------------------------------------------------*/
  102. #define FILELISTATTR_SEEDFILESPECIFIED    0x00002000
  103.  
  104. /*----------------------------------------------------------------------+
  105. |                                    |
  106. | Common attribute sets                                |
  107. |                                    |
  108. +----------------------------------------------------------------------*/
  109. #define FILELISTATTR_OPEN        FILELISTATTR_CANSELECTEXISTING
  110.  
  111. #define FILELISTATTR_CREATE        (FILELISTATTR_CANSELECTNEW | \
  112.                      FILELISTATTR_ALERTONCREATEEXIST)
  113.  
  114. #define FILELISTATTR_CREATEFROMSEED (FILELISTATTR_CREATE | \
  115.                      FILELISTATTR_SEEDFILESPECIFIED)
  116.  
  117. #define FILELISTATTR_OPENCREATE        (FILELISTATTR_CANSELECTEXISTING | \
  118.                      FILELISTATTR_CANSELECTNEW | \
  119.                      FILELISTATTR_ALERTONCREATEEXIST)
  120.  
  121. #define FILELISTATTR_DEFAULT        (FILELISTATTR_SORT | \
  122.                      FILELISTATTR_UNIQUE | \
  123.                      FILELISTATTR_MULTIPLE | \
  124.                      FILELISTATTR_OPEN | \
  125.                      FILELISTATTR_FILES)
  126.  
  127.  
  128. typedef struct filelistinfo
  129.     {
  130.     int        lastAction;
  131.     char    lastDirectory[MAXFILELENGTH];
  132.     char    lastFilter[MAXEXTENSIONLENGTH];
  133.     } FileListInfo;
  134.  
  135. /*----------------------------------------------------------------------+
  136. |                                    |
  137. | Possible attributes for mdlDialog_fileOpenExt                    |
  138. |                                    |
  139. +----------------------------------------------------------------------*/
  140. #define FILEOPENEXTATTR_CENTERONSCREEN    0x00000001
  141.  
  142. /*----------------------------------------------------------------------+
  143. |                                    |
  144. | Structure used with mdlDialog_fileOpenExt                    |
  145. |                                    |
  146. +----------------------------------------------------------------------*/
  147. typedef struct fileopenparams
  148.     {
  149.     RscFileHandle   dialogRscH;
  150.     int            dialogId;
  151.     int            openCreate;
  152.     char        *suggestedFileNameP;
  153.     char        *defaultFilterP;
  154.     char        *filterInfoStrP;
  155.     char        *defaultDirP;
  156.     char        *dirCfgVarP;
  157.     char        *titleP;
  158.     int            defFileId;
  159.     RscFileHandle   defFileRscH;
  160.     void        *dialogOwnerMD; /* no longer used */
  161.  
  162.     /* only valid for FILELISTATTR_CREATEFROMSEED */
  163.     char        *defSeedFileNameP;
  164.     char        *defSeedDirP;
  165.     char        *defSeedFilterP;
  166.     int            defSeedFileId;
  167.  
  168.     /* future use */
  169.     int            futureUse[7];
  170.     char        *futureUseCharP[4];
  171.  
  172.     } FileOpenParams;
  173.  
  174. /*----------------------------------------------------------------------+
  175. |                                    |
  176. | Structure returned by mdlDialog_fileOpenExt                    |
  177. |                                    |
  178. +----------------------------------------------------------------------*/
  179. typedef struct fileopenextrainfo
  180.     {
  181.     char    dirCfgVar[MAXNAMELENGTH];       /* name of cfg var used to select dir */
  182.     char    seedFileName[MAXFILELENGTH];    /* seed file used to create new file  */
  183.  
  184.     } FileOpenExtraInfo;
  185.     
  186.  
  187. #endif
  188.