7 Replies Latest reply on Jan 14, 2013 3:54 AM by Harbs.

    How to change menu position

    Alexander Baranovski Level 1

      I want to place menu item of my Extension to another position of the InDesignMenu. For example  "Windows->Extensions->MyExtension" change to "Windows->MyExtension". I know how I can do this in C++ plug-in. Is it possible for extensions?

       

      Best regards,
      Alex

        • 1. Re: How to change menu position
          Harbs. Adobe Community Professional & MVP

          Take a look at the getting-started pdf in the SDK docs.

           

          Chapter 8 has a section on the CS SDK. There's info there on how to do it in the section called "Overriding default menu placement".

           

          Harbs

          • 2. Re: How to change menu position
            Alexander Baranovski Level 1

            Could you please give link to this pdf. Because at this, I didn't found information:

             

            http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/creativesuite/pdfs/CS _SDK_Guide.pdf

            • 3. Re: How to change menu position
              Harbs. Adobe Community Professional & MVP

              I was referring to the InDesign C++ SDK. If you've developed C++ plugins, I assume you have the SDK...

              • 4. Re: How to change menu position
                Harbs. Adobe Community Professional & MVP

                For sake of completeness (or for those who haven't downloaded the SDK), I'm  pasting the section in here...

                 

                Overriding default menu placement

                NOTE: Overriding the default menu position is supported by InDesign, but not yet by other Creative Suite

                applications.

                By default, CSXS supports a single main menu item, which appears in the application’s Window >

                Extensions menu. Extension developers may prefer a different menu location. InDesign supports a Menu

                element and Placement attribute in the manifest.xml that allows an extension to override the default

                menu position. For example:

                <Menu Placement="'Main:&amp;Window',600.0,'KBSCE Window menu'">FlexUIStroke</Menu>

                The Placement attribute needs to be created with care. See the FlexuUIStroke code for a more precise

                example (without a line break).

                • Strings must be enclosed in single quotes.
                • Commas (without white space) are used to separate fields.

                Menu path

                The menu path format is similar to the format used by MenuDef ODFRC resources (see also

                IMenuManager.h).

                • Menu path components must either be localizable key strings or be prefixed with the

                kDontTranslateChar (.).

                • The accelerator key must be escaped using &amp; in the menu path. To include an actual ampersand

                character in a menu path component or menu item, use a double ampersand (&&).

                • If the first character in the menu path is a hyphen, InDesign inserts a menu separator before the

                extension’s menu item. Similarly, if the last character is a hyphen, InDesign inserts a separator

                afterwards. Both may be specified.

                • Menu paths must exactly match the key string for existing menus. The easiest way to determine these

                strings is to dump the existing menus in the debug build using Test > UI > Actions > Dump MenuMgr

                info(all). This uses TRACE commands, so you must first set the location of trace output. For example,

                you can set it to trace text into an open copy of Notebook. Search for a string such as “Main:&Window”

                to find menu items that belong to the Window menu.

                Menu position

                The menu position value is identical to the one used by MenuDef ODFRC resources (see also

                IMenuManager.h).

                • To sort a menu item alphabetically, use the same menu position as the other menu item(s).
                • Refer to AdobeMenuPositions.h for predefined menu positions of other menu items.

                ActionArea

                The action area format is identical to the one used by ActionDef ODFRC resources (see also

                IActionManager.h).

                • The action area string must be a localizable key string.
                • Refer to ActionDefs.h for predefined action areas used by other menu items.
                • 6. Re: How to change menu position
                  Alexander Baranovski Level 1

                  Thank you, this helps:

                   

                  <Menu Placement="'Main:&amp;Window',600.0,'KBSCE Window menu'">FlexUIStroke</Menu>

                  The Placement attribute needs to be created with care. See the FlexuUIStroke code for a more precise

                  example (without a line break).

                   

                  Best regards,
                  Alex

                  • 7. Re: How to change menu position
                    Harbs. Adobe Community Professional & MVP

                    This is particularly important as well:

                    • Menu path components must either be localizable key strings or be prefixed with the

                    kDontTranslateChar (.).

                    It'll work without the period prefix, but you're making InDesign search the whole string database before giving up...

                     

                    Harbs