2009-06-01 55 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