LayerAV_Layer
ObjectAVWindow

AVWindow provides methods for creating and managing windows. Plug-ins should use AVWindow methods for their own dialog boxes, floating palettes, and so forth, to ensure that those windows work well with Acrobat. For example, plug-ins should ensure that under Windows, they are hidden when Acrobat is iconified. Once the plug-in creates an AVWindow, it is free to use platform-dependent code to put whatever it wants in the window.

Acrobat uses the concept of a key window. The key window is the window that receives keyboard events. Only one window is the key window at any time. Windows can request to become the key window, or request that they no longer be the key window.

On Mac OS, there is an essential distinction between a key window and an active window. A window is a key window only if it is the target of all keystrokes and menu selections. A window is the active window if mouse clicks in it are interpreted without requiring an initial activation click. This state is usually indicated (in modal and non-floating windows) with some highlighting in the title bar. Floating windows are inactive only if hidden.



Define Summary
 Define
 AVWIN_AUXILIARY
Auxiliary windows pass unhandled menu commands to the frontmost document window. For example, the Find dialog box is auxiliary since menu items such as Save and Close should still be enabled. A window that does not purport to operate on the topmost document window (for example, an "Establish Connection to Library of Congress" dialog box) would probably not be auxiliary.
 AVWindow
 AVWIN_FORMFIT
The window sizes itself to fit its child views.
 AVWIN_HASCLOSEBOX
The window has a close box.
 AVWIN_HASDRAGBAR
The window has a drag bar.
 AVWIN_HASMINIMIZEBOX
The window has a minimize box.
 AVWIN_HASZOOMBOX
The window has a zoom box.
 AVWIN_INTERNAL_DOC
The default internal document window for the platform. It must be combined with AVWLnonfloating. This overrides all other flags.
 AVWIN_PDFICON
The window should have the PDF icon associated with it
 AVWIN_RESIZEABLE
The window is resizeable.
 AVWIN_SMALLTITLEBAR
The window has a small title bar.
 AVWIN_TRANSIENT
The window hides itself when focus is lost.
 AVWIN_UNDECORATED
The window does not have decorations such as borders, captions or edges.
 AVWIN_WANTSKEY
AVWindowFlags AVWIN_WANTSKEY is deprecated and ignored.
 AVWLfloating
A floating window, such as a palette.
 AVWLhelp
(Internal use only) A help window.
 AVWLmenu
A window that occupies the same layer as popup menus, and has no title bar decorations.
 AVWLmodal
A modal dialog box.
 AVWLnonfloating
A regular window, such as a document window.
 AVWLpopup
(New in Acrobat 5.0) A popup window without a caption, a one-pixel border and drop shadow.
 AVWLtoolbar
(Internal use only) A toolbar window.
 AVWLtopmost
A top level window that has no user interface except a frame.
 AVWLunknown
AVWindowLayerFlags
Typedef Summary
 Typedef
 AVWindow
Creates and manages windows. Plug-ins should use AVWindows for their own dialog boxes, floating palettes, and so on, to ensure that those windows work well with the Acrobat viewer. For example, under Windows they are hidden when the Acrobat viewer is turned into an icon. Once your plug-in creates an AVWindow, it is free to use platform-dependent code to put whatever you would like in the window.
 AVWindowCoord
An x or y coordinate in the window's space. (0,0) is at the top left, and units are in pixels.
 AVWindowHandler
 AVWindowHandlerRec
 AVWindowLayer
Constants that specify the layer in which a newly-created AVWindow is to appear.
 AVWindowRect
A data structure representing a rectangle (a quadrilateral having only horizontal and vertical sides) in a window's coordinate space.
Structure Summary
 Structure
 _t_AVWindowHandler
A data structure containing callbacks that implement a window handler. The callbacks implement the window handler functions. For example, they can resize the window, draw its contents, handle mouse clicks, and handle key presses. NULL values are acceptable; default behavior is used in such cases.
Callback Summary
 Callback
 AVWindowAdjustCursorProc
A callback for AVWindowHandler. It is called periodically while the cursor is over the AVWindow (if the window is active). Use this to adjust the cursor's appearance.
 AVWindowCanPerformEditOpProc
A callback for AVWindowHandler. It is called before showing the Edit menu, to determine whether to enable the Edit menu item corresponding to the given ASAtom.
 AVWindowDestroyPlatformThingProc
A callback for AVWindowHandler. It is called when it is time to dispose of the platformThing for the window passed to AVWindowNewFromPlatformThing().
 AVWindowDidActivateProc
A callback for AVWindowHandler. It is called after the window has been activated. The window being activated will not always become the front-most window.
 AVWindowDidBecomeKeyProc
A callback for AVWindowHandler. It is called after the window becomes the key window.
 AVWindowDidCloseProc
A callback for AVWindowHandler. It is called immediately after the window has been closed, but before it has been freed. You may want to explicitly destroy the window in this routine. See also AVWindowWillCloseProc.
 AVWindowDidCollapseProc
A callback for AVWindowHandler. It is called after the window has been collapsed.
 AVWindowDidMaximizeProc
A callback for AVWindowHandler. It is called after the window has been maximized.
 AVWindowDidMoveProc
