com.esri.arcgis.controls
Interface IPageLayoutControlEvents

All Superinterfaces:
EventListener, Serializable
All Known Implementing Classes:
IPageLayoutControlEventsAdapter, IPageLayoutControlEventsProxy

public interface IPageLayoutControlEvents
extends EventListener, Serializable

Provides access to events that occur with user interaction to the PageLayoutControl.

Description

This is the main events interface for the PageLayoutControl. Generally there is no need to explicitly set event handlers, as most development environments will automatically provide event handlers.

Product Availability

Available with ArcGIS Engine.


Method Summary
 void onAfterDraw(IPageLayoutControlEventsOnAfterDrawEvent theEvent)
          Fires after the PageLayoutControl draws a specified view phase.
 void onAfterScreenDraw(IPageLayoutControlEventsOnAfterScreenDrawEvent theEvent)
          Fires after the PageLayout contained by the PageLayoutControl has finished drawing.
 void onBeforeScreenDraw(IPageLayoutControlEventsOnBeforeScreenDrawEvent theEvent)
          Fires before the PageLayout contained by the PageLayoutControl starts to draw.
 void onDoubleClick(IPageLayoutControlEventsOnDoubleClickEvent theEvent)
          Fires when the user presses and releases the mouse button twice in quick succession.
 void onExtentUpdated(IPageLayoutControlEventsOnExtentUpdatedEvent theEvent)
          Fires after the extent (visible bounds) of the PageLayoutControl is changed.
 void onFocusMapChanged(IPageLayoutControlEventsOnFocusMapChangedEvent theEvent)
          Fires when the current focus map in the PageLayoutControl has been switched to a new map.
 void onFullExtentUpdated(IPageLayoutControlEventsOnFullExtentUpdatedEvent theEvent)
          Fires after the full extent (bounds) of the PageLayoutControl has changed.
 void onKeyDown(IPageLayoutControlEventsOnKeyDownEvent theEvent)
          Fires after a key is pressed on the keyboard.
 void onKeyUp(IPageLayoutControlEventsOnKeyUpEvent theEvent)
          Fires after a pressed key is released.
 void onMouseDown(IPageLayoutControlEventsOnMouseDownEvent theEvent)
          Fires when the user presses any mouse button while over the PageLayoutControl.
 void onMouseMove(IPageLayoutControlEventsOnMouseMoveEvent theEvent)
          Fires when the user moves the mouse pointer over the PageLayoutControl.
 void onMouseUp(IPageLayoutControlEventsOnMouseUpEvent theEvent)
          Fires when the user releases a mouse button while over the PageLayoutControl.
 void onOleDrop(IPageLayoutControlEventsOnOleDropEvent theEvent)
          Fires when an OLE drop action occurs on the PageLayoutControl.
 void onPageLayoutReplaced(IPageLayoutControlEventsOnPageLayoutReplacedEvent theEvent)
          Fires after the PageLayout object used by the PageLayoutControl has been replaced.
 void onPageSizeChanged(IPageLayoutControlEventsOnPageSizeChangedEvent theEvent)
          Fires when the Page associated with the PageLayout has had its size changed.
 void onViewRefreshed(IPageLayoutControlEventsOnViewRefreshedEvent theEvent)
          Fires when the view is refreshed before drawing occurs.
 

Method Detail

onMouseDown

void onMouseDown(IPageLayoutControlEventsOnMouseDownEvent theEvent)
                 throws IOException,
                        AutomationException
Fires when the user presses any mouse button while over the PageLayoutControl.

Description

The OnMouseDown event is triggered when the user presses a mouse button on the PageLayoutControl. Use the event to specify actions that will occur when a given mouse button is pressed.

button specifies which mouse button was pressed. 1 for the left mouse button, 2 for the right mouse button, and 4 for the middle mouse button.

shift specifies an integer corresponding to the state of the SHIFT (bit 0), CTRL (bit 1) and ALT (bit 2) keys. When none, some or all of these keys are pressed none, some or all the bits get set. These bits correspond to the values 1, 2, and 4, respectively. For example, if both SHIFT and ALT were pressed, ShiftState would return 5.

x is the X coordinate, in pixels, where the mouse button was pressed referenced against the origin (0, 0) of the PageLayoutControl (the top left hand corner).

y is the Y coordinate, in pixels, where the mouse button was pressed referenced against the origin (0, 0) of the PageLayoutControl (the top left hand corner).

