![]() | InDesign SDK 20.5 |
#include <PNGIcon.h>
Public Member Functions | |
| void | ReadWrite (IPMStream *s, ImplementationID prop) |
| void | LoadIcon (const PluginID &pid, const RsrcID &iconRsrcID, bool brightnessAware=true, bool isAdornmentIcon=false) |
| void | Draw (IViewPort *viewPort, const SysRect &bbox, bool drawDisabled) |
| ErrorCode | DrawIcon (IGraphicsPort *graphicsPort) |
| SysRect | GetBounds () |
| RsrcID | GetRsrcID () |
| PluginID | GetRsrcPluginID () |
| bool | IsLoaded () |
Static Public Member Functions | |
| static PNGIcon * | CreateIcon (const PMRsrcID &inRsrcID, bool brightnesssAware=true, bool isAdornmentIcon=false) |
Protected Attributes | |
| PluginID | fPid |
| RsrcID | fIconRsrcID |
This class encapsulates loading & drawing a PNG based icon. Supports hires and dark UI icons.
| static |
API from old PlatformIcon class
| inRsrcID | the icon/PNG/SVG resource id within the plugin |
| brightnessAware | if true, the icon switches according to UI brightness at drawing time. Else bright UI icon is always drawn. |
| isAdornmentIcon | whether the icon is an adornment. If true, InDesign will scale the SVG icon based on the UI Scaling preference. |
Draw the icon previously loaded into this object
| viewPort | the port to draw into |
| bbox | the rect to draw into |
| drawDisabled | a boolean indicating if the icon should be drawn with a disabled look |
| ErrorCode PNGIcon::DrawIcon | ( | IGraphicsPort * | graphicsPort | ) |
Draw the icon previously loaded into this object
| graphicsPort | the graphics port to draw into |
| void PNGIcon::LoadIcon | ( | const PluginID & | pid, |
| const RsrcID & | iconRsrcID, | ||
| bool | brightnessAware = true, | ||
| bool | isAdornmentIcon = false | ||
| ) |
Load an icon into this object for later drawing.
| pid | the plugin the icon is coming from |
| iconRsrcID | the icon/PNG/SVG resource id within the plugin |
| brightnessAware | if true, the icon switches according to UI brightness at drawing time. Else bright UI icon is always drawn. |
| isAdornmentIcon | whether the icon is an adornment. If true, InDesign will scale the SVG icon based on the UI Scaling preference. |
| void PNGIcon::ReadWrite | ( | IPMStream * | s, |
| ImplementationID | prop | ||
| ) |
Read or write this object to the given stream.
| s | the stream to read or write from/to |
| prop | ignored |