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

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

New Here ,
Aug 06, 2024 Aug 06, 2024

Copy link to clipboard

Copied

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

Views

132

Translate

Translate

Report

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

...

Votes

Translate

Translate
Contributor ,
Aug 06, 2024 Aug 06, 2024

Copy link to clipboard

Copied

What you are referring to is the Workspace.

 

Use "kSetActiveWorkspaceCmdBoss" command to switch between the workspaces.

 

- Rahul Rastogi

Adobe InDesign C++ Custom Pugin Architect

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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,

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

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