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
24
25
26  <!--The Commands section is where we the commands, menus and menu groups are defined.
27      This section uses a Guid to identify the package that provides the command defined inside it. -->
28  <Commands package="guidClangFormatPkg">
29    <!-- Inside this section we have different sub-sections: one for the menus, another
30    for the menu groups, one for the buttons (the actual commands), one for the combos
31    and the last one for the bitmaps used. Each element is identified by a command id that
32    is a unique pair of guid and numeric identifier; the guid part of the identifier is usually
33    called "command set" and is used to group different command inside a logically related
34    group; your package should define its own command set in order to avoid collisions
35    with command ids defined by other packages. -->
36
37
38    <!-- In this section you can define new menu groups. A menu group is a container for
39         other menus or buttons (commands); from a visual point of view you can see the
40         group as the part of a menu contained between two lines. The parent of a group
41         must be a menu. -->
42    <Groups>
43
44      <Group guid="guidClangFormatCmdSet" id="MyMenuGroup" priority="0x0600">
45        <Parent guid="guidSHLMainMenu" id="IDM_VS_MENU_TOOLS"/>
46      </Group>
47
48
49
50    </Groups>
51
52    <!--Buttons section. -->
53    <!--This section defines the elements the user can interact with, like a menu command or a button
54        or combo box in a toolbar. -->
55    <Buttons>
56      <!--To define a menu group you have to specify its ID, the parent menu and its display priority.
57          The command is visible and enabled by default. If you need to change the visibility, status, etc, you can use
58          the CommandFlag node.
59          You can add more than one CommandFlag node e.g.:
60              <CommandFlag>DefaultInvisible</CommandFlag>
61              <CommandFlag>DynamicVisibility</CommandFlag>
62          If you do not want an image next to your command, remove the Icon node /> -->
63
64      <Button guid="guidClangFormatCmdSet" id="cmdidClangFormat" priority="0x0100" type="Button">
65        <Parent guid="guidClangFormatCmdSet" id="MyMenuGroup" />
66        <Icon guid="guidImages" id="bmpPic1" />
67        <Strings>
68          <ButtonText>ClangFormat</ButtonText>
69        </Strings>
70      </Button>
71
72
73
74    </Buttons>
75
76    <!--The bitmaps section is used to define the bitmaps that are used for the commands.-->
77    <Bitmaps>
78      <!--  The bitmap id is defined in a way that is a little bit different from the others:
79            the declaration starts with a guid for the bitmap strip, then there is the resource id of the
80            bitmap strip containing the bitmaps and then there are the numeric ids of the elements used
81            inside a button definition. An important aspect of this declaration is that the element id
82            must be the actual index (1-based) of the bitmap inside the bitmap strip. -->
83      <Bitmap guid="guidImages" href="Resources\Images_32bit.bmp" usedList="bmpPic1, bmpPic2, bmpPicSearch, bmpPicX, bmpPicArrows"/>
84
85    </Bitmaps>
86
87  </Commands>
88
89
90  <KeyBindings>
91    <KeyBinding guid="guidClangFormatCmdSet" id="cmdidClangFormat" editor="guidTextEditor" key1="R" mod1="Control" key2="F" mod2="Control"/>
92  </KeyBindings>
93
94
95
96  <Symbols>
97    <!-- This is the package guid. -->
98    <GuidSymbol name="guidClangFormatPkg" value="{c5286038-25d3-4f65-83a8-51fa2df4a146}" />
99
100    <!-- This is the guid used to group the menu commands together -->
101    <GuidSymbol name="guidClangFormatCmdSet" value="{e39cbab1-0f96-4022-a2bc-da5a9db7eb78}">
102
103      <IDSymbol name="MyMenuGroup" value="0x1020" />
104      <IDSymbol name="cmdidClangFormat" value="0x0100" />
105    </GuidSymbol>
106
107    <GuidSymbol name="guidTextEditor" value="{8B382828-6202-11d1-8870-0000F87579D2}" />
108
109
110    <GuidSymbol name="guidImages" value="{6d53937b-9ae1-42e1-8849-d876dcdbad7b}" >
111      <IDSymbol name="bmpPic1" value="1" />
112      <IDSymbol name="bmpPic2" value="2" />
113      <IDSymbol name="bmpPicSearch" value="3" />
114      <IDSymbol name="bmpPicX" value="4" />
115      <IDSymbol name="bmpPicArrows" value="5" />
116    </GuidSymbol>
117  </Symbols>
118
119</CommandTable>
120