home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 January / Chip_1997-01_cd.bin / ms95 / disk22 / dir03 / f015400.re_ / f015400.re
Text File  |  1996-04-02  |  9KB  |  247 lines

  1. /*----------------------------------------------------------------------+
  2. |                                    |
  3. |  Copyright (1995) Bentley Systems, Inc., All rights reserved.        |
  4. |                                    |
  5. |  "MicroStation" is a registered trademark and "MDL" and "MicroCSL"    |
  6. |  are trademarks of Bentley 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. |    $Logfile:   J:/mdl/examples/listbox/listbox.h_v  $
  18. |   $Workfile:   listbox.h  $
  19. |   $Revision:   1.1  $
  20. |       $Date:   29 Jun 1995 15:33:42  $
  21. |                                    |
  22. +----------------------------------------------------------------------*/
  23. /*----------------------------------------------------------------------+
  24. |                                    |
  25. |   listbox.h                                |
  26. |                                    |
  27. |    Constants & types used in new items dialog example        |
  28. |                                    |
  29. +----------------------------------------------------------------------*/
  30. #if !defined (__listboxH__)
  31. #define        __listboxH__
  32.  
  33. #ifndef __dlogitemH__
  34. #include <dlogitem.h>
  35. #endif
  36.  
  37. /*----------------------------------------------------------------------+
  38. |                                    |
  39. |   Resource ID's                            |
  40. |                                    |
  41. +----------------------------------------------------------------------*/
  42. #define BASEID_ListBox                    20
  43.  
  44. /*----------------------------------------------------------------------+
  45. |                                    |
  46. |   Dialog Box ID's                            |
  47. |                                    |
  48. +----------------------------------------------------------------------*/
  49. #define DIALOGID_ListIcon                (BASEID_ListBox + 1)
  50. #define DIALOGID_MultiList                (BASEID_ListBox + 2)
  51. #define DIALOGID_SashList                (BASEID_ListBox + 3)
  52. #define DIALOGID_ColorList                (BASEID_ListBox + 4)
  53.  
  54. /*----------------------------------------------------------------------+
  55. |                                    |
  56. |   List Box ID's                            |
  57. |                                    |
  58. +----------------------------------------------------------------------*/
  59. #define LISTBOXID_Directories                (BASEID_ListBox - 1)
  60. #define LISTBOXID_Choices                (BASEID_ListBox - 2)
  61. #define LISTBOXID_Sash1                    (BASEID_ListBox - 3)
  62. #define LISTBOXID_Sash2                    (BASEID_ListBox - 4)
  63. #define LISTBOXID_Multi                    (BASEID_ListBox - 5)
  64. #define LISTBOXID_SelectionList                (BASEID_ListBox - 6)
  65. #define LISTBOXID_ColoredList                (BASEID_ListBox - 7)
  66.                     
  67. /*----------------------------------------------------------------------+
  68. |                                    |
  69. |   Text ID's                                |
  70. |                                    |
  71. +----------------------------------------------------------------------*/
  72. #define TEXTID_Directory                (BASEID_ListBox - 1)
  73.  
  74. /*----------------------------------------------------------------------+
  75. |                                    |
  76. |   Sash ID's                                |
  77. |                                    |
  78. +----------------------------------------------------------------------*/
  79. #define SASHID_Example                    (BASEID_ListBox - 1)
  80.         
  81. /*----------------------------------------------------------------------+
  82. |                                    |
  83. |   Menu Bar ID's                            |
  84. |                                    |
  85. +----------------------------------------------------------------------*/
  86. #define MENUBARID_MultiList                (BASEID_ListBox - 1)
  87.                  
  88. /*----------------------------------------------------------------------+
  89. |                                    |
  90. |   Synonym ID's                            |
  91. |                                    |
  92. +----------------------------------------------------------------------*/
  93. #define SYNONYMID_MultiList                (BASEID_ListBox - 1)
  94.                  
  95. /*----------------------------------------------------------------------+
  96. |                                    |
  97. |   Pulldown Menu ID's                            |
  98. |                                    |
  99. +----------------------------------------------------------------------*/
  100. #define PULLDOWNMENUID_ListBox                (BASEID_ListBox - 1)
  101. #define PULLDOWNMENUID_MultiListTests            (BASEID_ListBox - 2)
  102. #define PULLDOWNMENUID_MultiListModify            (BASEID_ListBox - 3)
  103. #define PULLDOWNMENUID_MultiListSelect            (BASEID_ListBox - 4)
  104. #define PULLDOWNMENUID_MultiListPosition        (BASEID_ListBox - 5)
  105. #define PULLDOWNMENUID_MultiListLocation        (BASEID_ListBox - 6)
  106.  
  107. /*----------------------------------------------------------------------+
  108. |                                    |
  109. |   Menu Search ID's                            |
  110. |                                    |
  111. +----------------------------------------------------------------------*/
  112. #define MENUSEARCHID_ResetList        1
  113. #define MENUSEARCHID_RecreateList    2
  114. #define MENUSEARCHID_AddTop        3
  115. #define MENUSEARCHID_AddBottom        4
  116. #define MENUSEARCHID_AddSelection    5
  117. #define MENUSEARCHID_DeleteSelection    6
  118. #define MENUSEARCHID_ToggleAddMode    7
  119.  
  120. #define MENUSEARCHID_SelectTop        1
  121. #define MENUSEARCHID_SelectBottom    2
  122. #define MENUSEARCHID_SelectEveryOther    3
  123. #define MENUSEARCHID_SelectAll        4
  124. #define MENUSEARCHID_DeselectTop    5
  125. #define MENUSEARCHID_DeselectBottom    6
  126. #define MENUSEARCHID_DeselectAll    7
  127.  
  128. #define MENUSEARCHID_Top1st        1
  129. #define MENUSEARCHID_BottomLast        2
  130. #define MENUSEARCHID_TopSelection    3
  131.  
  132. #define MENUSEARCHID_LocationTop    1
  133. #define MENUSEARCHID_LocationBottom    2
  134. #define MENUSEARCHID_LocationSelection    3
  135.  
  136. /*----------------------------------------------------------------------+
  137. |                                    |
  138. |   Option button ID's                                |
  139. |                                    |
  140. +----------------------------------------------------------------------*/
  141. #define OPTIONBTNID_SelectionMode            (BASEID_ListBox - 1)
  142.  
  143. /*----------------------------------------------------------------------+
  144. |                                    |
  145. |   Toggle button ID's                                |
  146. |                                    |
  147. +----------------------------------------------------------------------*/
  148. #define TOGGLEBTNID_Colored                 (BASEID_ListBox - 1)
  149.  
  150. /*----------------------------------------------------------------------+
  151. |                                    |
  152. |   Message List IDs                            |
  153. |                                    |
  154. +----------------------------------------------------------------------*/
  155. #define MESSAGELISTID_ListBox                (BASEID_ListBox - 1)
  156.  
  157. /*----------------------------------------------------------------------+
  158. |                                    |
  159. |   Message List Entry Ids                        |
  160. |                                    |
  161. +----------------------------------------------------------------------*/
  162. #define MSGID_CommandTable                (BASEID_ListBox + 1)
  163. #define MSGID_DialogBox                    (BASEID_ListBox + 2)
  164. #define MSGID_DirSelection                (BASEID_ListBox + 3)
  165. #define MSGID_CheckBoxPopulateErr            (BASEID_ListBox + 4)
  166. #define MSGID_Line                    (BASEID_ListBox + 5)
  167. #define MSGID_Left                    (BASEID_ListBox + 6)
  168. #define MSGID_Right                    (BASEID_ListBox + 7)
  169. #define MSGID_LeftAfter                    (BASEID_ListBox + 8)
  170. #define MSGID_LeftBefore                (BASEID_ListBox + 9)
  171.  
  172. /*----------------------------------------------------------------------+
  173. |                                    |
  174. |   Hook Function ID's                            |
  175. |                                    |
  176. +----------------------------------------------------------------------*/
  177. #define HOOKDIALOGID_ListIcon                (BASEID_ListBox + 1)
  178. #define HOOKDIALOGID_DialogSash                (BASEID_ListBox + 2)
  179. #define HOOKDIALOGID_MultiList                (BASEID_ListBox + 3)
  180. #define HOOKDIALOGID_Colors                (BASEID_ListBox + 4)
  181.  
  182. #define HOOKITEMID_ListIcon_FileListDirectory    (BASEID_ListBox - 1)
  183. #define HOOKITEMID_CheckListBox                (BASEID_ListBox - 2)
  184. #define HOOKITEMID_ListBoxSash                (BASEID_ListBox    - 3)
  185. #define    HOOKITEMID_Sash                    (BASEID_ListBox    - 4)
  186. #define HOOKITEMID_PDMMultiListTests            (BASEID_ListBox    - 5)
  187. #define HOOKITEMID_ListBoxMulti                (BASEID_ListBox    - 6)
  188. #define HOOKITEMID_ToggleBtnColor            (BASEID_ListBox    - 7)
  189. #define HOOKITEMID_ColoredListBox            (BASEID_ListBox    - 8)
  190.  
  191.  
  192. /*----------------------------------------------------------------------+
  193. |                                    |
  194. |   Selection Modes                            |
  195. |                                    |
  196. +----------------------------------------------------------------------*/
  197. #define SELECTIONMODE_BROWSE    0
  198. #define SELECTIONMODE_SINGLE    1
  199. #define SELECTIONMODE_MULTI    2
  200. #define SELECTIONMODE_EXTENDED    3
  201.  
  202. /*----------------------------------------------------------------------+
  203. |                                    |
  204. |   Color Descriptor Array Indices                    |
  205. |                                    |
  206. +----------------------------------------------------------------------*/
  207. #define LCOLOR_BACKGROUND    0
  208. #define LCOLOR_TOPSHADOW    1
  209. #define LCOLOR_BOTTOMSHADOW    2
  210. #define LCOLOR_SELECT        3
  211. #define LCOLOR_FGTEXT        4
  212. #define LCOLOR_BGTEXT        5
  213. #define LCOLOR_DGN        6
  214. #define    LCOLOR_LABELTEXT    7
  215.  
  216. #define NLOCAL_COLORS        8
  217.  
  218. /*----------------------------------------------------------------------+
  219. |                                    |
  220. |   Typedefs                                |
  221. |                                    |
  222. +----------------------------------------------------------------------*/
  223. #if !defined (resource)
  224. typedef struct listboxglobals
  225.     {
  226.     int          colorToggle;
  227.  
  228.     int         minSashY;
  229.     int         maxSashY;
  230.     int         selectionMode;
  231.  
  232.     char     string[80];
  233.     DialogBox    *multiSelectDbP;
  234.     DialogItem    *labelDiP;        /* label item in multi-select dialog */
  235.     DialogItem    *multiListDiP;
  236.     DialogItem    *selectionListDiP;
  237.     int         nColumns;        /* # of columns in multiSelect list */
  238.  
  239.     /* Global color information */
  240.     BSIColorDescr *localColorsP[NLOCAL_COLORS];
  241.     BSIColorPalette *localPalP;
  242.     
  243.     char directoryName[MAXDIRLENGTH];    
  244.     } ListBoxGlobals;
  245. #endif
  246.  
  247. #endif /* __listboxH__ */