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

Public Types | |
| enum | { kDefaultIID = IID_IAPPEARANCELIST } |
| enum | { kInvalidate = kTrue, kDontInvalidate = kFalse, kInvalidStateID = -1, kLastInOrder = -1 } |
| typedef int32 | StateID |
Public Member Functions | |
| virtual Form::AppearanceState | GetActiveState () const =0 |
| virtual StateID | GetStateID (Form::AppearanceState inState) const =0 |
| virtual StateID | GetActiveStateID () const =0 |
| virtual Form::AppearanceState | GetIDState (IAppearanceList::StateID inStateID) const =0 |
| virtual void | SetActiveState (Form::AppearanceState inState)=0 |
| virtual Form::AppearanceState | GetChildState (const UID &inChildUID) const =0 |
| virtual Form::AppearanceState | GetActiveStateTemp () const =0 |
| virtual Form::AppearanceState | GetStateFromName (const PMString &name) const =0 |
| virtual Form::AppearanceState | GetNextAvailableState () const =0 |
| virtual void | SetActiveStateTemp (Form::AppearanceState inState, bool16 inInvalCaches=IAppearanceList::kInvalidate)=0 |
| virtual int32 | NumStates () const =0 |
| virtual bool16 | HasAppearance (Form::AppearanceState inState) const =0 |
| virtual void | AddAppearance (Form::AppearanceState inState, const Form::Appearance &inAppearance, int32 position=kLastInOrder)=0 |
| virtual void | RemoveAppearance (Form::AppearanceState inState, Form::Appearance *outRemovedAppearance)=0 |
| virtual void | ChangeState (Form::AppearanceState inState, Form::AppearanceState inNewState)=0 |
| virtual void | Move (Form::AppearanceState inState, int32 inPosition)=0 |
| virtual bool16 | CanAddState (Form::AppearanceState inState) const =0 |
| virtual bool16 | GetAppearance (Form::AppearanceState inState, Form::Appearance *outAppearance) const =0 |
| virtual void | SetAppearance (Form::AppearanceState inState, const Form::Appearance &inAppearance)=0 |
| virtual Form::AppearanceState | GetNthState (int32 inStateIndex) const =0 |
| virtual int32 | GetStatePosition (Form::AppearanceState inState) const =0 |
| virtual void | Clear ()=0 |
| virtual ErrorCode | GetThumbnail (Form::AppearanceState inState, int32 inMaxWidth, int32 inMaxHeight, AGMImageRecord *outAGMRecord)=0 |
| virtual void | InvalidateThumbnail (Form::AppearanceState inState)=0 |
| virtual void | DisposeThumbnail (Form::AppearanceState inState)=0 |
| virtual void | ForceRemoveAppearance (Form::AppearanceState inState, Form::Appearance *outRemovedAppearance)=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
A list of alternate appearances (states) for a page item. Each state consists
of a state type, and a list of children (which are accessed via IHierarchy). You may add/delete states, and set an active state. The currently active state determines which children of the page item are exposed via IHierarchy. The children belonging to inactive states are hidden, and are only accessible when their state becomes the active state.
The implementation of IHierarchy for a page item with an IAppearanceLIst interface uses the active state in IAppearanceList so that it only presents the children of the active state.
| pure virtual |
Add a new appearance state to the list. Better to use kNewStateCmdBoss command, which handles necessary maintenance to IHierarchy, than to call this directly.
| inState | The state to add |
| inAppearance | Parameters for the new state |
| pure virtual |
Determine if a particular state is present in this IAppearanceList.
| pure virtual |
Change an appearance state in the list. Doesn't change page item children for state. Use IHierarchy for that
| inState | The state to change |
| inNewState | The state to change inState to. |
| pure virtual |
Delete all states in the appearance list. This should not be called directly, as an AppearanceList is supposed to always contain one or more normal states. This method is only used internally when copying page items with IAppearanceLists. This does not removed the children in IHierarchy.
| pure virtual |
Throw away any cached thumbnails for state inState.
| pure virtual |
Internal Use Only. Before one try to remove any appearance, it checks whether it can actually remove it or not. This API eliminates this check & just go ahead and delete appearence
| inState | The state to remove |
| outRemovedAppearance | If non-nil, returns the parameters for the deleted state, Pass nil if you don't need this information. |
WARNING : If not used in appropriate senario, it would lead to undesirable results.
| pure virtual |
Return the active state.
| pure virtual |
| pure virtual |
Get the "temp" active state, which is the last value set by SetActiveStateTemp Shouldn't need to call this directly. Use StSetStateTemp instead.
| pure virtual |
Get parameters for state. For now, this only consisted of the "enabled" property. Enabled says whether the state will be exported in the PDF for the page item (form field).
| pure virtual |
Get the state that contains inChild.
| inChild | a valid child in this items IHierarchy (may be in an inactive state, and may not be immediate child) |
| pure virtual |
| pure virtual |
Get the first supported state that does not have an appearance associated with it. Specifically useful for creating states on form fields that do not use the states defined in Form::DefinedAppearanceState
| pure virtual |
Get the inStateIndexth state that is the IAppearanceList. Used to iterate through all the states.
| pure virtual |
Get the appearance state whose name matches the specified name.
| pure virtual |
Return the unique id an appearance state. Each state has an id that remains the same for the life of the appearance, which is unique from any other existing appearance. This id may be used to id/find/track the appearance regardless of any changes made to the appearance
| pure virtual |
Returns the index of inState IAppearanceList.
| pure virtual |
Return a bitmap of size inMaxWidth x inMaxHeight (at most) that is the rendered appearance of inState. Used to draw thumbnails in appearance palette.
| inState | state of thumbnail to get |
| inMaxWidth | max width of thumbnail. Thumb is either inMaxWidth or the actual width of the appearance. |
| inMaxHeight | max height of thumbnail. Thumb is either inMaxHeight or the actual height of the appearance. |
| outAGMRecord | thumbnail is returned here. Do not allocate or release the pixels. They are owned by the thumbnail. outAGMRecord is only valid while IAppearanceList is valid, and there are no operations that change the appearance of any of the IAppearanceList states. |
| pure virtual |
| pure virtual |
Invalidate any cached thumbnails for state inState, used when anything effecting the appearance of the state is changed.
| pure virtual |
Move a state to a specific position in the state-ordering.
| inState | The state to move |
| inPosition | The position in the state-ordering to move the state to |
| pure virtual |
| pure virtual |
Removes a appearance state from the list. This does not removed the children in IHierarchy use kDeleteStateCmdBoss command to handle the deletion of children and other housekeeping.
| inState | The state to remove |
| outRemovedAppearance | If non-nil, returns the parameters for the deleted state, Pass nil if you don't need this information. |
| pure virtual |
Set the active state.
| inState | a valid state in IAppearanceList that will become the active state |
| pure virtual |
Sets a alternate, temp state, separate from GetActiveState and SetActiveState, which doesn't not dirty the interface. Used when drawing thumbnails. shouldn't be called directly, use StSetStateTemp instead
| inState | The state that should become the active state |
| inInvalCaches | Whether or not the thumbnails need to be invalidated, If you are sure the state is not going to be changed, pass IAppearanceList::kDontInvalidate |
| pure virtual |
Set parameters for state. For now, this only consisted of the "enabled" property. Enabled says whether the state will be exported in the PDF for the page item (form field).