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>

class OleControlSite : OleClientSite {}

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

AddRef
int AddRef()
Undocumented in source. Be warned that the author may not have intended to support it.
GetWindow
HRESULT GetWindow(HWND* phwnd)
Undocumented in source. Be warned that the author may not have intended to support it.
OnUIDeactivate
int OnUIDeactivate(int fUndoable)
Undocumented in source. Be warned that the author may not have intended to support it.
QueryInterface
HRESULT QueryInterface(REFCIID riid, void** ppvObject)
Undocumented in source. Be warned that the author may not have intended to support it.
Release
int Release()
Undocumented in source. Be warned that the author may not have intended to support it.
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.

addEventListener
void addEventListener(IUnknown iunknown, GUID* guid, int eventID, OleListener listener)
Undocumented in source. Be warned that the author may not have intended to support it.
addObjectReferences
void addObjectReferences()
Undocumented in source. Be warned that the author may not have intended to support it.
addPropertyListener
void addPropertyListener(int propertyID, OleListener listener)

Adds the listener to receive events.

createCOMInterfaces
void createCOMInterfaces()
Undocumented in source. Be warned that the author may not have intended to support it.
disposeCOMInterfaces
void disposeCOMInterfaces()
Undocumented in source. Be warned that the author may not have intended to support it.
getBackground
Color getBackground()
Undocumented in source. Be warned that the author may not have intended to support it.
getFont
Font getFont()
Undocumented in source. Be warned that the author may not have intended to support it.
getForeground
Color getForeground()
Undocumented in source. Be warned that the author may not have intended to support it.
getLicenseInfo
BSTR getLicenseInfo(GUID* clsid)
Undocumented in source. Be warned that the author may not have intended to support it.
getSiteProperty
Variant getSiteProperty(int dispId)

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

onFocusIn
void onFocusIn(Event e)
Undocumented in source. Be warned that the author may not have intended to support it.
onFocusOut
void onFocusOut(Event e)
Undocumented in source. Be warned that the author may not have intended to support it.
releaseObjectInterfaces
void releaseObjectInterfaces()
Undocumented in source. Be warned that the author may not have intended to support it.
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.

removeEventListener
void removeEventListener(IUnknown iunknown, GUID* guid, int eventID, OleListener listener)
Undocumented in source. Be warned that the author may not have intended to support it.
removePropertyListener
void removePropertyListener(int propertyID, OleListener listener)

Removes the listener.

setBackground
void setBackground(Color color)
Undocumented in source. Be warned that the author may not have intended to support it.
setFont
void setFont(Font font)
Undocumented in source. Be warned that the author may not have intended to support it.
setForeground
void setForeground(Color color)
Undocumented in source. Be warned that the author may not have intended to support it.
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.

Static functions

getDefaultEventSinkGUID
GUID* getDefaultEventSinkGUID(IUnknown unknown)
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

SWT_RESTORECARET
int SWT_RESTORECARET;
Undocumented in source.

Inherited Members

From OleClientSite

appClsid
GUID* appClsid;
Undocumented in source.
frame
OleFrame frame;
Undocumented in source.
objIUnknown
IUnknown objIUnknown;
Undocumented in source.
objIOleObject
IOleObject objIOleObject;
Undocumented in source.
objIViewObject2
IViewObject2 objIViewObject2;
Undocumented in source.
objIOleInPlaceObject
IOleInPlaceObject objIOleInPlaceObject;
Undocumented in source.
objIOleCommandTarget
IOleCommandTarget objIOleCommandTarget;
Undocumented in source.
objDocumentView
IOleDocumentView objDocumentView;
Undocumented in source.
tempStorage
IStorage tempStorage;
Undocumented in source.
STATE_NONE
anonymousenum STATE_NONE
Undocumented in source.
state
int state;
Undocumented in source.
addObjectReferences
void addObjectReferences()
Undocumented in source. Be warned that the author may not have intended to support it.
AddRef
int AddRef()
Undocumented in source. Be warned that the author may not have intended to support it.
createCOMInterfaces
void createCOMInterfaces()
Undocumented in source. Be warned that the author may not have intended to support it.
createTempStorage
IStorage createTempStorage()
Undocumented in source. Be warned that the author may not have intended to support it.
deactivateInPlaceClient
void deactivateInPlaceClient()

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

disposeCOMInterfaces
void disposeCOMInterfaces()
Undocumented in source. Be warned that the author may not have intended to support it.
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.

getAutomationObject
IDispatch getAutomationObject()
Undocumented in source. Be warned that the author may not have intended to support it.
getClassID
GUID* getClassID(String clientName)
Undocumented in source. Be warned that the author may not have intended to support it.
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.

ActivateMe
int ActivateMe(IOleDocumentView pViewToActivate)
Undocumented in source. Be warned that the author may not have intended to support it.
GetWindow
HRESULT GetWindow(HWND* phwnd)
Undocumented in source. Be warned that the author may not have intended to support it.
getRect
RECT* getRect()
Undocumented in source. Be warned that the author may not have intended to support it.
isDirty
bool isDirty()

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

isFocusControl
bool isFocusControl()
Undocumented in source. Be warned that the author may not have intended to support it.
onFocusIn
void onFocusIn(Event e)
Undocumented in source. Be warned that the author may not have intended to support it.
onFocusOut
void onFocusOut(Event e)
Undocumented in source. Be warned that the author may not have intended to support it.
QueryInterface
HRESULT QueryInterface(REFCIID riid, void** ppvObject)
Undocumented in source. Be warned that the author may not have intended to support it.
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.

Release
int Release()
Undocumented in source. Be warned that the author may not have intended to support it.
releaseObjectInterfaces
void releaseObjectInterfaces()
Undocumented in source. Be warned that the author may not have intended to support it.
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.

setBorderSpace
void setBorderSpace(RECT* newBorderwidth)
Undocumented in source. Be warned that the author may not have intended to support it.
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