A callback for AVWindowHandler. It is called after the window has been resized.
 AVWindowDidResizeProc
A callback for AVWindowHandler. It is called after the window has been resized.
 AVWindowDrawProc
A callback for AVWindowHandler. It is called whenever the window needs to refresh some part of its interior. It should redraw the contents of the specified rectangle.
 AVWindowKeyDownProc
A callback for AVWindowHandler. It is called to handle keystrokes when this is the key window.
 AVWindowMouseDownProc
A callback for AVWindowHandler. Mouse clicks in the AVWindow are dispatched through this callback.
 AVWindowPerformEditOpProc
A callback for AVWindowHandler. It is called when the user has chosen an Edit menu item and the corresponding AVWindowCanPerformEditOpProc() returned true.
 AVWindowWillBeResizedProc
A callback for AVWindowHandler. It is called when the window is about to resize.
 AVWindowWillCloseProc
A callback for AVWindowHandler. The window is about to close.
 AVWindowWillDeactivateProc
A callback for AVWindowHandler. It is called before the window becomes deactivated or hidden.
 AVWindowWillResignKeyProc
A callback for AVWindowHandler. It is called before the window ceases to be the key window.
Method Summary
 Method
 
Makes win the key window (regardless of the setting of its wantsKey flag) if the window is visible.
 
Brings the specified window to the front.
 
Centers the window within its parent window or the desktop if it has no parent.
 
Destroys the specified window and all associated memory. It closes the window without calling the window handler's AVWindowWillCloseProc() (that is, this operation cannot be rejected).
 
ASBool AVWindowDoModal(AVWindow window)
Makes the specified window modal, so that no other window can take the keyboard focus when this window is active.
 
Redraws the invalid regions of the specified window.
 
ASBool AVWindowEndModal(AVWindow window)
Stops the specified window from being modal, so that other windows can take the keyboard focus when this window is active.
 
If the win is completely outside the desktop region (it is off screen), it is moved so that it will be within the desktop region (it is on screen). No action is taken if a draggable edge of the window is within the desktop region. The desktop region does not include the task bar (Windows) or menu bar (Mac OS).
 
Fills a rectangle structure with the left, top, right, and bottom distances between the inner window rectangle (the frame rectangle) and the outer window rectangle. These distances include borders, title bars, and so on.
 
ASBool AVWindowGetDesktopBounds(AVWindow win, const AVRect* frame, AVRect* bounds)
Gets the desktop boundary for the monitor on which the window would appear if its frame was set to the specified frame. This boundary describes in global coordinates the visible area of the desktop (that is, without the menu bar, task bar, docked toolbars, and so on).
 
Gets the window's frame, which specifies its size and location on the screen.
 
Gets the interior rectangle of the window.
 
Gets the minimum and maximum size of the window.
 
Gets a window's owner data. The owner data is private data for the use of the window's creator. For example, if a client uses its own class library, it might use the owner data field to store a pointer to the object owning the AVWindow.
 
AVPlatformWindowRef AVWindowGetPlatformThing(AVWindow win)
Returns a pointer to the platform-specific thing associated with the window. Do not confuse this with the owner data (see also AVWindowGetOwnerData).
 
Gets the title to display in the specified window's title bar.
 
ASBool AVWindowHandlePlatformEvent(AVWindow win, void* platformEvent)
Handles a platform-specific event. Use this method to dispatch a platform-specific event structure to an AVWindow. This method may raise exceptions, depending on the event.
 
Hides the specified window. Hiding a window makes it invisible; it does not minimize or icon-ize it.
 
Invalidates the specified rectangular region, for eventual redraw. This is the preferred method for refreshing a portion of an AVWindow. Use AVWindowDrawNow() to force a window to redraw its invalid regions.
 
Tests whether the specified window is the key window. The key window is the window that receives mouse clicks.
 
Tests whether a window is displayed on the screen.
 
void AVWindowMaximize(AVWindow win, ASBool maximize)
Maximizes the specified window. On Mac OS, this corresponds to calling the ZoomWindow Toolbox function.
 
AVWindow AVWindowNew(AVWindowLayer layer, AVFlagBits32 flags, AVWindowHandler handler, ASExtension owner)
Creates a new window and registers it with the Acrobat viewer.
 
Creates a new window from a platform-specific structure and registers it with the Acrobat viewer.
 
Use this method when you want win to resign its key window status. Another window might pick up key window status as a result. You must first call AVWindowSetWantsKey() with a value of false for the wantsKey parameter or your window may immediately become the key window again.
 
void AVWindowSetFrame(AVWindow win, const AVScreenRect* rect)
Sets the window's frame, which specifies its size and location on the screen.
 
void AVWindowSetMinMaxSize(AVWindow win, const AVRect* rect)
Sets the minimum and maximum size of the window.
 
void AVWindowSetOwnerData(AVWindow win, void* newData)
Sets a window's owner data. The owner data is private data for the use of the window's creator. For example, if a client uses its own class library, it might use the owner data field to store a pointer to the object owning the AVWindow.
 
