1178825Sdfr���<?xml version="1.0" encoding="utf-8"?>
2233294Sstas<CommandTable xmlns="http://schemas.microsoft.com/VisualStudio/2005-10-18/CommandTable" xmlns:xs="http://www.w3.org/2001/XMLSchema">
3233294Sstas
4233294Sstas  <!--  This is the file that defines the actual layout and type of the commands.
5178825Sdfr        It is divided in different sections (e.g. command definition, command
6233294Sstas        placement, ...), with each defining a specific set of properties.
7233294Sstas        See the comment before each section for more details about how to
8233294Sstas        use it. -->
9178825Sdfr
10233294Sstas  <!--  The VSCT compiler (the tool that translates this file into the binary 
11233294Sstas        format that VisualStudio will consume) has the ability to run a preprocessor 
12178825Sdfr        on the vsct file; this preprocessor is (usually) the C++ preprocessor, so 
13233294Sstas        it is possible to define includes and macros with the same syntax used 
14233294Sstas        in C++ files. Using this ability of the compiler here, we include some files 
15233294Sstas        defining some of the constants that we will use inside the file. -->
16178825Sdfr
17233294Sstas  <!--This is the file that defines the IDs for all the commands exposed by VisualStudio. -->
18233294Sstas  <Extern href="stdidcmd.h"/>
19233294Sstas
20178825Sdfr  <!--This header contains the command ids for the menus provided by the shell. -->
21233294Sstas  <Extern href="vsshlids.h"/>
22233294Sstas
23233294Sstas
24233294Sstas
25233294Sstas
26233294Sstas  <!--The Commands section is where we the commands, menus and menu groups are defined.
27233294Sstas      This section uses a Guid to identify the package that provides the command defined inside it. -->
28233294Sstas  <Commands package="guidClangFormatPkg">
29233294Sstas    <!-- Inside this section we have different sub-sections: one for the menus, another  
30233294Sstas    for the menu groups, one for the buttons (the actual commands), one for the combos 
31233294Sstas    and the last one for the bitmaps used. Each element is identified by a command id that  
32178825Sdfr    is a unique pair of guid and numeric identifier; the guid part of the identifier is usually  
33178825Sdfr    called "command set" and is used to group different command inside a logically related  
34233294Sstas    group; your package should define its own command set in order to avoid collisions  
35178825Sdfr    with command ids defined by other packages. -->
36233294Sstas
37178825Sdfr    
38178825Sdfr    <!-- In this section you can define new menu groups. A menu group is a container for 
39178825Sdfr         other menus or buttons (commands); from a visual point of view you can see the 
40178825Sdfr         group as the part of a menu contained between two lines. The parent of a group 
41178825Sdfr         must be a menu. -->
42178825Sdfr    <Groups>
43178825Sdfr
44178825Sdfr      <Group guid="guidClangFormatCmdSet" id="MyMenuGroup" priority="0x0600">
45178825Sdfr        <Parent guid="guidSHLMainMenu" id="IDM_VS_MENU_TOOLS"/>
46178825Sdfr      </Group>
47178825Sdfr      
48178825Sdfr
49178825Sdfr
50178825Sdfr    </Groups>
51233294Sstas    
52178825Sdfr    <!--Buttons section. -->
53233294Sstas    <!--This section defines the elements the user can interact with, like a menu command or a button 
54178825Sdfr        or combo box in a toolbar. -->
55178825Sdfr    <Buttons>
56178825Sdfr      <!--To define a menu group you have to specify its ID, the parent menu and its display priority. 
57233294Sstas          The command is visible and enabled by default. If you need to change the visibility, status, etc, you can use
58178825Sdfr          the CommandFlag node.
59178825Sdfr          You can add more than one CommandFlag node e.g.:
60178825Sdfr              <CommandFlag>DefaultInvisible</CommandFlag>
61178825Sdfr              <CommandFlag>DynamicVisibility</CommandFlag>
62178825Sdfr          If you do not want an image next to your command, remove the Icon node /> -->
63233294Sstas
64178825Sdfr      <Button guid="guidClangFormatCmdSet" id="cmdidClangFormatSelection" priority="0x0100" type="Button">
65233294Sstas        <Parent guid="guidClangFormatCmdSet" id="MyMenuGroup" />
66233294Sstas        <Icon guid="guidImages" id="bmpPic1" />
67233294Sstas        <Strings>
68233294Sstas          <ButtonText>Clang Format Selection</ButtonText>
69233294Sstas        </Strings>
70233294Sstas      </Button>
71178825Sdfr
72178825Sdfr      <Button guid="guidClangFormatCmdSet" id="cmdidClangFormatDocument" priority="0x0101" type="Button">
73233294Sstas        <Parent guid="guidClangFormatCmdSet" id="MyMenuGroup" />
74178825Sdfr        <Icon guid="guidImages" id="bmpPic2" />
75178825Sdfr        <Strings>
76178825Sdfr          <ButtonText>Clang Format Document</ButtonText>
77178825Sdfr        </Strings>
78178825Sdfr      </Button>
79178825Sdfr
80178825Sdfr    </Buttons>
81178825Sdfr   
82178825Sdfr    <!--The bitmaps section is used to define the bitmaps that are used for the commands.-->
83178825Sdfr    <Bitmaps>
84178825Sdfr      <!--  The bitmap id is defined in a way that is a little bit different from the others: 
85178825Sdfr            the declaration starts with a guid for the bitmap strip, then there is the resource id of the 
86178825Sdfr            bitmap strip containing the bitmaps and then there are the numeric ids of the elements used 
87178825Sdfr            inside a button definition. An important aspect of this declaration is that the element id 
88178825Sdfr            must be the actual index (1-based) of the bitmap inside the bitmap strip. -->
89178825Sdfr      <Bitmap guid="guidImages" href="Resources\Images_32bit.bmp" usedList="bmpPic1, bmpPic2, bmpPicSearch, bmpPicX, bmpPicArrows"/>
90178825Sdfr      
91178825Sdfr    </Bitmaps>
92178825Sdfr 
93178825Sdfr  </Commands>
94178825Sdfr
95178825Sdfr
96178825Sdfr  <KeyBindings>
97178825Sdfr    <KeyBinding guid="guidClangFormatCmdSet" id="cmdidClangFormatSelection" editor="guidTextEditor" key1="R" mod1="Control" key2="F" mod2="Control"/>
98178825Sdfr    <KeyBinding guid="guidClangFormatCmdSet" id="cmdidClangFormatDocument" editor="guidTextEditor" key1="R" mod1="Control" key2="D" mod2="Control"/>
99178825Sdfr  </KeyBindings>
100178825Sdfr
101233294Sstas
102178825Sdfr
103178825Sdfr  <Symbols>
104178825Sdfr    <!-- This is the package guid. -->
105233294Sstas    <GuidSymbol name="guidClangFormatPkg" value="{c5286038-25d3-4f65-83a8-51fa2df4a146}" />
106233294Sstas    
107233294Sstas    <!-- This is the guid used to group the menu commands together -->
108233294Sstas    <GuidSymbol name="guidClangFormatCmdSet" value="{e39cbab1-0f96-4022-a2bc-da5a9db7eb78}">
109233294Sstas
110233294Sstas      <IDSymbol name="MyMenuGroup" value="0x1020" />
111233294Sstas      <IDSymbol name="cmdidClangFormatSelection" value="0x0100" />
112178825Sdfr      <IDSymbol name="cmdidClangFormatDocument" value="0x0101" />
113178825Sdfr    </GuidSymbol>
114178825Sdfr
115233294Sstas    <GuidSymbol name="guidTextEditor" value="{8B382828-6202-11d1-8870-0000F87579D2}" />
116233294Sstas
117233294Sstas
118233294Sstas    <GuidSymbol name="guidImages" value="{6d53937b-9ae1-42e1-8849-d876dcdbad7b}" >
119233294Sstas      <IDSymbol name="bmpPic1" value="1" />
120233294Sstas      <IDSymbol name="bmpPic2" value="2" />
121233294Sstas      <IDSymbol name="bmpPicSearch" value="3" />
122233294Sstas      <IDSymbol name="bmpPicX" value="4" />
123233294Sstas      <IDSymbol name="bmpPicArrows" value="5" />
124233294Sstas    </GuidSymbol>
125178825Sdfr  </Symbols>
126233294Sstas
127233294Sstas</CommandTable>
128233294Sstas