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

#include <IWindowUtils.h>

Inheritance diagram for IWindowUtils:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IWINDOWUTILS }
 

Public Member Functions

virtual IWindowQueryWindowUnderPoint (GSysPoint point, bool16 appFrameOK, bool16 bSkipIgnoreables=kFalse)=0
 
virtual void SnapRectToNearestDocWindow (const SysRect &rt, uint32 snapDistance, SysPoint &delta, IDocumentPresentation *excludeWindow=nil)=0
 
virtual void SnapRectToNearestMonitor (const SysRect &rt, uint32 snapDistance, SysPoint &delta)=0
 
virtual AcquireModalDialogStateCreateModalDialogState ()=0
 
virtual void ReleaseModalDialogState (AcquireModalDialogState *modalDialogState)=0
 
virtual void AddFilenameToDialogTitle (IDialog *dialog, const PMString &importFileName)=0
 
virtual void RemoveEventHandlersForWindow (IWindow *window)=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

Utility interface for doing a few useful things with windows. use like so:


Utils<IWindowUtils>()->QueryWindowUnderPoint( ... );

Member Function Documentation

virtual void IWindowUtils::AddFilenameToDialogTitle (IDialogdialog,
const PMStringimportFileName 
)
pure virtual

Adds filename to titlebar of dialog. Used for import filter prefs dialogs

virtual AcquireModalDialogState* IWindowUtils::CreateModalDialogState ()
pure virtual

Dynamically allocate an AcquireModalDialogState

virtual IWindow* IWindowUtils::QueryWindowUnderPoint (GSysPoint point,
bool16 appFrameOK,
bool16 bSkipIgnoreables = kFalse 
)
pure virtual

Returns window under given point, or nil if no IWindow is under it (ignores if bSkipIgnoreables is kTrue and the window's boss has an IID_IIGNOREABLEWINDOW interface containing a kTrue value)

Parameters
pointthe mouse point
appFrameOKWhether or not it's ok to return the app frame window on Windows.
bSkipIgnoreablesWhether or not to skip windows which implement IID_IIGNOREABLEWINDOW and have the value set to kTrue
virtual void IWindowUtils::ReleaseModalDialogState (AcquireModalDialogStatemodalDialogState)
pure virtual

Free an AcquireModalDialogState returned by a previous call to CreateModalDialogState

virtual void IWindowUtils::RemoveEventHandlersForWindow (IWindowwindow)
pure virtual

Flags the window's IID_IFOCUS_EH_GETTING_REMOVED interface to indicate that the event handler is getting removed, then delegates to IKeyboard::RemoveEventHandlersForWindow().

See Also
IKeyboard::RemoveEventHandlersForWindow
virtual void IWindowUtils::SnapRectToNearestDocWindow (const SysRectrt,
uint32 snapDistance,
SysPointdelta,
IDocumentPresentationexcludeWindow = nil 
)
pure virtual

Return snap value in delta if rt can snap to any palette window (except excludeWindow if it's not nil) by CORNERS. If the passed-in delta is not (0,0) (meaning there's a previous snap value), the new delta will not be constrained by the previous delta. Return snap value in delta if rt can snap to any doc window (except excludeWindow if it's not nil) by EDGES. If the passed-in delta is not (0,0) (meaning there's a previous snap value), the new delta will not be constrained by the previous delta (in each DIRECTION).

virtual void IWindowUtils::SnapRectToNearestMonitor (const SysRectrt,
uint32 snapDistance,
SysPointdelta 
)
pure virtual

Return snap value in delta if rt can snap to any monitor by EDGES. If the passed-in delta is not (0,0) (meaning there's a previous snap value), the new delta will not be constrained by the previous delta (in each DIRECTION).