void AVWindowSetTitle(AVWindow win, const ASText newTitle)
Sets the title to display in the specified window's title bar. This method cannot be used to set the title of the window in which the Acrobat viewer normally opens a PDF file; it can only be used to set the title of an AVWindow created by a client. To set the title of a window in which the Acrobat viewer opens a PDF file, you must replace AVDocOpenFromASFileWithParams() and pass the window title in tempTitle.
 
void AVWindowSetWantsKey(AVWindow win, ASBool wantsKey)
AVWIN_WANTSKEY is deprecated and ignored. Because of this, AVWindowSetWantsKey effectively does nothing.
 
Shows the specified window.
 
ASBool AVWindowUserClose(AVWindow win, ASBool quitting)
Simulates a user's click on a window's box. This calls the AVWindowWillCloseProc() of the win object's AVWindowHandler.
Defines Detail
AVWIN_AUXILIARY 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define AVWIN_AUXILIARY 0x10000000

Description

Auxiliary windows pass unhandled menu commands to the frontmost document window. For example, the Find dialog box is auxiliary since menu items such as Save and Close should still be enabled. A window that does not purport to operate on the topmost document window (for example, an "Establish Connection to Library of Congress" dialog box) would probably not be auxiliary.


File: AVExpT.h
Line: 4980
AVWIN_FORMFIT 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define AVWIN_FORMFIT 0x00400000

Description

The window sizes itself to fit its child views.


File: AVExpT.h
Line: 4995
AVWIN_HASCLOSEBOX 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define AVWIN_HASCLOSEBOX 0x40000000

Description

The window has a close box.


File: AVExpT.h
Line: 4951
AVWIN_HASDRAGBAR 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define AVWIN_HASDRAGBAR 0x02000000

Description

The window has a drag bar.


File: AVExpT.h
Line: 4966
AVWIN_HASMINIMIZEBOX 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define AVWIN_HASMINIMIZEBOX 0x04000000

Description

The window has a minimize box.


File: AVExpT.h
Line: 4961
AVWIN_HASZOOMBOX 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define AVWIN_HASZOOMBOX 0x20000000

Description

The window has a zoom box.


File: AVExpT.h
Line: 4956
AVWIN_INTERNAL_DOC 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define AVWIN_INTERNAL_DOC 0x00200000

Description

The default internal document window for the platform. It must be combined with AVWLnonfloating. This overrides all other flags.


File: AVExpT.h
Line: 5001
AVWIN_PDFICON 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define AVWIN_PDFICON 0x00200000

Description

The window should have the PDF icon associated with it


File: AVExpT.h
Line: 5011
AVWIN_RESIZEABLE 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define AVWIN_RESIZEABLE 0x80000000

Description

The window is resizeable.


File: AVExpT.h
Line: 4946
AVWIN_SMALLTITLEBAR 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define AVWIN_SMALLTITLEBAR 0x01000000

Description

The window has a small title bar.


File: AVExpT.h
Line: 4971
AVWIN_TRANSIENT 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define AVWIN_TRANSIENT 0x00800000

Description

The window hides itself when focus is lost.


File: AVExpT.h
Line: 4990
AVWIN_UNDECORATED 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define AVWIN_UNDECORATED 0x00100000

Description

The window does not have decorations such as borders, captions or edges.


File: AVExpT.h
Line: 5006
AVWIN_WANTSKEY 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define AVWIN_WANTSKEY 0x08000000

File: AVExpT.h
Line: 4985
AVWindow 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

#define AVWindow void*

File: PIPokes.h
Line: 28
AVWLfloating 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define AVWLfloating 2

Description

A floating window, such as a palette.


File: AVExpT.h
Line: 4912
AVWLhelp 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define AVWLhelp 6

Description

(Internal use only) A help window.


File: AVExpT.h
Line: 4932
AVWLmenu 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define AVWLmenu 7

Description

A window that occupies the same layer as popup menus, and has no title bar decorations.


File: AVExpT.h
Line: 4937
AVWLmodal 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define AVWLmodal 3

Description

A modal dialog box.


File: AVExpT.h
Line: 4917
AVWLnonfloating 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define AVWLnonfloating 1

Description

A regular window, such as a document window.


File: AVExpT.h
Line: 4907
AVWLpopup 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define AVWLpopup 4

Description

(New in Acrobat 5.0) A popup window without a caption, a one-pixel border and drop shadow.


File: AVExpT.h
Line: 4922
AVWLtoolbar 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define AVWLtoolbar 5

Description

(Internal use only) A toolbar window.


File: AVExpT.h
Line: 4927
AVWLtopmost 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define AVWLtopmost 8

Description

A top level window that has no user interface except a frame.


File: AVExpT.h
Line: 4942
AVWLunknown 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define AVWLunknown 0

File: AVExpT.h
Line: 4902

Typedefs Detail
AVWindow 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef struct _t_AVWindow* AVWindow;

Creates and manages windows. Plug-ins should use AVWindows for their own dialog boxes, floating palettes, and so on, to ensure that those windows work well with the Acrobat viewer. For example, under Windows they are hidden when the Acrobat viewer is turned into an icon. Once your plug-in creates an AVWindow, it is free to use platform-dependent code to put whatever you would like in the window.

See Also


