我正在为photoshop写一个文件格式的插件,我需要弹出一个窗口与选项加载和保存,如复选框,组合框等,我该怎么做?
发布于 2009-06-09 19:02:24
最新的SDK from Adobe有许多使用对话框和窗口的示例。
在Save或Save As选项中,您的插件需要处理formatSelectorOptionsStart参数,并在该代码块中打开选项对话框。
在Open操作中,没有常规的方式来提示输入选项(您会提示输入哪种选项?)但可以显示对话框的事件包括:formatSelectorFilterFile、formatSelectorReadPrepare、formatSelectorReadStart、formatSelectorReadContinue和formatSelectorReadFinish
下面是一个处理不同选择器的插件的入口点示例:
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.
}
}https://stackoverflow.com/questions/935369
复制相似问题