Multi menu in my plugins
Is this possible for creating multi menu in my plugin?
This is demo plugin menu
it only has one layer
How to modify like this(two layer)
Thanks for your information
I can not find the key point.
Do you an another example?
I will contiune to try it.
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.
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.
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.