File: AVExpT.h
Line: 2466
AVWindowCoord 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef AVSDKDependentInteger AVWindowCoord;

An x or y coordinate in the window's space. (0,0) is at the top left, and units are in pixels.

See Also


File: AVExpT.h
Line: 382
AVWindowHandler 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef _t_AVWindowHandler AVWindowHandler;

File: AVExpT.h
Line: 5350
AVWindowHandlerRec 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef _t_AVWindowHandler AVWindowHandlerRec;

File: AVExpT.h
Line: 5350
AVWindowLayer 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef ASInt32 AVWindowLayer;

Constants that specify the layer in which a newly-created AVWindow is to appear.

See Also


File: AVExpT.h
Line: 4899
AVWindowRect 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef AVRect AVWindowRect;

A data structure representing a rectangle (a quadrilateral having only horizontal and vertical sides) in a window's coordinate space.

See Also


File: AVExpT.h
Line: 1131


Structure Detail
_t_AVWindowHandler
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

A data structure containing callbacks that implement a window handler. The callbacks implement the window handler functions. For example, they can resize the window, draw its contents, handle mouse clicks, and handle key presses. NULL values are acceptable; default behavior is used in such cases.

See Also


File: AVExpT.h
Line: 5256

Elements
size  

The size of the data structure. It must be set to sizeof(AVWindowHandlerRec).

 
MouseDown  

Mouse clicks in the AVWindow are dispatched through this callback.

 
WillClose  

The window is about to close. It returns true if the window should close, false to abort the operation. If quitting is true, the application is in the middle of trying to quit.

 
DidClose  

Called immediately after the window has closed, but before it has been freed (if one-shot).

 
DidActivate  

Called after the window becomes the frontmost, active window.

 
DidBecomeKey  

Called after the window becomes the key window.

 
KeyDown  

Called to handle keystrokes when this is the key window.

 
WillResignKey  

Called before the window ceases to be the key window.

 
WillDeactivate  

Called before the window becomes deactivated or hidden.

 
Draw  

Called whenever the window needs to refresh some part of its interior.

 
WillBeResized  

The window is about to be resized in accordance with the given rectangle. This callback may alter the contents of newFrame to change the new frame size. Returning false aborts the operation.

 
PerformEditOp  

Called when the user has chosen an Edit menu item corresponding to the given ASAtom, assuming the corresponding CanPerformEditProc() returned true.

 
CanPerformEditOp  

Called before showing the menus to determine whether a given Edit menu item corresponding to the given ASAtom should be enabled.

 
AdjustCursor  

Called periodically while the cursor is over the AVWindow (if active). Use this to adjust the cursor's appearance.

 
DidResize  

Called after a window is resized.

 
DestroyPlatformThing  

Called during DestroyWindow() when it is time to dispose of the platformThing for the window passed into AVWindowNewFromPlatformThing().

 
DidMaximize  

Called after a window is maximized.

 
DidCollapse  

Called after a window is collapsed.

 
DidMove  

Called after a window is moved.

Callbacks Detail
AVWindowAdjustCursorProc 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void (*AVWindowAdjustCursorProc)(AVWindow win, AVWindowCoord x, AVWindowCoord y)

A callback for AVWindowHandler. It is called periodically while the cursor is over the AVWindow (if the window is active). Use this to adjust the cursor's appearance.


File: AVExpT.h
Line: 5067
AVWindowCanPerformEditOpProc 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool (*AVWindowCanPerformEditOpProc)(AVWindow win, ASAtom editOp)

A callback for AVWindowHandler. It is called before showing the Edit menu, to determine whether to enable the Edit menu item corresponding to the given ASAtom.

See Also


File: AVExpT.h
Line: 5232
AVWindowDestroyPlatformThingProc 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void (*AVWindowDestroyPlatformThingProc)(AVWindow win, void *platformThing)

A callback for AVWindowHandler. It is called when it is time to dispose of the platformThing for the window passed to AVWindowNewFromPlatformThing().

See Also


File: AVExpT.h
Line: 5243
AVWindowDidActivateProc 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void (*AVWindowDidActivateProc)(AVWindow win)

A callback for AVWindowHandler. It is called after the window has been activated. The window being activated will not always become the front-most window.

See Also


File: AVExpT.h
Line: 5129
AVWindowDidBecomeKeyProc 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void (*AVWindowDidBecomeKeyProc)(AVWindow win)

A callback for AVWindowHandler. It is called after the window becomes the key window.

See Also


File: AVExpT.h
Line: 5139
AVWindowDidCloseProc 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void (*AVWindowDidCloseProc)(AVWindow win)

A callback for AVWindowHandler. It is called immediately after the window has been closed, but before it has been freed. You may want to explicitly destroy the window in this routine. See also AVWindowWillCloseProc.

See Also


File: AVExpT.h
Line: 5120
AVWindowDidCollapseProc 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void (*AVWindowDidCollapseProc)(AVWindow win)

A callback for AVWindowHandler. It is called after the window has been collapsed.


File: AVExpT.h
Line: 5090
AVWindowDidMaximizeProc 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void (*AVWindowDidMaximizeProc)(AVWindow win)

