InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IDocumentUIState Class Referenceabstract

#include <IDocumentUIState.h>

Inheritance diagram for IDocumentUIState:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IDOCUMENTUISTATE }
 

Public Member Functions

virtual PMRect GetPresentationFrame () const =0
 
virtual void GetScaleFactor_ (PMReal &xScaleFactor, PMReal &yScaleFactor) const =0
 
virtual void SetScaleFactor_ (PMReal &xScaleFactor, PMReal &yScaleFactor)=0
 
virtual PMPoint GetScrollOffset () const =0
 
virtual void SetScrollOffset (PMPoint &p)=0
 
virtual
ILayoutControlData::FitSetting 
GetFitSetting () const =0
 
virtual void SetFitSetting (ILayoutControlData::FitSetting fit)=0
 
virtual IWindow::VisibleState GetVisibleSetting () const =0
 
virtual PMRect GetSavedMonitorRect () const =0
 
virtual
IDocumentPresentation::CreationParentingPrefs 
GetParentingPreferenceForCreation () const =0
 
virtual void UpdateUIState (IPresentationList *docPresentationList)=0
 
virtual void UpdateUIState (ILayoutControlData *layoutControlData)=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

An interface off the document workspace (kDocWorkspaceBoss) that captures the ui state of a document. Currently this is only used on layout views in order to save and restore view size, position, scroll location, zoom factor, maximize/minimize state, etc when reopening a layout views. Replaces the IDocWindowState.h interface.

All the Set methods in this class are already called automatically in response to window size, zoom, etc events, so they are probably of limited use to third parties.

See Also
kDocWorkspaceBoss
IPanorama.h, RestorePerspective
IOpenLayoutWinCmdData.h, SetPerpective

Member Function Documentation

virtual ILayoutControlData::FitSetting IDocumentUIState::GetFitSetting () const
pure virtual

Return the 'fit' setting for the window.

Returns
the 'fit' setting for the window.
See Also
ILayoutControlData.h for values for FitSetting
virtual IDocumentPresentation::CreationParentingPrefs IDocumentUIState::GetParentingPreferenceForCreation () const
pure virtual

Return a presentation's floating vs docked creation pref.

Returns
the pref
virtual PMRect IDocumentUIState::GetPresentationFrame () const
pure virtual

Return a presentation's view size.

Returns
GSysRect frame size
virtual PMRect IDocumentUIState::GetSavedMonitorRect () const
pure virtual

Return the main monitor rect when the document was saved. Used when reopening a document to see if the current monitor is dramatically different than the one in use when the document was saved.

Returns
the monitor rect this document was saved with.
See Also
IMonitorInfo.h
GetMainScreenRect
virtual void IDocumentUIState::GetScaleFactor_ (PMRealxScaleFactor,
PMRealyScaleFactor 
) const
pure virtual

Return the scale factor for a presentation. xScaleFactor and yScaleFactor are generally the same.

Parameters
IN/OUTxScaleFactor the x scaling factor for this view
IN/OUTyScaleFactor the y scaling factor for this view
See Also
GetPresentationCount
virtual PMPoint IDocumentUIState::GetScrollOffset () const
pure virtual

Return the scroll offset for a view.

See Also
GetPresentationCount
virtual IWindow::VisibleState IDocumentUIState::GetVisibleSetting () const
pure virtual

Return the visible setting of the window.

Returns
VisibleState of the window.
See Also
IWindow.h
virtual void IDocumentUIState::SetFitSetting (ILayoutControlData::FitSetting fit)
pure virtual

Set the 'fit' setting for the window. Called in response to zoom changes on the layout window.

Parameters
fitthe new fitting setting
virtual void IDocumentUIState::SetScaleFactor_ (PMRealxScaleFactor,
PMRealyScaleFactor 
)
pure virtual

Set the x and y scale factors for a window. Called in response to zoom changes on the layout window.

Parameters
xScaleFactor
yScaleFactor
See Also
GetPresentationCount
virtual void IDocumentUIState::SetScrollOffset (PMPointp)
pure virtual

Set the scroll offset for a view. Called in response to scroll changes on the layout window.

Parameters
pa PMPoint value representing the offset
virtual void IDocumentUIState::UpdateUIState (IPresentationListdocPresentationList)
pure virtual

Capture the ui state for layout views for a document. This is saved persistently so when the document is reopened, the zoom factor, fit setting, scroll offset and view size are restored. This method is called internally in response to various size, zoom, scroll changes.

Parameters
*docPresentationListthe document's presentation list.
virtual void IDocumentUIState::UpdateUIState (ILayoutControlDatalayoutControlData)
pure virtual

Capture the ui state for layout views for a document. This is saved so when the document is reopened, the zoom factor, fit setting, scroll offset and view size are restored. This method is called internally in response to various size, zoom, scroll changes.

Parameters
*layoutControlDataof the front document.