pageX is the X coordinate, in page units, where the mouse button was pressed referenced against the origin (bottom left hand corner) of the IPageLayoutControl::Page. The values returned are in IPage::Units.

pageY is the Y coordinate, in page units, where the mouse button was pressed referenced against the origin (bottom left hand corner) of the IPageLayoutControl::Page. The values returned are in IPage::Units.

Remarks

Use the win32 SetCapture function to continue receiving mouse events (until the mouse is released) when the mouse is moved outside the control's display area. The win32 ReleaseCapture function releases the mouse.

Product Availability

Available with ArcGIS Engine.

Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onMouseUp

void onMouseUp(IPageLayoutControlEventsOnMouseUpEvent theEvent)
               throws IOException,
                      AutomationException
Fires when the user releases a mouse button while over the PageLayoutControl.

Description

The OnMouseUp event is triggered when the user releases a mouse button on the PageLayoutControl. Use the event to specify actions that will occur when a given mouse button is released.

button specifies which mouse button was pressed. 1 for the left mouse button, 2 for the right mouse button, and 4 for the middle mouse button.

shift specifies an integer corresponding to the state of the SHIFT (bit 0), CTRL (bit 1) and ALT (bit 2) keys. When none, some or all of these keys are pressed none, some or all the bits get set. These bits correspond to the values 1, 2, and 4, respectively. For example, if both SHIFT and ALT were pressed, ShiftState would return 5.

x is the X coordinate, in pixels, where the mouse button was pressed referenced against the origin (0, 0) of the PageLayoutControl (the top left hand corner).

y is the Y coordinate, in pixels, where the mouse button was pressed referenced against the origin (0, 0) of the PageLayoutControl (the top left hand corner).

pageX is the X coordinate, in page units, where the mouse button was pressed referenced against the origin (bottom left hand corner) of the IPageLayoutControl::Page. The values returned are in IPage::Units.

pageY is the Y coordinate, in page units, where the mouse button was pressed referenced against the origin (bottom left hand corner) of the IPageLayoutControl::Page. The values returned are in IPage::Units.

Remarks

Use the win32 SetCapture function to continue receiving mouse events (until the mouse is released) when the mouse is moved outside the control's display area. The win32 ReleaseCapture function releases the mouse.

Product Availability

Available with ArcGIS Engine.

Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onMouseMove

void onMouseMove(IPageLayoutControlEventsOnMouseMoveEvent theEvent)
                 throws IOException,
                        AutomationException
Fires when the user moves the mouse pointer over the PageLayoutControl.

Description

The OnMouseMove event is triggered continually as the mouse moves over the PageLayoutControl.

button specifies which mouse button was pressed. 1 for the left mouse button, 2 for the right mouse button, and 4 for the middle mouse button.

shift specifies an integer corresponding to the state of the SHIFT (bit 0), CTRL (bit 1) and ALT (bit 2) keys. When none, some or all of these keys are pressed none, some or all the bits get set. These bits correspond to the values 1, 2, and 4, respectively. For example, if both SHIFT and ALT were pressed, ShiftState would return 5.

x is the X coordinate, in pixels, where the mouse button was pressed referenced against the origin (0, 0) of the PageLayoutControl (the top left hand corner).

y is the Y coordinate, in pixels, where the mouse button was pressed referenced against the origin (0, 0) of the PageLayoutControl (the top left hand corner).

pageX is the X coordinate, in page units, where the mouse button was pressed referenced against the origin (bottom left hand corner) of the IPageLayoutControl::Page. The values returned are in IPage::Units.

pageY is the Y coordinate, in page units, where the mouse button was pressed referenced against the origin (bottom left hand corner) of the IPageLayoutControl::Page. The values returned are in IPage::Units.

Product Availability

Available with ArcGIS Engine.

Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onDoubleClick

void onDoubleClick(IPageLayoutControlEventsOnDoubleClickEvent theEvent)
                   throws IOException,
                          AutomationException
Fires when the user presses and releases the mouse button twice in quick succession.

Description

button specifies which mouse button was pressed. 1 for the left mouse button, 2 for the right mouse button, and 4 for the middle mouse button.

shift specifies an integer corresponding to the state of the SHIFT (bit 0), CTRL (bit 1) and ALT (bit 2) keys. When none, some or all of these keys are pressed none, some or all the bits get set. These bits correspond to the values 1, 2, and 4, respectively. For example, if both SHIFT and ALT were pressed, ShiftState would return 5.

