1 Pages (4 items)
Plugin Development: GUI - SMath Interface - Inquiry: a plugin's ability to adjust/interacte with the SMath Interface - Messages
#1 Posted: 10/19/2022 4:52:31 PM
Greetings,
I am curious: outside of being able to add controls to the 「Insert」 Menu (via IPluginCustomRegion.GetMenuItems); can a plugin add custom Toolbars or interface with the Status/Title Bars?

I am familiar with the ability to add a context menu item (via IPluginCustomRegion.GetContextMenuItems), as well as the ability to create/launch a customized Windows Form (e.g., InputBox, Msgbox, etc.); I am more or less focusing this question with regards to those areas as indicated in my image.
Thank you!
-Kenny Lemens, P.E. ᵂᴵ
I am curious: outside of being able to add controls to the 「Insert」 Menu (via IPluginCustomRegion.GetMenuItems); can a plugin add custom Toolbars or interface with the Status/Title Bars?
I am familiar with the ability to add a context menu item (via IPluginCustomRegion.GetContextMenuItems), as well as the ability to create/launch a customized Windows Form (e.g., InputBox, Msgbox, etc.); I am more or less focusing this question with regards to those areas as indicated in my image.
Thank you!
-Kenny Lemens, P.E. ᵂᴵ
"No matter where you go, there you are." -Buckaroo BanzaiHotkeys: https://en.smath.com/forum/resource.ashx?a=45771&b=2
#2 Posted: 10/20/2022 7:35:55 AM
As for the Toolboxes, you can add new groups using the IPluginToolboxGroups interface (see f.e. CustomFunctions plugin)
Since a while you can add new items even in other places than the Insert menu using the MenuButton.MenuButtonLocation property (see f.e. SimInTechCalcDataManager).
Using RegionBase.ChangeStatus you can display messages to the statusbar (see f.e. SnapshotRegion), and obviously there is the trace window too using Store.TraceData(string).
About custom Toolbars a long time ago I've played a bit with this idea and made an interface, but it worked nice only in Windows, so since in mono everything was messsed up I've abandoned it.
I guess that now with the ribbon menu in SMath Writer would be more feasible to have something valuable.
Since a while you can add new items even in other places than the Insert menu using the MenuButton.MenuButtonLocation property (see f.e. SimInTechCalcDataManager).
Using RegionBase.ChangeStatus you can display messages to the statusbar (see f.e. SnapshotRegion), and obviously there is the trace window too using Store.TraceData(string).
About custom Toolbars a long time ago I've played a bit with this idea and made an interface, but it worked nice only in Windows, so since in mono everything was messsed up I've abandoned it.
I guess that now with the ribbon menu in SMath Writer would be more feasible to have something valuable.
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
2 users liked this post
#3 Posted: 10/20/2022 1:57:09 PM
Davide,
Thank you for the insight! I appreciate the links you provided to specific instances of these implementations.
The follow-up question I would have is this: Any ability to influence the sort/order of placement within these toolbars/menu item?
Since I am a visual person, I took the liberty to highlight the areas a Plugin is allowed to mount within the GUI (per Windows Application); Please let me know if I overlooked an area/feature:

Thank you!
-Kenny Lemens, P.E. ᵂᴵ
Thank you for the insight! I appreciate the links you provided to specific instances of these implementations.
The follow-up question I would have is this: Any ability to influence the sort/order of placement within these toolbars/menu item?
Since I am a visual person, I took the liberty to highlight the areas a Plugin is allowed to mount within the GUI (per Windows Application); Please let me know if I overlooked an area/feature:
Thank you!
-Kenny Lemens, P.E. ᵂᴵ
"No matter where you go, there you are." -Buckaroo BanzaiHotkeys: https://en.smath.com/forum/resource.ashx?a=45771&b=2
2 users liked this post
#4 Posted: 12/7/2022 11:24:12 AM
Wrote...
About custom Toolbars a long time ago I've played a bit with this idea and made an interface, but it worked nice only in Windows, so since in mono everything was messsed up I've abandoned it.
I guess that now with the ribbon menu in SMath Writer would be more feasible to have something valuable.
Since I use Windows, the custom Toolbars make sense to me. I tried coding a few elements and it is pretty straight forward. The only issue/question I would have is the shortcut key... I haven't been able to figure out how to assign a hotkey/shortcut key to trigger my custom toolbar button. There is a '.Shortuct' property to the IPluginToolboxGroups.GetToolboxGroups , but to my knowledge that just displays text; it doesn't actually assign a keypress event.
Q:] Does a shortcut need to be coded elsewhere, or is it possible to assign a shortcut within the GetToolboxGroups() function?
A: ) It does not appear possible to associate a hotkey to a toolbar button (¿no longer supported?). However, the functionality of a hotkey can be implemented by using IPluginMenuExtender; shortcutkeys are supported here and the programmer does have the ability to reproduce the same action(s) programed into a toolbar group. (e.g., https://en.smath.com/forum/yaf_postsm79990_SMath-Keyboard-Shortcuts.aspx#post79990 )
Thank you!
-Kenny Lemens, P.E. ᵂᴵ
"No matter where you go, there you are." -Buckaroo BanzaiHotkeys: https://en.smath.com/forum/resource.ashx?a=45771&b=2
1 Pages (4 items)
-
New Posts
-
No New Posts