IAdeUICallbacks
ADE用戶指南 > ADE伺服器類型參考 >
ADE 4.6新特徵
該接口允許你執行Analytica函數請求計算用戶輸入時調用的回調函數。你可以執行這些回調函數以便支持你的應用程式中的這些用戶界面交互性。在許多情況下,每種方法的名稱直接和生成用戶交互界面的Analytica函數名稱相對應。
當你的應用程式沒有執行該接口時,大多數需要用戶交互的函數在ADE中被計算時不會做任何事情。
"IAde"代表"Interface ADE"的前綴。你自己的代碼能夠定義一種類型:將接口定義為子類型,並執行其方法,然後將它傳遞給CAEngine::SetCallbackObject。
如果要使用該方法,你的程序必須執行COM類型,並帶一條關於該方法的信息,例如MsgBox方法 。作為一個COM類型,將從IUnknown上執行QueryInterface,並且其QueryInterface方法必須報告它執行了該接口。然後你可以實例化該類型並將該對象的一個指針傳遞給CAEngine::SetCallbackObject。
方法
long MsgBox([in] string title, [in] string text, [in] long buttons)
Called when MsgBox() is evaluated.
bool ShowProgressBar([in] string title, [in] string text, [in] double p)
Called when ShowProgressBar() is evaluated.
void HideProgressBar()
調用時,進度條應該被隱藏,例如當被請求的結果計算完成時。
string AskMsgText([in] string question, [in] string title, [in] long maxText, [in] string defaultText, [in] bool bPassword, [out] bool *bCancel)
在計算AskMsgText()時調用。
double AskMsgNumber([in] string question, [in] BSTR title, [in] bool bShowDefault, [in] double defaultNumber, [out] bool* bCancel)
在AskMsgNumber()被計算時調用。
long AskMsgChoice([in] string question, [in] string title, [in] array<string> optionList, [in] long defaultPosition, [in] bool bShowAll, [out] bool * bCancel)
當AskMsgChoice()被計算時調用,並指定 Choice-風格控制
string AskMsgComboBox([in] string question, [in] string title, [in] array<string> optionList, [in] string defaultText, [in] bool bShowAll, [out] bool* bCancel)
Called when AskMsgChoice() is evaluated, with a combo-box style control specified.
string GetFilename([in] string function, [in] string defaultName, [in] string directory, [in] string extensions, [in] string caption, [in] CAObject* callingIdent)
在ReadTextFile()、 SpreadsheetOpen()、 ReadImageFile()或者ReadExportFile()被調用時調用, 然後請求提供一個文件名。在此一般都會顯示一個打開的文件對話,或者在一個web程序當中提示上傳文件。你應該返回該文件的完整路徑。
void FileOpenCompleted([in] string function, [in] string fullFilePath)
在IAdeUICallbacks::GetFilename調用中所要求的文件已經被完全讀取後調用。如果你為讀取該文件建立了一個臨時文件(例如,用戶上傳了一個文件),你可以在此刪除該臨時文件。
void ShowPdfFile([in] string filepath, [in] string bookmark, [in] bool bSearch, [in] bool bBookmarks)
計算ShowPdfFile()時調用。
void OpenURL([in] string url, [in] string window, [in] string specs)
計算OpenURL()時調用。
另請參考
CALicense <- | AdeUICallbacks | -> |
Enable comment auto-refresher