x is the X coordinate, in pixels, where the mouse button was pressed referenced against the origin (0, 0) of the PageLayoutControl (the top left hand corner).

y is the Y coordinate, in pixels, where the mouse button was pressed referenced against the origin (0, 0) of the PageLayoutControl (the top left hand corner).

pageX is the X coordinate, in page units, where the mouse button was pressed referenced against the origin (bottom left hand corner) of the IPageLayoutControl::Page. The values returned are in IPage::Units.

pageY is the Y coordinate, in page units, where the mouse button was pressed referenced against the origin (bottom left hand corner) of the IPageLayoutControl::Page. The values returned are in IPage::Units.

Remarks

The OnDoubleClick event is triggered when the user releases and presses a mouse button and then presses and releases it again on the PageLayoutControl. If the double click does not occur within the system's double click time limit, the PageLayoutControl will recognise another OnMouseDown event. Otherwise the event sequence is as follows:

OnMouseDown
OnMouseUp
OnDoubleClick
OnMouseUp

Product Availability

Available with ArcGIS Engine.

Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onKeyDown

void onKeyDown(IPageLayoutControlEventsOnKeyDownEvent theEvent)
               throws IOException,
                      AutomationException
Fires after a key is pressed on the keyboard.

Description

The OnKeyDown event is triggered when the user presses a key whilst the PageLayoutControl has focus.

keyCode specifies a virtual key code value of the key pressed on the keyboard. For alpha-numeric keys this corresponds to the ASCII value, for example "A" key returns 65 which is the ASCII value for capital A. Other key codes are F1 to F12 are 112 to 123 respectively.

Shift specifies an integer corresponding to the state of the SHIFT (bit 0), CTRL (bit 1) and ALT (bit 2) keys. When none, some or all of these keys are pressed none, some or all the bits get set. These bits correspond to the values 1, 2, and 4, respectively. For example, if both SHIFT and ALT were pressed, ShiftState would return 5.

Remarks

Some development environments will filter out keystrokes. Typically the arrow keys are used to change control focus and will not fire the OnKeyDown event. To intercept these keys use the KeyIntercept property.

Product Availability

Available with ArcGIS Engine.

Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onKeyUp

void onKeyUp(IPageLayoutControlEventsOnKeyUpEvent theEvent)
             throws IOException,
                    AutomationException
Fires after a pressed key is released.

Description

The OnKeyUp event is triggered when when the user releases a key whilst the PageLayoutControl has focus.

keyCode specifies a virtual key code value of the key pressed on the keyboard. For alpha-numeric keys this corresponds to the ASCII value, for example "A" key returns 65 which is the ASCII value for capital A. Other key codes are F1 to F12 are 112 to 123 respectively.

Shift specifies an integer corresponding to the state of the SHIFT (bit 0), CTRL (bit 1) and ALT (bit 2) keys. When none, some or all of these keys are pressed none, some or all the bits get set. These bits correspond to the values 1, 2, and 4, respectively. For example, if both SHIFT and ALT were pressed, ShiftState would return 5.

Remarks

Some development environments will filter out keystrokes. Typically the arrow keys are used to change control focus and will not fire the OnKeyUp event. To intercept these keys use the KeyIntercept property.

Product Availability

Available with ArcGIS Engine.

Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onOleDrop

void onOleDrop(IPageLayoutControlEventsOnOleDropEvent theEvent)
               throws IOException,
                      AutomationException
Fires when an OLE drop action occurs on the PageLayoutControl.

Description

If the IPageLayoutControl::OleDropEnabled property is set to False the OnOleDrop event will not be triggered, and the esriDragDropNone effect will display when data is dragged over the control.

If the IPageLayoutControl::OleDropEnabled property is set to True the esriControlsDragDropEffect must be set each time the OnOleDrop event is triggered.

Use the esriControlsDropAction constant to determine whether the data is entering or leaving the control, or whether data is being dragged over or dropped onto the PageLayoutControl.

Remarks

Use the esriDropOver dropAction to display mouse coordinates while data is being dragged over the PageLayoutControl from another application, as the OnMouseMove event will not be triggered.

Product Availability

Available with ArcGIS Engine.

Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onViewRefreshed

void onViewRefreshed(IPageLayoutControlEventsOnViewRefreshedEvent theEvent)
                     throws IOException,
                            AutomationException
Fires when the view is refreshed before drawing occurs.

Description

