|
| 1 | +<?xml version="1.0" encoding="utf-8"?> |
| 2 | +<CommandTable xmlns="http://schemas.microsoft.com/VisualStudio/2005-10-18/CommandTable" xmlns:xs="http://www.w3.org/2001/XMLSchema"> |
| 3 | + |
| 4 | + <!-- This is the file that defines the actual layout and type of the commands. |
| 5 | + It is divided in different sections (e.g. command definition, command |
| 6 | + placement, ...), with each defining a specific set of properties. |
| 7 | + See the comment before each section for more details about how to |
| 8 | + use it. --> |
| 9 | + |
| 10 | + <!-- The VSCT compiler (the tool that translates this file into the binary |
| 11 | + format that VisualStudio will consume) has the ability to run a preprocessor |
| 12 | + on the vsct file; this preprocessor is (usually) the C++ preprocessor, so |
| 13 | + it is possible to define includes and macros with the same syntax used |
| 14 | + in C++ files. Using this ability of the compiler here, we include some files |
| 15 | + defining some of the constants that we will use inside the file. --> |
| 16 | + |
| 17 | + <!--This is the file that defines the IDs for all the commands exposed by VisualStudio. --> |
| 18 | + <Extern href="stdidcmd.h"/> |
| 19 | + |
| 20 | + <!--This header contains the command ids for the menus provided by the shell. --> |
| 21 | + <Extern href="vsshlids.h"/> |
| 22 | + |
| 23 | + <!--The Commands section is where commands, menus, and menu groups are defined. |
| 24 | + This section uses a Guid to identify the package that provides the command defined inside it. --> |
| 25 | + <Commands package="guidCodePulse"> |
| 26 | + <!-- Inside this section we have different sub-sections: one for the menus, another |
| 27 | + for the menu groups, one for the buttons (the actual commands), one for the combos |
| 28 | + and the last one for the bitmaps used. Each element is identified by a command id that |
| 29 | + is a unique pair of guid and numeric identifier; the guid part of the identifier is usually |
| 30 | + called "command set" and is used to group different command inside a logically related |
| 31 | + group; your package should define its own command set in order to avoid collisions |
| 32 | + with command ids defined by other packages. --> |
| 33 | + |
| 34 | + <!-- In this section you can define new menu groups. A menu group is a container for |
| 35 | + other menus or buttons (commands); from a visual point of view you can see the |
| 36 | + group as the part of a menu contained between two lines. The parent of a group |
| 37 | + must be a menu. --> |
| 38 | + <Groups> |
| 39 | + <Group guid="guidCodePulseCmdSet" id="MyMenuGroup" priority="0x0600"> |
| 40 | + <Parent guid="guidSHLMainMenu" id="IDM_VS_MENU_TOOLS"/> |
| 41 | + </Group> |
| 42 | + </Groups> |
| 43 | + |
| 44 | + <!--Buttons section. --> |
| 45 | + <!--This section defines the elements the user can interact with, like a menu command or a button |
| 46 | + or combo box in a toolbar. --> |
| 47 | + <Buttons> |
| 48 | + <!--To define a menu group you have to specify its ID, the parent menu and its display priority. |
| 49 | + The command is visible and enabled by default. If you need to change the visibility, status, etc, you can use |
| 50 | + the CommandFlag node. |
| 51 | + You can add more than one CommandFlag node e.g.: |
| 52 | + <CommandFlag>DefaultInvisible</CommandFlag> |
| 53 | + <CommandFlag>DynamicVisibility</CommandFlag> |
| 54 | + If you do not want an image next to your command, remove the Icon node /> --> |
| 55 | + <Button guid="guidCodePulseCmdSet" id="SettingCommandId" priority="0x0100" type="Button"> |
| 56 | + <Parent guid="guidCodePulseCmdSet" id="MyMenuGroup" /> |
| 57 | + <Icon guid="guidImages" id="bmpPic1" /> |
| 58 | + <Strings> |
| 59 | + <ButtonText>码脉设置</ButtonText> |
| 60 | + </Strings> |
| 61 | + </Button> |
| 62 | + </Buttons> |
| 63 | + |
| 64 | + <!--The bitmaps section is used to define the bitmaps that are used for the commands.--> |
| 65 | + <Bitmaps> |
| 66 | + <!-- The bitmap id is defined in a way that is a little bit different from the others: |
| 67 | + the declaration starts with a guid for the bitmap strip, then there is the resource id of the |
| 68 | + bitmap strip containing the bitmaps and then there are the numeric ids of the elements used |
| 69 | + inside a button definition. An important aspect of this declaration is that the element id |
| 70 | + must be the actual index (1-based) of the bitmap inside the bitmap strip. --> |
| 71 | + <Bitmap guid="guidImages" href="Resources\SettingCommand.png" usedList="bmpPic1, bmpPic2, bmpPicSearch, bmpPicX, bmpPicArrows, bmpPicStrikethrough"/> |
| 72 | + </Bitmaps> |
| 73 | + </Commands> |
| 74 | + |
| 75 | + <Symbols> |
| 76 | + <!-- This is the package guid. --> |
| 77 | + <GuidSymbol name="guidCodePulse" value="{c74266cb-ac06-4f69-915e-503598095b0e}" /> |
| 78 | + |
| 79 | + <!-- This is the guid used to group the menu commands together --> |
| 80 | + <GuidSymbol name="guidCodePulseCmdSet" value="{2c981448-c814-4c66-a9ff-c4d42bf444c3}"> |
| 81 | + <IDSymbol name="MyMenuGroup" value="0x1020" /> |
| 82 | + <IDSymbol name="SettingCommandId" value="0x0100" /> |
| 83 | + </GuidSymbol> |
| 84 | + |
| 85 | + <GuidSymbol name="guidImages" value="{9a9a80d6-814a-458a-b7ff-794d95e5b8c7}" > |
| 86 | + <IDSymbol name="bmpPic1" value="1" /> |
| 87 | + <IDSymbol name="bmpPic2" value="2" /> |
| 88 | + <IDSymbol name="bmpPicSearch" value="3" /> |
| 89 | + <IDSymbol name="bmpPicX" value="4" /> |
| 90 | + <IDSymbol name="bmpPicArrows" value="5" /> |
| 91 | + <IDSymbol name="bmpPicStrikethrough" value="6" /> |
| 92 | + </GuidSymbol> |
| 93 | + </Symbols> |
| 94 | +</CommandTable> |
0 commit comments