Difference between revisions of "IAdeUICallbacks"
m (Lchrisman moved page IAMsgBoxCallback to IAdeUICallbacks: Class name was changed in ADE 4.6) |
(rename of interface) |
||
Line 2: | Line 2: | ||
<< [[Analytica Decision Engine (ADE) API]] | << [[Analytica Decision Engine (ADE) API]] | ||
− | ''New to [[What's new in Analytica 4. | + | ''New to [[What's new in Analytica 4.6?|ADE 4.6]]'' |
− | = interface | + | = interface IAdeUICallbacks (ADE) = |
An application can implement this interface (as a COM interface) in order to intercept evaluations of the [[MsgBox]] function in expressions. This provides an opportunity for a program that uses ADE to display message boxes during evaluation in its interface. | An application can implement this interface (as a COM interface) in order to intercept evaluations of the [[MsgBox]] function in expressions. This provides an opportunity for a program that uses ADE to display message boxes during evaluation in its interface. | ||
− | To use this, your program must implement a COM class with the ''' | + | 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 == | == Methods == | ||
− | === LONG | + | === LONG MsgBox(string title, string text, long buttons) === |
Called when the [[MsgBox]] function is evaluated. You implement this method and can display a message box or other feedback to your end-user. The return value indicates what button was pressed to terminate the message box, as follows: | Called when the [[MsgBox]] function is evaluated. You implement this method and can display a message box or other feedback to your end-user. The return value indicates what button was pressed to terminate the message box, as follows: |
Revision as of 15:38, 12 May 2015
<< Analytica Decision Engine (ADE) API
New to ADE 4.6
interface IAdeUICallbacks (ADE)
An application can implement this interface (as a COM interface) in order to intercept evaluations of the MsgBox function in expressions. This provides an opportunity for a program that uses ADE to display message boxes during evaluation in its interface.
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(string title, string text, long buttons)
Called when the MsgBox function is evaluated. You implement this method and can display a message box or other feedback to your end-user. The return value indicates what button was pressed to terminate the message box, as follows:
- 1 = OK
- 2 = Cancel
- 3 = Abort
- 4 = Retry
- 5 = Ignore
- 6 = Yes
- 7 = No
The «buttons» parameter has the following values:
- 0 = OK only
- 1 = OK and Cancel [Default]
- 2 = Abort, Retry and Ignore
- 3 = Yes, No and Cancel
- 4 = Yes and No
- 5 = Retry and Cancel
which are then added to one of these values:
- 0 = no icon
- 16 = Critical
- 32 = Question
- 48 = Exclamation
- 64 = Information
Enable comment auto-refresher