home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 January / Chip_1997-01_cd.bin / ms95 / disk22 / dir02 / f017460.re_ / f017460.re
Text File  |  1996-04-02  |  11KB  |  297 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. |   $Workfile:   tagexmpl.r  $
  18. |   $Revision:   6.4  $
  19. |       $Date:   03 Oct 1995 10:57:54  $
  20. |                                    |
  21. +----------------------------------------------------------------------*/
  22. /*----------------------------------------------------------------------+
  23. |                                                                       |
  24. |   tagexmpl.r -  Tag Example resource definitions            |
  25. |                                    |
  26. +----------------------------------------------------------------------*/
  27. /*----------------------------------------------------------------------+
  28. |                                    |
  29. |   Include Files                               |
  30. |                                    |
  31. +----------------------------------------------------------------------*/
  32. #include <dlogbox.h>
  33. #include <dlogids.h>
  34. #include <cmdlist.h>
  35.  
  36. #include "tagexcmd.h"
  37. #include "tagexmpl.h"
  38. #include "tagextxt.h"
  39.  
  40. /*----------------------------------------------------------------------+
  41. |                                    |
  42. |   Dialog Box Resource Specification                    |
  43. |                                    |
  44. +----------------------------------------------------------------------*/
  45.  
  46. #if defined (MSVERSION) && (MSVERSION >= 0x550)
  47.  
  48. /*----------------------------------------------------------------------+
  49. |                                    |
  50. |   Tool Box resources                                |
  51. |                                    |
  52. |   A tool box is defined by creating a dialog box resource and tool     |
  53. |   box resource which have the same identifier.            |
  54. |                                    |
  55. |   The dialog box resource contains only the ToolBox item.        |
  56. |                                    |
  57. +----------------------------------------------------------------------*/
  58. DialogBoxRsc DIALOGID_TagData = 
  59.     {
  60.     DIALOGATTR_TOOLBOXCOMMON,
  61.     0, 0,
  62.     NOHELP, MHELP, 
  63.     NOHOOK, NOPARENTID, 
  64.     "",
  65. {
  66. {{ 0, 0, 0, 0}, ToolBox, DIALOGID_TagData, ON, 0, "", ""},
  67. }
  68.     };
  69.  
  70. /*----------------------------------------------------------------------+
  71. |                                    |
  72. |   The following sample toolbox contains 2 icon commands.           |
  73. |   Note that the auxilary info field (the last parameter) is NULL for    |
  74. |   PowerDraft's or MicroStation's icon commands, but contains the      |
  75. |   string: "owner=\"TAGDISP\"" for the icon command which belongs to    |
  76. |   our application.                                |
  77. |                                    |
  78. +----------------------------------------------------------------------*/
  79. DItem_ToolBoxRsc DIALOGID_TagData =
  80.     {
  81.     NOHELP, MHELPTOPIC, NOHOOK, NOARG, 0, TXT_TagToolBoxTitle,
  82. {
  83. {{ 0, 0, 0, 0}, IconCmd, ICONCMDID_ChooseElement, ON, 0, "", ""},
  84. {{ 0, 0, 0, 0}, IconCmd, ICONCMDID_ChangeTagDisplay, ON, 1, "", "owner=\"TAGEXMPL\""},
  85. {{ 0, 0, 0, 0}, IconCmd, ICONCMDID_TextToTag, ON, 1, "", "owner=\"TAGEXMPL\""},
  86. }
  87.     };
  88.  
  89. #else
  90. /*----------------------------------------------------------------------+
  91. |                                    |
  92. |   Icon Cmd Palette                            |
  93. |                                    |
  94. +----------------------------------------------------------------------*/
  95. DItem_IconCmdPaletteRsc DIALOGID_TagData =
  96.     {
  97.     3, 1, 0, NOHELP, MHELP, NOHOOK, NOARG, TXT_DialogTitle,
  98.     {
  99.      ICONCMDID_ChooseElement,
  100.     ICONCMDID_ChangeTagDisplay,
  101.     ICONCMDID_TextToTag,
  102.     }
  103.     };
  104. #endif /* if defined (MSVERSION) && (MSVERSION >= 0x550) */
  105.  
  106.  
  107. /*----------------------------------------------------------------------+
  108. |                                    |
  109. |  Icon Cmd Resources                                                   |
  110. |                                    |
  111. +----------------------------------------------------------------------*/
  112. DItem_IconCmdRsc ICONCMDID_ChangeTagDisplay =
  113.     {
  114.     NOHELP, OHELPTASKIDCMD, 0,
  115.     CMD_CHANGE_TAG_DISPLAY, OTASKID, "", "",
  116.     {
  117. #       if defined (MSVERSION) && (MSVERSION < 0x551)
  118.         {{2*XC, GENY(1), 0, 0}, ToggleButton, TOGGLEID_Display, ON, 0, "", ""},
  119. #       endif
  120.     }
  121. #   if defined (MSVERSION) && (MSVERSION >= 0x550)
  122.     }
  123.     extendedAttributes
  124.     {
  125.     {
  126.     /* Tool Description/Flyover Help appears in status area */
  127.     {EXTATTR_FLYTEXT, TXT_Flyover_ChangeTagDisplay},     
  128.  
  129.     /* Tool Tip/Balloon Help appears in yellow text box near icon command */
  130.     {EXTATTR_BALLOON, TXT_Balloon_ChangeTagDisplay},     
  131.     }
  132.     };
  133. #   else
  134.     };
  135. #   endif /* if defined (MSVERSION) && (MSVERSION >= 0x550) */
  136.  
  137. #if defined (MSVERSION) && (MSVERSION >= 0x551)
  138. CmdItemListRsc CMD_CHANGE_TAG_DISPLAY =
  139.     {{
  140.     {{2*XC, GENY(1), 0, 0}, ToggleButton, TOGGLEID_Display, ON, 0, "", ""},
  141.     }};
  142. #endif
  143.  
  144. DItem_IconCmdRsc ICONCMDID_TextToTag =
  145.     {
  146.     NOHELP, OHELPTASKIDCMD, 0,
  147.     CMD_PLACE_TAG_FROMTEXT, OTASKID, "", "",
  148.     {
  149. #       if defined (MSVERSION) && (MSVERSION < 0x551)
  150.         {{2*XC, GENY(2), 0, 0}, ListBox, LISTBOXID_TagSets, ON, 0, "", ""},
  151. #       endif
  152.     }
  153. #   if defined (MSVERSION) && (MSVERSION >= 0x550)
  154.     }
  155.     extendedAttributes
  156.     {
  157.     {
  158.     /* Tool Description/Flyover Help appears in status area */
  159.     {EXTATTR_FLYTEXT, TXT_Flyover_TextToTag},     
  160.  
  161.     /* Tool Tip/Balloon Help appears in yellow text box near icon command */
  162.     {EXTATTR_BALLOON, TXT_Balloon_TextToTag},     
  163.     }
  164.     };
  165. #   else
  166.     };
  167. #   endif /* if defined (MSVERSION) && (MSVERSION >= 0x550) */
  168.  
  169. #if defined (MSVERSION) && (MSVERSION >= 0x551)
  170. CmdItemListRsc CMD_PLACE_TAG_FROMTEXT =
  171.     {{
  172.     {{2*XC, GENY(2), 0, 0}, ListBox, LISTBOXID_TagSets, ON, 0, "", ""},
  173.     }};
  174. #endif
  175. /*----------------------------------------------------------------------+
  176. |                                    |
  177. |   Toggle Buttons                            |
  178. |                                    |
  179. +----------------------------------------------------------------------*/
  180. DItem_ToggleButtonRsc TOGGLEID_Display =
  181.     {
  182.     NOCMD, MCMD, NOSYNONYM, NOHELP, MCMD, NOHOOK, NOARG,
  183.     NOMASK, NOINVERT,
  184.     TXT_DisplayTag,
  185.     "dlogBoxInfo->display"
  186.     };
  187.  
  188. /*----------------------------------------------------------------------+
  189. |                                                                       |
  190. |   ListBox Item Resource                                               |
  191. |                                                                       |
  192. +----------------------------------------------------------------------*/
  193. DItem_ListBoxRsc LISTBOXID_TagSets =
  194.     {
  195.     NOHELP,
  196.     LHELP,
  197.     HOOKITEMID_TagSetsList,
  198.     NOARG,
  199.     0,
  200.     3,
  201.     0,
  202.     "",
  203.         {
  204.         {96, 10, ALIGN_LEFT, TXT_TagSets},
  205.         }
  206.     };
  207.  
  208. /*----------------------------------------------------------------------+
  209. |                                                                       |
  210. |   Small Icon Item Resource                                          |
  211. |                                                                       |
  212. +----------------------------------------------------------------------*/
  213. IconCmdSmallRsc ICONCMDID_ChangeTagDisplay =
  214.     {
  215.     23,    23,    FORMAT_MONOBITMAP,    BLACK_INDEX, "",
  216.         {
  217.         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  218.         0x00, 0x00, 0x80, 0x00, 0x01, 0x00, 0x02, 0x02,
  219.         0x04, 0x02, 0x00, 0x10, 0x02, 0x3c, 0x40, 0x01,
  220.         0xce, 0x00, 0x06, 0x06, 0x00, 0x08, 0x04, 0x01,
  221.         0xd0, 0x0b, 0x80, 0x30, 0x30, 0x00, 0x30, 0xc0,
  222.         0x00, 0x33, 0x00, 0x02, 0x24, 0x40, 0x08, 0x78,
  223.         0x40, 0x20, 0x90, 0x40, 0x01, 0xe0, 0x00, 0x01,
  224.         0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  225.         0x00, 0x00, 0x00, 
  226.         }
  227.     };
  228.  
  229. IconCmdSmallRsc ICONCMDID_TextToTag =
  230.     {
  231.     23,    23,    FORMAT_MONOBITMAP,    BLACK_INDEX, "",
  232.         {
  233.         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x3c,
  234.         0x00, 0x10, 0x84, 0x00, 0xd2, 0x34, 0x02, 0x48,
  235.         0x94, 0x09, 0x10, 0x24, 0x10, 0x20, 0x84, 0x20,
  236.         0x42, 0x04, 0x40, 0x48, 0x10, 0x80, 0x5e, 0x41,
  237.         0x00, 0x41, 0x02, 0x00, 0x44, 0x04, 0x00, 0x50,
  238.         0x08, 0x40, 0x40, 0x08, 0x80, 0x00, 0x0b, 0x80,
  239.         0x00, 0x05, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x22,
  240.         0x00, 0x00, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00,
  241.         0x00, 0x00, 0x00, 
  242.         }
  243.     };
  244. /*----------------------------------------------------------------------+
  245. |                                                                       |
  246. |   Large Icon Item Resource                                          |
  247. |                                                                       |
  248. +----------------------------------------------------------------------*/
  249. IconCmdLargeRsc ICONCMDID_ChangeTagDisplay =
  250.     {
  251.     31,    31,    FORMAT_MONOBITMAP,    BLACK_INDEX, "",
  252.         {
  253.         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  254.         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  255.         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  256.         0x00, 0x40, 0x00, 0x00, 0x00, 0x80, 0x00, 0x01,
  257.         0x01, 0x00, 0x80, 0x01, 0x00, 0x02, 0x00, 0x01,
  258.         0x1f, 0x88, 0x00, 0x00, 0x61, 0x80, 0x00, 0x01,
  259.         0x81, 0x80, 0x00, 0x02, 0x01, 0x00, 0x00, 0xf4,
  260.         0x02, 0xe0, 0x00, 0x08, 0x04, 0x00, 0x00, 0x18,
  261.         0x18, 0x00, 0x00, 0x18, 0x60, 0x00, 0x01, 0x19,
  262.         0x88, 0x00, 0x04, 0x12, 0x08, 0x00, 0x10, 0x24,
  263.         0x08, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x90,
  264.         0x00, 0x00, 0x01, 0x20, 0x00, 0x00, 0x01, 0x80,
  265.         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  266.         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  267.         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  268.         0x00, 
  269.         }
  270.     };
  271.  
  272.  
  273. IconCmdLargeRsc ICONCMDID_TextToTag =
  274.     {
  275.     31,    31,    FORMAT_MONOBITMAP,    BLACK_INDEX, "",
  276.         {
  277.         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  278.         0x00, 0x00, 0x00, 0x00, 0x08, 0x0f, 0x80, 0x00,
  279.         0x08, 0x20, 0x80, 0x00, 0x08, 0x80, 0x80, 0x01,
  280.         0xfa, 0x00, 0x80, 0x04, 0x24, 0x0c, 0x80, 0x10,
  281.         0x88, 0x24, 0x80, 0x22, 0x10, 0x48, 0x80, 0x40,
  282.         0x20, 0x10, 0x80, 0x80, 0x20, 0x40, 0x81, 0x00,
  283.         0x21, 0x00, 0x82, 0x00, 0x24, 0x02, 0x04, 0x00,
  284.         0x2f, 0x08, 0x08, 0x00, 0x20, 0x20, 0x10, 0x00,
  285.         0x20, 0x80, 0x20, 0x00, 0x22, 0x00, 0x40, 0x00,
  286.         0x28, 0x00, 0x8c, 0x00, 0x20, 0x01, 0x18, 0x00,
  287.         0x00, 0x02, 0x78, 0x00, 0x00, 0x02, 0x90, 0x00,
  288.         0x00, 0x01, 0x20, 0x00, 0x00, 0x07, 0xe0, 0x00,
  289.         0x00, 0x08, 0x40, 0x00, 0x00, 0x30, 0xc0, 0x00,
  290.         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  291.         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  292.         0x00, 
  293.         }
  294.     };
  295.  
  296.  
  297.