Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Multi menu in my plugins

    Plugin Development
    3
    7
    173
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      John Huang last edited by

      Is this possible for creating multi menu in my plugin?

      For example:
      This is demo plugin menu
      it only has one layer
      alt text

      How to modify like this(two layer)
      alt text

      Thanks,
      John

      Ekopalypse 1 Reply Last reply Reply Quote 0
      • Ekopalypse
        Ekopalypse @John Huang last edited by

        @john-huang

        Yes, see https://github.com/bruderstein/PythonScript for example.

        J 1 Reply Last reply Reply Quote 2
        • J
          John Huang @Ekopalypse last edited by

          @ekopalypse
          Thanks for your information

          I can not find the key point.
          Do you an another example?

          I will contiune to try it.
          Thank you

          Ekopalypse 1 Reply Last reply Reply Quote 0
          • Ekopalypse
            Ekopalypse @John Huang last edited by

            @john-huang

            here it is.
            And here where to start.

            J 1 Reply Last reply Reply Quote 5
            • J
              John Huang @Ekopalypse last edited by

              @ekopalypse
              Hi Ekopalypse,
              Thank you for your help.

              It’s beyond me. How to create two menu layer for the Notepad++ plugins.

              I know I need to return a FuncItem * in getFuncsArray.
              I see the getFuncsArray() function in PythonScript.
              I think the key point is

              m_funcItems[position]._init2Check = false;
              m_funcItems[position]._pShKey = NULL;
              m_funcItems[position]._pFunc = NULL;
              

              Now I can use the FuncItem * array to create one menu layer, but
              I still don’t know how to create two menu layer.

              Please give me more information.
              Thank you a lof.

              John

              Alan Kilborn Ekopalypse 2 Replies Last reply Reply Quote 0
              • Alan Kilborn
                Alan Kilborn @John Huang last edited by

                @john-huang said in Multi menu in my plugins:

                How to create two menu layer for the Notepad++ plugins.

                It is the same for any Windows program coding.
                Suggest you take it to a more appropriate forum where you will get better help.
                It really is off-topic here.

                1 Reply Last reply Reply Quote 0
                • Ekopalypse
                  Ekopalypse @John Huang last edited by Ekopalypse

                  @john-huang

                  From Npp’s point of view you only provide the main menu via the function item array, everything else has to be handled by your plugin.
                  To do that, ask Npp for the plugin menu handle and once you have it, find the menu item you want to add sub-items to like here.
                  Now, to know when an npp user has clicked on such a menu item, you need to listen to the messageProc and act accordingly.
                  If it is necessary to manipulate the main menu of the plugin at runtime, then you need to ask Npp for a list of pre-assigned menu items.
                  I agree that this part could be described in more detail in the manual, which I will do soon.
                  If there is anything else that you think is not well described or maybe irritating, let us know.

                  @Alan-Kilborn

                  It is the same for any Windows program coding.

                  Creating the menu, yes, but with some Npp-related *quirks that I hope I described clearly above.

                  *can’t find another/better word for it.

                  1 Reply Last reply Reply Quote 3
                  • First post
                    Last post
                  Copyright © 2014 NodeBB Forums | Contributors