IAdeUICallbacks
ADE 用户指南 > ADE服务器类型参考 >
ADE 4.6新特征
该接口允许你执行Analytica函数请求计算用户输入时调用的回调函数。你可以执行这些回调函数以便支持你的应用程序中的这些用户界面交互性。在许多情况下,每种方法的名称直接和生成用户交互界面的Analytica函数名称相对应。
When your application does not implement this interface, most of the functions requiring user interaction will do nothing when evaluated in ADE.
The "IAde" prefix stands for "Interface ADE". Your own code can define a class that subclasses this interface and implements its method, and then pass it to CAEngine::SetCallbackObject.
To use this, your program must implement a COM class with each of the messages, such as the MsgBox method. As a COM class, it will implement the QueryInterface method from IUnknown, and its QueryInterface method must report that it implements this interface. You then instantiation an instance of the class and pass a pointer to that object to CAEngine::SetCallbackObject.
Methods
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()
Called when progress bar should be hidden, for example when the computation of the requested result has completed.
string AskMsgText([in] string question, [in] string title, [in] long maxText, [in] string defaultText, [in] bool bPassword, [out] bool *bCancel)
Called when AskMsgText() is evaluated.
double AskMsgNumber([in] string question, [in] BSTR title, [in] bool bShowDefault, [in] double defaultNumber, [out] bool* bCancel)
Called when AskMsgNumber() is evaluated.
long AskMsgChoice(([in] string question, [in] string title, [in] array<string> optionList, [in] long defaultPosition, [in] bool bShowAll, [out] bool * bCancel)
Called when AskMsgChoice() is evaluated, with a Choice-style control specified.
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)
Called when ReadTextFile(), SpreadsheetOpen(), ReadImageFile() or ReadExportFile() is called, and needs to ask for a filename. You would generally display a file-open dialog here, or in a web-app, a file-upload prompt. You should return a full path to the file.
void FileOpenCompleted([in] string function, [in] string fullFilePath)
Called when the file requested in the call to IAdeUICallbacks::GetFilename has been fully read. If you created a temporary file for the read (e.g., if the user uploaded a file), you can delete that temporary here.
void ShowPdfFile([in] string filepath, [in] string bookmark, [in] bool bSearch, [in] bool bBookmarks)
Called when ShowPdfFile() is evaluated.
void OpenURL([in] string url, [in] string window, [in] string specs)
Called when OpenURL() is evaluated.
See Also
| CALicense <- | IAdeUICallbacks | -> |
Enable comment auto-refresher