Skip to main content
tsumetogi
Participating Frequently
August 6, 2024
Answered

How to Switch the Home Screen (SDK, C++)

  • August 6, 2024
  • 1 reply
  • 657 views

Hi,

 

I am developing a C++ plugin.

 

I want to prevent the process from being executed on the home screen from the panel I created.

 

From the plugin, is it possible to switch between the home screen and the screen that appears when no documents are open (where various panels are displayed)? Alternatively, can the preference "Show Home Screen When No Documents Are Open" be toggled on and off?

 

Any help would be appreciated.

 

Thanks,

Correct answer Rahul_Rastogi

You need to do small investigation -

 

When are are on your home screen then use the following code snippet on a menu click -

 

 
InterfacePtr<IApplication> iApplication(IBUtils::GetISession()->QueryApplication());
InterfacePtr<IPanelMgr> iPanelMgr(iApplication->QueryPanelManager());
InterfacePtr<IPanelMgr> iPanelMgr(iApplication->QueryPanelManager());
 
InterfacePtr<IPaletteWorkspace> iPaletteWorkspace(iPanelMgr, UseDefaultIID());

 

CAlert::InformationAlert(iPaletteWorkspace->GetActiveWorkspaceName());

 

This will give you the workspace name for active workspace which is Home Screen.

You may use the above information to either detect Home Screen or switch to Home Screen.

 

- Rahul Rastogi

Adobe InDesign C++ Custom Plugin Architect

1 reply

Inspiring
August 6, 2024

What you are referring to is the Workspace.

 

Use "kSetActiveWorkspaceCmdBoss" command to switch between the workspaces.

 

- Rahul Rastogi

Adobe InDesign C++ Custom Pugin Architect

tsumetogi
tsumetogiAuthor
Participating Frequently
August 8, 2024

Thanks, Rahul


I was able to switch to the default workspace using "kSetActiveWorkspaceCmdBoss."


Is it also possible to switch to the home screen or determine if the current screen is the home screen using a specific Boss?

Thanks,

Rahul_RastogiCorrect answer
Inspiring
August 8, 2024

You need to do small investigation -

 

When are are on your home screen then use the following code snippet on a menu click -

 

 
InterfacePtr<IApplication> iApplication(IBUtils::GetISession()->QueryApplication());
InterfacePtr<IPanelMgr> iPanelMgr(iApplication->QueryPanelManager());
InterfacePtr<IPanelMgr> iPanelMgr(iApplication->QueryPanelManager());
 
InterfacePtr<IPaletteWorkspace> iPaletteWorkspace(iPanelMgr, UseDefaultIID());

 

CAlert::InformationAlert(iPaletteWorkspace->GetActiveWorkspaceName());

 

This will give you the workspace name for active workspace which is Home Screen.

You may use the above information to either detect Home Screen or switch to Home Screen.

 

- Rahul Rastogi

Adobe InDesign C++ Custom Plugin Architect