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

Tool plugin panels with flex GUI

New Here ,
Mar 20, 2014 Mar 20, 2014

I have an Illustrator plugin which installs several tools. I want to have a panel pop up for each tool when the user selects a tool.

All the SDK examples I have seen create a main flex panel when the extension loads up. I do not want to any panel to appear when the extension is loaded. I want to load the extension and then popup panels only when a tool is selected.

What is the best way to implement this behavior?

TOPICS
SDK
959
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
Adobe
Guide ,
Mar 20, 2014 Mar 20, 2014

There's a tool even for when a tool is selected, so it'd be fairly trivial to respond to use that opportunity to show the panel. We used to do this for one of our panels.

Also, though I don't use flex I would think it'd be possible to load but not show a panel when the extension is loaded, but I can't swear to it.

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 ,
Mar 20, 2014 Mar 20, 2014

Also, though I don't use flex I would think it'd be possible to load but not show a panel when the extension is loaded, but I can't swear to it.

That seems to be the biggest obstacle. Whenever I load the extension a panel appears. I tried setting the dimensions to 0 and setting Autovisible=false but the panel still shows up whenever the extension is loaded.

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
Enthusiast ,
Apr 01, 2014 Apr 01, 2014

You could give a look at FreedGrid/UI or StrikeFilter/UI projets. (sdk samples).

You will definitely find everything you are asking for.

1- How to set your plugin (tools,menus, notifications and communication).

2- How to set your extension (communication with your plugin, show, hide, load and unload extension).

Easy as 1,2,3!

Here is a sample code showing you how it works:

/*

*/

ASErr FreeGridPlugin::GoMenuItem(AIMenuMessage* message)

{

          ASErr result = kNoErr;

          // Compare the menuItem selected (in the message) with our stored values to see if we do anything

          if (message->menuItem == this->fAboutPluginMenu)

          {

                         // Pop this plug-in's about box.

                         SDKAboutPluginsHelper aboutPluginsHelper;

                         aboutPluginsHelper.PopAboutBox(message, "About FreeGrid", kSDKDefAboutSDKCompanyPluginsAlertString);

          }

          else if (message->menuItem == this->fMoveToNewAIMenu)

          {

                    if (freeGridDialogController)

                    {

                                   ASBoolean visible = freeGridDialogController->GetPanelReady();

                                   if(visible)

                              {

                                             result = freeGridDialogController->UnloadExtension();

                                             freeGridDialogController->SetPanelReady(false);

                              }

                              else

                              {

                                             result = freeGridDialogController->LoadExtension();

                              }

                    }

          }

          return result;

}

Best reagards,

Thomas.

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
Participant ,
Apr 04, 2014 Apr 04, 2014
LATEST

You can always hide the panel (using panel controller) in your plugin startup.

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