IAdeUICallbacks

Revision as of 10:10, 15 October 2015 by Jhuawen (talk | contribs) (Created page with "调用时,进度条应该被隐藏,例如当被请求的结果计算完成时。 == string AskMsgText([in] string question, [in] strin...")
Other languages:
English • ‎中文

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)

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.


另请参考

CALicense <- AdeUICallbacks ->
Comments


You are not allowed to post comments.