A callback for AVWindowHandler. It is called after the window has been maximized.


File: AVExpT.h
Line: 5083
AVWindowDidMoveProc 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void (*AVWindowDidMoveProc)(AVWindow win, const AVScreenRect *newFrame)

A callback for AVWindowHandler. It is called after the window has been resized.


File: AVExpT.h
Line: 5099
AVWindowDidResizeProc 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void (*AVWindowDidResizeProc)(AVWindow win, const AVScreenRect *newFrame)

A callback for AVWindowHandler. It is called after the window has been resized.


File: AVExpT.h
Line: 5076
AVWindowDrawProc 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void (*AVWindowDrawProc)(AVWindow win, const AVWindowRect *rect)

A callback for AVWindowHandler. It is called whenever the window needs to refresh some part of its interior. It should redraw the contents of the specified rectangle.

See Also


File: AVExpT.h
Line: 5045
AVWindowKeyDownProc 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void (*AVWindowKeyDownProc)(AVWindow win, char key, void *platformEvent)

A callback for AVWindowHandler. It is called to handle keystrokes when this is the key window.

See Also


File: AVExpT.h
Line: 5150
AVWindowMouseDownProc 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void (*AVWindowMouseDownProc)(AVWindow win, AVWindowCoord x, AVWindowCoord y, void *platformEvent)

A callback for AVWindowHandler. Mouse clicks in the AVWindow are dispatched through this callback.

See Also


File: AVExpT.h
Line: 5035
AVWindowPerformEditOpProc 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void (*AVWindowPerformEditOpProc)(AVWindow win, ASAtom editOp)

A callback for AVWindowHandler. It is called when the user has chosen an Edit menu item and the corresponding AVWindowCanPerformEditOpProc() returned true.

See Also


File: AVExpT.h
Line: 5198
AVWindowWillBeResizedProc 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool (*AVWindowWillBeResizedProc)(AVWindow win, AVScreenRect *newFrame)

A callback for AVWindowHandler. It is called when the window is about to resize.

See Also


File: AVExpT.h
Line: 5057
AVWindowWillCloseProc 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool (*AVWindowWillCloseProc)(AVWindow win, ASBool quitting)

A callback for AVWindowHandler. The window is about to close.

See Also


File: AVExpT.h
Line: 5109
AVWindowWillDeactivateProc 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void (*AVWindowWillDeactivateProc)(AVWindow win)

A callback for AVWindowHandler. It is called before the window becomes deactivated or hidden.

See Also


File: AVExpT.h
Line: 5166
AVWindowWillResignKeyProc 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void (*AVWindowWillResignKeyProc)(AVWindow win)

A callback for AVWindowHandler. It is called before the window ceases to be the key window.

See Also


File: AVExpT.h
Line: 5158

Method Detail
AVWindowBecomeKey()
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AVWindowBecomeKey(AVWindow win)

Makes win the key window (regardless of the setting of its wantsKey flag) if the window is visible.

UNIX developers: This method is a no-op.

Parameters

win — 

IN/OUT The window that is to become the key window.

See Also

Since

PI_ACROVIEW_VERSION >= 0x00020000

File: AVProcs.h
Line: 3068
AVWindowBringToFront() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AVWindowBringToFront(AVWindow win)

Brings the specified window to the front.

Parameters

win — 

IN/OUT The window to bring to the front.

See Also

Notifications

Since

PI_ACROVIEW_VERSION >= 0x00020000

File: AVProcs.h
Line: 3019
AVWindowCenter() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AVWindowCenter(AVWindow win)

Centers the window within its parent window or the desktop if it has no parent.

Parameters

win — 

IN/OUT The window to center.

Since

PI_ACROVIEW_VERSION >= 0x00050000

File: AVProcs.h
Line: 5545
AVWindowDestroy() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AVWindowDestroy(AVWindow win)

Destroys the specified window and all associated memory. It closes the window without calling the window handler's AVWindowWillCloseProc() (that is, this operation cannot be rejected).

Parameters

win — 

IN/OUT The window to destroy.

See Also

Since

PI_ACROVIEW_VERSION >= 0x00020000

File: AVProcs.h
Line: 2880
AVWindowDoModal() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool AVWindowDoModal(AVWindow window)

Makes the specified window modal, so that no other window can take the keyboard focus when this window is active.

Parameters

window — 

The window to make modal.

Returns

true if successful, false otherwise.

See Also

Since

PI_ACROVIEW_VERSION >= 0x00060000

File: AVProcs.h
Line: 8824
AVWindowDrawNow() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AVWindowDrawNow(AVWindow win)

Redraws the invalid regions of the specified window.

Parameters

win — 

IN/OUT The window to draw.

See Also

Since

PI_ACROVIEW_VERSION >= 0x00020000

File: AVProcs.h
Line: 3028
AVWindowEndModal() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool AVWindowEndModal(AVWindow window)

Stops the specified window from being modal, so that other windows can take the keyboard focus when this window is active.

Parameters

window — 

The window to stop from being modal.

Returns

true if successful, false otherwise.

See Also

Since

PI_ACROVIEW_VERSION >= 0x00060000

