Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

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

New Here ,
Aug 06, 2024 Aug 06, 2024

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,

TOPICS
SDK
379
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Contributor , Aug 08, 2024 Aug 08, 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());

 

Th

...
Translate
Contributor ,
Aug 06, 2024 Aug 06, 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 08, 2024 Aug 08, 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,

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Aug 08, 2024 Aug 08, 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 13, 2024 Aug 13, 2024
LATEST

Thanks, Rahul

 

I appreciate the code example you provided.

I'll try it out right away using IPaletteWorkspace.

 

This was very helpful.

 

Thank you.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines