MapInfo Pro Add-Ins can now add menus to the Quick Access Toolbar. You can use the
MapInfo.Types.IRibbon.SaveRibbonState
method while unloading an
Add-In and the MapInfo.Types.IRibbon.LoadRibbonState
method while
loading an Add-In from MapInfo.Types.IRibbon
to enable the Quick
Access Toolbar.
See below for the definitions of the two
methods:
/// <summary>
/// Load add-in's ribbon state.
/// </summary>
/// <param name="identifier">a unique name</param>
/// <param name="path">Add-in path</param>
/// <remarks>An Add-in can call this to load any items a user has added to the Quick Access Toolbar.
/// Only ribbon items with the IsQAT property set to true can be added to the QAT. Gallery controls cannot be added to the QAT.
/// A state file is loaded from the location specified by the path with the name made up of the identifier followed by ".QatState.json".
/// See <see cref="MapInfo.Types.IRibbon.SaveRibbonState"/>
/// /// </remarks>
void LoadRibbonState(string identifier, string path);
/// <summary>
/// Save add-in's ribbon state.
/// </summary>
/// <param name="identifier">A unique name</param>
/// <param name="path">Add-in path</param>
/// <remarks>
/// <para>An Add-in can call this to save any items a user has added to the Quick Access Toolbar.
/// Only ribbon items with the IsQAT property set to true can be added to the QAT. Gallery controls cannot be added to the QAT.
/// A state file is created in the location specified by the path with the name made up of the identifier followed by ".QatState.json".
/// See <see cref="MapInfo.Types.IRibbon.LoadRibbonState"/>
/// </para>
/// <para>
/// Add-in should call this method before removing any control from the ribbon.
/// </para>
/// </remarks>
void SaveRibbonState(string identifier, string path);