File: AVProcs.h
Line: 8835
AVWindowEnsureInBounds() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AVWindowEnsureInBounds(AVWindow win)

If the win is completely outside the desktop region (it is off screen), it is moved so that it will be within the desktop region (it is on screen). No action is taken if a draggable edge of the window is within the desktop region. The desktop region does not include the task bar (Windows) or menu bar (Mac OS).

Parameters

win — 

The window to ensure is on screen.

See Also

Since

PI_ACROVIEW_VERSION >= 0x00050000

File: AVProcs.h
Line: 6161
AVWindowGetBorderWidths() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AVWindowGetBorderWidths(AVWindow win, AVRect* rect)

Fills a rectangle structure with the left, top, right, and bottom distances between the inner window rectangle (the frame rectangle) and the outer window rectangle. These distances include borders, title bars, and so on.

Parameters

win — 

The window whose border width is obtained.

 
rect — 

(Filled by the method) A pointer to a rectangle structure in which to return the window's border width rectangle, specified in global screen coordinates.

See Also

Since

PI_ACROVIEW_VERSION >= 0x00060000

File: AVProcs.h
Line: 9039
AVWindowGetDesktopBounds() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool AVWindowGetDesktopBounds(AVWindow win, const AVRect* frame, AVRect* bounds)

Gets the desktop boundary for the monitor on which the window would appear if its frame was set to the specified frame. This boundary describes in global coordinates the visible area of the desktop (that is, without the menu bar, task bar, docked toolbars, and so on).

Parameters

win — 

The window whose desktop bounds are obtained.

 
frame — 

A pointer to a rectangle structure for a potential window frame.

 
bounds — 

(Filled by the method) A pointer to a structure in which to return the window's desktop bounds rectangle, specified in global screen coordinates.

Returns

true if successful, false if the method cannot provide the information. In this case, the bounds are set to (0,0,0,0).

See Also

Since

PI_ACROVIEW_VERSION >= 0x00060000

File: AVProcs.h
Line: 9477
AVWindowGetFrame() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AVWindowGetFrame(AVWindow win, AVScreenRect* rect)

Gets the window's frame, which specifies its size and location on the screen.

Parameters

win — 

The window whose frame is obtained.

 
rect — 

(Filled by the method) A pointer to a rectangle specifying the window's frame rectangle, specified in global screen coordinates. On Mac OS, the frame includes only the window's content region. On Windows, the frame includes only the window's client rectangle.

See Also

Since

PI_ACROVIEW_VERSION >= 0x00020000

File: AVProcs.h
Line: 7494
AVWindowGetInterior() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AVWindowGetInterior(AVWindow win, AVWindowRect* rect)

Gets the interior rectangle of the window.

Parameters

win — 

The window whose interior is obtained.

 
rect — 

(Filled by the method) A pointer to a rectangle specifying the window's interior, specified as local window coordinates.

See Also

Since

PI_ACROVIEW_VERSION >= 0x00020000

File: AVProcs.h
Line: 7529
AVWindowGetMinMaxSize() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AVWindowGetMinMaxSize(AVWindow win, AVRect* rect)

Gets the minimum and maximum size of the window.

top and left in rect are for minimum size; bottom and right are for maximum size.

Parameters

win — 

The window whose size is obtained.

 
rect — 

(Filled by the method) A pointer to a rectangle specifying the window's size, specified in device space coordinates. If this method is not supported on a particular platform, the minimum size returned is 0, 0 and the maximum size is ASMAXInt16, ASMAXInt16.

See Also

Since

PI_ACROVIEW_VERSION >= 0x00040005

File: AVProcs.h
Line: 7562
AVWindowGetOwnerData() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void* AVWindowGetOwnerData(AVWindow win)

Gets a window's owner data. The owner data is private data for the use of the window's creator. For example, if a client uses its own class library, it might use the owner data field to store a pointer to the object owning the AVWindow.

Parameters

win — 

The window whose owner data is obtained.

Returns

A pointer to owner data for win.

See Also

Since

PI_ACROVIEW_VERSION >= 0x00020000

File: AVProcs.h
Line: 2988
AVWindowGetPlatformThing() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

AVPlatformWindowRef AVWindowGetPlatformThing(AVWindow win)

Returns a pointer to the platform-specific thing associated with the window. Do not confuse this with the owner data (see also AVWindowGetOwnerData).

AVDocWantsToDie() is broadcast after AVDocSetDead() has been called, which would warn that the AVWindow associated with that window is NULL.

Parameters

win — 

IN/OUT Platform-dependent window thing:

Operating system

Value

Windows

HWND.

Mac OS

WindowRef for Carbon-based windows, NULL for Cocoa-based windows (most windows are Cocoa as of 8.0)

UNIX

Widget.

Returns

The platform-dependent thing for the window. Returns NULL if the window is associated with an AVDoc that has been set dead by AVDocSetDead().

See Also

Since

PI_ACROVIEW_VERSION >= 0x00020000

File: AVProcs.h
Line: 2975
AVWindowGetTitle() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AVWindowGetTitle(AVWindow win, ASText title)

Gets the title to display in the specified window's title bar.

Parameters

win — 

