2009-06-01 80 views
0

我正在为photoshop写一个fileformat插件,我需要弹出一个窗口,其中包含加载和保存选项,例如复选框组合框等,我该怎么做?Photoshop插件选项对话框UI

+0

是你的问题如何弹出的选项窗口,或者是你的问题是如何与选项,弹出一个窗口*在FILEFORMAT插件*? – 2009-06-13 16:23:10

+0

我会说后者 – 2009-06-14 21:29:40

回答

1

最新的SDK from Adobe有很多使用对话框和窗口的例子。

SaveSave As选项上,您的插件需要处理formatSelectorOptionsStart参数,并在该代码块中打开您的选项对话框。

Open动作,还有为选项提示(你会提示什么样的选择呢?),但你可以显示从对话中的事件包括没有正常的方式:formatSelectorFilterFileformatSelectorReadPrepareformatSelectorReadStartformatSelectorReadContinueformatSelectorReadFinish

下面是一个例子入口点到你的插件,处理不同的选择:

DLLExport MACPASCAL void PluginMain(
    const int16 selector, 
    PIPickerParams* pParams, 
    intptr_t * data, 
    int16 * result) 
{ 
    switch(selector) 
    { 
     case formatSelectorAbout: 
      // display about dialog 
      break; 
     case formatSelectorReadPrepare: 
      // prepare to read in file - adjust memory 
      break; 
     case formatSelectorReadStart: 
      // begin interaction regarding reading 
      // dialog here if needed 
      break; 
     case formatSelectorReadContinue: 
     case formatSelectorReadFinish: 
     case formatSelectorOptionsPrepare: 
      // handle each appropriately 
      break; 
     case formatSelectorOptionsStart: 
      // HERE is where you'd open your window 
      // with options, etc. 
      break; 
     // etc. 
     // etc. 
     // etc. 
    } 
} 
+0

虽然这有帮助,但它并没有真正回答这个问题。现在我已经试过了QT,但不能在Visual Studio中创建它,并且MFC/ATL/WTL拒绝工作,因为Adobe没有将该项目创建为ATL/MFC项目,所以我无法尝试这些项目。 – 2009-06-16 13:27:00

+0

你应该可以使用ATL/MFC/WTL。什么是阻止使用它们? – 2009-06-16 13:58:13