The OnViewRefreshed event is based upon the IActiveViewEvents::ViewRefreshed event. The events is triggered when the IPageLayoutControl::PageLayout is refreshed before the OnAfterDraw events.

Product Availability

Available with ArcGIS Engine.

Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onAfterDraw

void onAfterDraw(IPageLayoutControlEventsOnAfterDrawEvent theEvent)
                 throws IOException,
                        AutomationException
Fires after the PageLayoutControl draws a specified view phase.

Description

The OnAfterDraw event is fired after a specified phase has been drawn and is based upon the IActiveViewEvents::AfterDraw event. You must query interface for the IDisplay interface and base the viewDrawPhase on the esriViewDrawPhase constants.

Remarks

In some circumstances there maybe a need to execute some code after each individual element in a PageLayout has drawn. To do this you need to set the IViewManager::VerboseEvents property to true and use the IActiveViewEvents::AfterItemDraw event.

Product Availability

Available with ArcGIS Engine.

Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onExtentUpdated

void onExtentUpdated(IPageLayoutControlEventsOnExtentUpdatedEvent theEvent)
                     throws IOException,
                            AutomationException
Fires after the extent (visible bounds) of the PageLayoutControl is changed.

Description

OnExtentUpdated is triggered whenever the IPageLayoutControl::Extent property is changed. Setting the extent explicitly, zooming, panning or using the IPageLayoutControl::CenterAt method will change the IPageLayoutControl::Extent.

Product Availability

Available with ArcGIS Engine.

Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onFullExtentUpdated

void onFullExtentUpdated(IPageLayoutControlEventsOnFullExtentUpdatedEvent theEvent)
                         throws IOException,
                                AutomationException
Fires after the full extent (bounds) of the PageLayoutControl has changed.

Description

OnFullExtentUpdated is triggered whenever the IPageLayoutControl::FullExtent is set. For example, by changing the paper size.

Product Availability

Available with ArcGIS Engine.

Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onFocusMapChanged

void onFocusMapChanged(IPageLayoutControlEventsOnFocusMapChangedEvent theEvent)
                       throws IOException,
                              AutomationException
Fires when the current focus map in the PageLayoutControl has been switched to a new map.

Description

The OnFocusMapChanged event is based upon the IActiveViewEvents::FocusMapChanged event. The event is fired whenever a new map is made active. If a Map Document has been loaded into the PageLayoutControl that contains multiple map frames, the event will be triggered when the IActiveView::FocusMap property is changed.

Product Availability

Available with ArcGIS Engine.

Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onPageSizeChanged

void onPageSizeChanged(IPageLayoutControlEventsOnPageSizeChangedEvent theEvent)
                       throws IOException,
                              AutomationException
Fires when the Page associated with the PageLayout has had its size changed.

Description

This event is a shortcut to the IPageEvents::PageSizeChanged event and is triggered whenever the page size of the IPageLayoutControl::Page changes.

Product Availability

Available with ArcGIS Engine.

Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onPageLayoutReplaced

void onPageLayoutReplaced(IPageLayoutControlEventsOnPageLayoutReplacedEvent theEvent)
                          throws IOException,
                                 AutomationException
Fires after the PageLayout object used by the PageLayoutControl has been replaced.

Description

The OnPageLayoutReplaced event is triggered whenever the IPageLayoutControl::PageLayout is replaced by another PageLayout, such as when the IPageLayoutControl::LoadMxFile method is used or when the PageLayout property is explicitly replaced. Use this event to keep in synch with the current IPageLayoutControl::PageLayout.

Product Availability

Available with ArcGIS Engine.

Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onBeforeScreenDraw

void onBeforeScreenDraw(IPageLayoutControlEventsOnBeforeScreenDrawEvent theEvent)
                        throws IOException,
                               AutomationException
Fires before the PageLayout contained by the PageLayoutControl starts to draw.

Description

OnBeforeScreenDraw is triggered before the IDisplayEvents::DisplayStarted event is called on the PageLayout's screen display. The hdc represents the device context on the screen display.

Product Availability

Available with ArcGIS Engine.

Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onAfterScreenDraw

void onAfterScreenDraw(IPageLayoutControlEventsOnAfterScreenDrawEvent theEvent)
                       throws IOException,
                              AutomationException
Fires after the PageLayout contained by the PageLayoutControl has finished drawing.

Description

OnAfterScreenDraw is triggered after the IDisplayEvents::DisplayFinished event is called on the PageLayout's screen display. The hdc represents the device context on the screen display.

Product Availability

Available with ArcGIS Engine.

Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.