The window whose title is obtained.

 
title — 

(Filled by the method) The window title as an ASText object.

See Also

Since

PI_ACROVIEW_VERSION >= 0x00020000

File: AVProcs.h
Line: 8268
AVWindowHandlePlatformEvent() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool AVWindowHandlePlatformEvent(AVWindow win, void* platformEvent)

Handles a platform-specific event. Use this method to dispatch a platform-specific event structure to an AVWindow. This method may raise exceptions, depending on the event.

Parameters

win — 

IN/OUT The window with the event to handle.

 
platformEvent — 

IN/OUT A pointer to a platform-specific event structure.

Returns

true if the event was handled, false otherwise.

See Also

AVAppHandleAppleEvent
AVAppHandlePlatformEvent

Since

PI_ACROVIEW_VERSION >= 0x00040000

File: AVProcs.h
Line: 3606
AVWindowHide() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AVWindowHide(AVWindow win)

Hides the specified window. Hiding a window makes it invisible; it does not minimize or icon-ize it.

On Windows, a document window can be minimized using code based on the following:

theAVWindow = AVDocGetAVWindow( theAVDoc);

theThing = (HWND) AVWindowGetPlatformThing( theAVWindow);

wasVisible = ShowWindow(theThing, SW_MINIMIZED);

Parameters

win — 

IN/OUT The window to hide.

See Also

Since

PI_ACROVIEW_VERSION >= 0x00020000

File: AVProcs.h
Line: 2933
AVWindowInvalidateRect() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AVWindowInvalidateRect(AVWindow win, const AVWindowRect* rect)

Invalidates the specified rectangular region, for eventual redraw. This is the preferred method for refreshing a portion of an AVWindow. Use AVWindowDrawNow() to force a window to redraw its invalid regions.

Parameters

win — 

The window in which to invalidate a region.

 
rect — 

A pointer to a rectangle specifying the region to invalidate.

See Also

Since

PI_ACROVIEW_VERSION >= 0x00020000

File: AVProcs.h
Line: 7545
AVWindowIsKey() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool AVWindowIsKey(AVWindow win)

Tests whether the specified window is the key window. The key window is the window that receives mouse clicks.

UNIX users: This method is a no-op.

Parameters

win — 

The window to test.

Returns

true if win is the key window, false otherwise.

See Also

Since

PI_ACROVIEW_VERSION >= 0x00020000

File: AVProcs.h
Line: 3054
AVWindowIsVisible() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool AVWindowIsVisible(AVWindow win)

Tests whether a window is displayed on the screen.

Parameters

win — 

The window whose visibility is tested.

Returns

true if the window is displayed on the screen (even if it is currently obscured by another window), false otherwise.

See Also

Since

PI_ACROVIEW_VERSION >= 0x00020000

File: AVProcs.h
Line: 2946
AVWindowMaximize() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AVWindowMaximize(AVWindow win, ASBool maximize)

Maximizes the specified window. On Mac OS, this corresponds to calling the ZoomWindow Toolbox function.

Parameters

win — 

The window to maximize.

 
maximize — 

true to maximize the window, false to return it to its non-maximized state.

Since

PI_ACROVIEW_VERSION >= 0x00020000

File: AVProcs.h
Line: 2906
AVWindowNew() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

AVWindow AVWindowNew(AVWindowLayer layer, AVFlagBits32 flags, AVWindowHandler handler, ASExtension owner)

Creates a new window and registers it with the Acrobat viewer.

