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

Public Types | |
| enum | { kDefaultIID = IID_IUICOLORUTILS } |
| enum | { kStockUILightBlue, kFirstUIColor = kStockUILightBlue, kStockUIRed, kStockUIGreen, kStockUIBlue, kStockUIYellow, kStockUIMagenta, kStockUICyan, kStockUIGray, kStockUIBlack, kStockUIOrange, kStockUIDarkGreen, kStockUITeal, kStockUITan, kStockUIBrown, kStockUIViolet, kStockUIGold, kStockUIDarkBlue, kStockUIPink, kStockUILavender, kStockUIBrickRed, kStockUIOlive, kStockUIPeach, kStockUIBurgundy, kStockUIGrassGreen, kStockUIOchre, kStockUIPurple, kStockUILightGray, kLastRomanUIColor = kStockUILightGray, kStockUICharcoal, kFirstJUIColor = kStockUICharcoal, kStockUIGridBlue, kStockUIGridOrange, kStockUIFiesta, kStockUILightOlive, kStockUILipstick, kStockUICuteTeal, kStockUISulfur, kStockUIGridGreen, kStockUIWhite, kLastJUIColor = kStockUIWhite, kLastUIColor = kStockUIWhite, kStockBaselineGrid = kStockUILightBlue, kStockMarginGuide = kStockUIMagenta, kStockRulerGuide = kStockUICyan, kStockColumnGuide = kStockUIViolet, kStockDocumentGrid = kStockUILightGray, kStockFloor = kStockUILightGray, kStockDynamicSpell = kStockUIRed, kStockDynamicSpellGrammar = kStockUIGreen, kStockJBaselineGrid = kStockUILightBlue, kStockJMarginGuide = kStockUILipstick, kStockJColumnGuide = kStockUILavender, kStockLayoutGrid = kStockUIGridGreen, kStockReferencePoint = kStockUITeal, kStockPasteboard = kStockUIWhite, kStockXMLTag = kStockUIGray, kStockPreviewBackground = kStockUILightGray } |
| enum | { kNumUIColors = kLastUIColor - kFirstUIColor + 1 } |
| enum | { kRed = 0, kGreen, kBlue } |
Public Member Functions | |
| virtual void | BuildUIColorNameList (IStringListControlData *stringData, bool16 bAddOther=kTrue)=0 |
| virtual int32 | GetUIColorNum ()=0 |
| virtual PMString | GetUIColorName (int32 index)=0 |
| virtual UIDRef | GetUIColor (int32 stockColor, IDocument *doc)=0 |
| virtual int32 | GetUIColorIndex (UID stockColorUID, IDocument *doc)=0 |
| virtual ColorArray | GetStockUIColorRGBValue (int32 stockColor)=0 |
| virtual ColorArray | GetRGBColorValue (IDataBase *db, UID colorUID)=0 |
| virtual ColorArray | GetAdjustedUIColorValue (ColorArray &color, PMReal adjustFactor)=0 |
| virtual int32 | GetUIColor (IScriptRequestData *data, IScript *script, const ScriptID &propID, UID colorUID=kInvalidUID, int32 colorIndex=-1)=0 |
| virtual int32 | SetUIColor (IScriptRequestData *data, IScript *script, const ScriptID &propID, UID *colorUID)=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
Utility interface for dealing with UI colors.
Note: This interface should be accessed through the Utils boss, eg., Utils<IUIColorUtils>()->CopyObjects( ... )
| anonymous enum |
For doc UI colors
| anonymous enum |
For the operations of dropdown list and color widgets
| pure virtual |
Fills in the string list data with the UI color names. Will optionally add "Other" at the end.
| stringData | OUT The string list control data to populate |
| bAddOther | IN If kTrue, the method will add an entry for "Other" at the end |
| pure virtual |
Gets a UI color adjusted by moving its RGB values closer to white (1.0). Used for standoff handle shape color, frame thread lines, and document grid subgridlines.
Note: adjustFactor must be a percent value from 0.0 (0%) to 1.0 (100%)
| color | IN The color to adjust (RGB) |
| adjustFactor | IN The percentage by which RGB values are adjusted |
| pure virtual |
Gets the RGB value for a UI color from the given database. The color definition must already be in RGB color space. Otherwise, it will return the RGB value for Black.
Use this when drawing document UI related colors such as guides, layer, etc.
DO NOT use this to render any document color from the color list.
| db | IN The database for the UI color |
| colorUID | IN The UID for the UI color |
| pure virtual |
Gets the RGB value for a global UI color (from the application workspace).
| stockColor | IN The index of the stock color in the global color list |
Gets the stock color from the given document's UI color list (which resides in the document's workspace). If the document is nil, will default to the app UI color list.
| stockColor | IN The index of the stock color to return |
| doc | IN The document in which to find the color |
| pure virtual |
Gets the UI color for scripting. GetUIColor needs both the uid of the ui color as well as its index. However, the caller need only supply one or the other. A valid UID and an index of -1 or a kInvalidUI and a valid index.
| data | is the script event data from which the data is retrieved. |
| script | is the script object. |
| propID | is the property ID of the script object. |
| colorUID | is the color UID of the object. |
| colorIndex | is the color index of the object. |
Gets the index of the specified stock color from a document's UI color list (which resides in the document's workspace). If the document is nil, will default to the app UI color list.
| stockColorUID | IN The stock color's UID |
| doc | IN The document in which to find the color |
| pure virtual |
Returns the name of the UI color at the given index.
| pure virtual |
Returns the number of available UI Colors.
| pure virtual |
Sets a UI color for scripting.
| data | is the script event data from which the data is retrieved. |
| script | is the script object. |
| propID | is the property ID of the script object. |
| colorUID | is the new color UID to set. |