OleControlSite

OleControlSite provides a site to manage an embedded ActiveX Control within a container.

<p>In addition to the behaviour provided by OleClientSite, this object provides the following: <ul> <li>events from the ActiveX control <li>notification of property changes from the ActiveX control <li>simplified access to well known properties of the ActiveX Control (e.g. font, background color) <li>expose ambient properties of the container to the ActiveX Control </ul>

<p>This object implements the OLE Interfaces IOleControlSite, IDispatch, and IPropertyNotifySink.

<p>Note that although this class is a subclass of <code>Composite</code>, it does not make sense to add <code>Control</code> children to it, or set a layout on it. </p><p> <dl> <dt><b>Styles</b> <dd>BORDER <dt><b>Events</b> <dd>Dispose, Move, Resize </dl>

@see <a href="http://www.eclipse.org/swt/snippets/#ole">OLE and ActiveX snippets</a> @see <a href="http://www.eclipse.org/swt/examples.php">SWT Examples: OLEExample, OleWebBrowser</a>

Constructors

this
this(Composite parent, int style, String progId)

Create an OleControlSite child widget using style bits to select a particular look or set of properties.

Members

Functions

addEventListener
void addEventListener(int eventID, OleListener listener)

Adds the listener to receive events.

addEventListener
void addEventListener(OleAutomation automation, int eventID, OleListener listener)

Adds the listener to receive events.

addEventListener
void addEventListener(OleAutomation automation, String eventSinkId, int eventID, OleListener listener)

Adds the listener to receive events.

addPropertyListener
void addPropertyListener(int propertyID, OleListener listener)

Adds the listener to receive events.

getSiteProperty
Variant getSiteProperty(int dispId)

Get the control site property specified by the dispIdMember, or <code>null</code> if the dispId is not recognised.

removeEventListener
void removeEventListener(int eventID, OleListener listener)

Removes the listener.

removeEventListener
void removeEventListener(OleAutomation automation, GUID* guid, int eventID, OleListener listener)

Removes the listener.

removeEventListener
void removeEventListener(OleAutomation automation, int eventID, OleListener listener)

Removes the listener.

removePropertyListener
void removePropertyListener(int propertyID, OleListener listener)

Removes the listener.

setSiteProperty
void setSiteProperty(int dispId, Variant value)

Sets the control site property specified by the dispIdMember to a new value. The value will be disposed by the control site when it is no longer required using Variant.dispose. Passing a value of null will clear the dispId value.

Inherited Members

From OleClientSite

deactivateInPlaceClient
void deactivateInPlaceClient()

Deactivates an active in-place object and discards the object's undo state.

doVerb
int doVerb(int verb)

Requests that the OLE Document or ActiveX Control perform an action; actions are almost always changes to the activation state.

exec
int exec(int cmdID, int options, Variant pvaIn, Variant pvaOut)

Asks the OLE Document or ActiveX Control to execute a command from a standard list of commands. The OLE Document or ActiveX Control must support the IOleCommandTarget interface. The OLE Document or ActiveX Control does not have to support all the commands in the standard list. To check if a command is supported, you can call queryStatus with the cmdID.

getIndent
Rectangle getIndent()

Returns the indent value that would be used to compute the clipping area of the active X object.

getProgramID
String getProgramID()

Returns the program ID of the OLE Document or ActiveX Control.

isDirty
bool isDirty()

Returns whether ole document is dirty by checking whether the content of the file representing the document is dirty.

queryStatus
int queryStatus(int cmd)

Returns the status of the specified command. The status is any bitwise OR'd combination of SWTOLE.OLECMDF_SUPPORTED, SWTOLE.OLECMDF_ENABLED, SWTOLE.OLECMDF_LATCHED, SWTOLE.OLECMDF_NINCHED. You can query the status of a command before invoking it with OleClientSite.exec. The OLE Document or ActiveX Control must support the IOleCommandTarget to make use of this method.

save
bool save(File file, bool includeOleInfo)

Saves the document to the specified file and includes OLE specific information if specified. This method must <b>only</b> be used for files that have an OLE Storage format. For example, a word file edited with Word.Document should be saved using this method because there is formating information that should be stored in the OLE specific Storage format.

setIndent
void setIndent(Rectangle newIndent)

The indent value is no longer being used by the client site.

showProperties
void showProperties(String title)

Displays a dialog with the property information for this OLE Object. The OLE Document or ActiveX Control must support the ISpecifyPropertyPages interface.

Meta