Because Windows and UNIX use the platform's native window handling instead of the Acrobat viewer's AVWindowHandler mechanism (that is, the AVWindowHandler mechanism's callbacks are never called on those platforms), there is no advantage to using AVWindowNew(). Client developers on those platforms should use AVWindowNewFromPlatformThing() instead of this method.

Parameters

layer — 

The layer in which the window resides. On the Mac OS, it must be one of the AVWindowLayer constants. On Windows, all AVWindow objects are of type AVWLfloating, and layer is ignored.

 
flags — 

An OR of the values listed in AVWindow Flags.

 
handler — 

A structure containing the window handler's callback functions. Pass NULL in Windows and UNIX, because the window handler's callbacks are unused on those platforms.

 
owner — 

The gExtensionID extension registering the window.

Returns

The newly created window.

See Also

Exceptions

genErrNoMemory

Since

PI_ACROVIEW_VERSION >= 0x00020000

File: AVProcs.h
Line: 7423
AVWindowNewFromPlatformThing() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

AVWindow AVWindowNewFromPlatformThing(AVWindowLayer layer, AVFlagBits32 flags, AVWindowHandler handler, ASExtension owner, AVPlatformWindowRef platformThing)

Creates a new window from a platform-specific structure and registers it with the Acrobat viewer.

If a user creates an HWND or a WindowRef and does not register it with the viewer via AVWindowNewFromPlatformThing(), it should not be allowed to persist across event loops (that is, on Mac OS, it should be system-modal).

Windows and UNIX use the platform's native window handling instead of the Acrobat viewer's AVWindowHandler mechanism (that is, the AVWindowHandler object's callbacks are never called on those platforms). Client developers on those platforms should use AVWindowNewFromPlatformThing() instead of AVWindowNew(), since they have to create the window using platform-specific code anyway.

Parameters

layer — 

One of the AVWindowLayer constants, specifying the layer in which the window is located. For Mac OS, see AVWindowNew(). layer is ignored on Windows, because the equivalent information was specified when the platform thing was created.

 
flags — 

For Mac OS, it is an OR of the AVWindow Flags. It is the responsibility of the Mac client developer to ensure that flags matches any attributes of the platform-thing window; the Acrobat viewer cannot determine flags from the window itself. flags is ignored on Windows and UNIX, because the equivalent information was specified when the platform thing was created.

 
handler — 

A structure containing the window handler's callback functions. Pass NULL on Windows and UNIX, because the window handler's callbacks are unused on those platforms.

 
owner — 

The gExtensionID extension registering the window.

 
platformThing — 

A platform-specific object (an HWND on Windows, a WindowRef on Mac OS, and a Widget on UNIX) that will be used for this window.

Returns

The newly created window.

Exceptions

Since

PI_ACROVIEW_VERSION >= 0x00020000

File: AVProcs.h
Line: 7467
AVWindowResignKey() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AVWindowResignKey(AVWindow win)

Use this method when you want win to resign its key window status. Another window might pick up key window status as a result. You must first call AVWindowSetWantsKey() with a value of false for the wantsKey parameter or your window may immediately become the key window again.

UNIX developers: This method is a no-op.

Parameters

win — 

IN/OUT The window resigning key window status.

See Also

Since

PI_ACROVIEW_VERSION >= 0x00020000

File: AVProcs.h
Line: 3083
AVWindowSetFrame() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AVWindowSetFrame(AVWindow win, const AVScreenRect* rect)

Sets the window's frame, which specifies its size and location on the screen.

Parameters

win — 

The window whose frame is set.

 
rect — 

A pointer to a rectangle specifying the window's frame rectangle, specified in global screen coordinates. On Windows, the frame includes only the window's client rectangle. On Mac OS, the frame includes only the window's content region.

See Also

Since

PI_ACROVIEW_VERSION >= 0x00020000

File: AVProcs.h
Line: 7516
AVWindowSetMinMaxSize() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AVWindowSetMinMaxSize(AVWindow win, const AVRect* rect)

Sets the minimum and maximum size of the window.

top and left in rect are for minimum size; bottom and right are for maximum size.

Parameters

win — 

The window whose size is set.

 
rect — 

A pointer to a rectangle specifying the window's size, specified in device space coordinates.

See Also

Since

PI_ACROVIEW_VERSION >= 0x00040005

File: AVProcs.h
Line: 7576
AVWindowSetOwnerData() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AVWindowSetOwnerData(AVWindow win, void* newData)

Sets a window's owner data. The owner data is private data for the use of the window's creator. For example, if a client uses its own class library, it might use the owner data field to store a pointer to the object owning the AVWindow.

Parameters

win — 

The window whose owner data is set.

 
newData — 

A pointer to the new owner data for win.

See Also

Since

PI_ACROVIEW_VERSION >= 0x00020000

File: AVProcs.h
Line: 3001
AVWindowSetTitle() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AVWindowSetTitle(AVWindow win, const ASText newTitle)

Sets the title to display in the specified window's title bar. This method cannot be used to set the title of the window in which the Acrobat viewer normally opens a PDF file; it can only be used to set the title of an AVWindow created by a client. To set the title of a window in which the Acrobat viewer opens a PDF file, you must replace AVDocOpenFromASFileWithParams() and pass the window title in tempTitle.

Parameters

win — 

The window whose title is set.

 
newTitle — 

The title to set for win.

See Also

Exceptions

genErrNoMemory

Since

PI_ACROVIEW_VERSION >= 0x00020000

File: AVProcs.h
Line: 8285
AVWindowSetWantsKey() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AVWindowSetWantsKey(AVWindow win, ASBool wantsKey)

AVWIN_WANTSKEY is deprecated and ignored. Because of this, AVWindowSetWantsKey effectively does nothing.

Parameters

win — 

IN/OUT If true, win is willing to become the key window, false otherwise.

 
wantsKey

See Also

Since

PI_ACROVIEW_VERSION >= 0x00020000

File: AVProcs.h
Line: 3040
AVWindowShow() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AVWindowShow(AVWindow win)

Shows the specified window.

Parameters

win — 

IN/OUT The window to show.

See Also

Since

PI_ACROVIEW_VERSION >= 0x00020000

File: AVProcs.h
Line: 2915
AVWindowUserClose() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool AVWindowUserClose(AVWindow win, ASBool quitting)

Simulates a user's click on a window's box. This calls the AVWindowWillCloseProc() of the win object's AVWindowHandler.

Parameters

win — 

IN/OUT The window to close.

 
quitting — 

IN/OUT If true, assume the application is trying to quit. If false, assume the user clicked on the window's close box.

Returns

true if the window was closed, false if the window handler's AVWindowWillCloseProc() aborted the close by returning false.

See Also

Since

PI_ACROVIEW_VERSION >= 0x00020000

File: AVProcs.h
Line: 2896