![]() | InDesign SDK 20.5 |
#include <IComboBoxCalculatedValue.h>

Public Types | |
| enum | { kDefaultIID = IID_ICOMBOBOXCALCULATEDVALUE } |
Public Member Functions | |
| virtual void | UserChoseItem (const PMString &string)=0 |
| virtual bool16 | IsMixedState () const =0 |
| virtual PMReal | GetCalculatedValue () const =0 |
| virtual PMString | GetCalculatedString () const =0 |
| virtual bool16 | IsLegalCalculatedString (const PMString &stringToCheck) const =0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
This interface exists to deal with combobox entries which support calculated values(i.e. 'Auto'). The methods allow us to figure out what we should display in the editbox. Typically it is either the name of the calculation system, such as 'Auto', or a value generated by the calculation system, like 14.4, which we will display as '(14.4)' so the user knows it is calculated. However, the calculated string could be anything, and there could be multiple calculation systems in a single combobox. The core UI code for comboboxes will call into this interface to gain information about calculated values. Implementors of new calculation systems would need to implement this interface and add it to their combobox boss.
| pure virtual |
Get the name of the calculation system(often 'Auto')
| pure virtual |
Get the current calculated value to display in the editbox(i.e. 14.4). Value is in points if this is some sort of measurement combobox.
| pure virtual |
Is the string passed in a legal calculated string? This is often a string the user has typed in.
| stringToCheck | the string to be verified |
| pure virtual |
This method should return whether or not this is a mixed state(if it is a mixed state, we put the calculated string returned by GetCalculatedString() in the editbox. Otherwise we ask for a value from GetCalculatedValue()). An example would be if text of 2 different point sizes was selected, but all the text used 'Auto' leading. IsMixedState() would return kTrue in this case.
| pure virtual |
Called to notify this interface that the user has chosen something, either by typing it in the editbox, or choosing an item from the drop down. Most implementations ignore this, but if your impl supports multiple calculation systems, this can be useful for keeping track of which is selected.
| string | The string for the new text in the editbox. This might come from an entry in the dropdown. |