public class OleClientSite extends Composite
The OleClientSite provides the following capabilities:
This object implements the OLE Interfaces IUnknown, IOleClientSite, IAdviseSink, IOleInPlaceSite
Note that although this class is a subclass of Composite
,
it does not make sense to add Control
children to it,
or set a layout on it.
Modifier and Type | Field and Description |
---|---|
protected org.eclipse.swt.internal.ole.win32.GUID |
appClsid |
protected OleFrame |
frame |
protected org.eclipse.swt.internal.ole.win32.IOleDocumentView |
objDocumentView |
protected org.eclipse.swt.internal.ole.win32.IOleCommandTarget |
objIOleCommandTarget |
protected org.eclipse.swt.internal.ole.win32.IOleInPlaceObject |
objIOleInPlaceObject |
protected org.eclipse.swt.internal.ole.win32.IOleObject |
objIOleObject |
protected org.eclipse.swt.internal.ole.win32.IUnknown |
objIUnknown |
protected org.eclipse.swt.internal.ole.win32.IViewObject2 |
objIViewObject2 |
protected org.eclipse.swt.internal.ole.win32.IStorage |
tempStorage |
Modifier | Constructor and Description |
---|---|
protected |
OleClientSite(Composite parent,
int style) |
|
OleClientSite(Composite parent,
int style,
File file)
Create an OleClientSite child widget using the OLE Document type associated with the
specified file.
|
|
OleClientSite(Composite parent,
int style,
String progId)
Create an OleClientSite child widget to edit a blank document using the specified OLE Document
application.
|
|
OleClientSite(Composite parent,
int style,
String progId,
File file)
Create an OleClientSite child widget to edit the specified file using the specified OLE Document
application.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addObjectReferences() |
protected int |
AddRef() |
protected void |
createCOMInterfaces() |
protected org.eclipse.swt.internal.ole.win32.IStorage |
createTempStorage() |
void |
deactivateInPlaceClient()
Deactivates an active in-place object and discards the object's undo state.
|
protected void |
disposeCOMInterfaces() |
int |
doVerb(int verb)
Requests that the OLE Document or ActiveX Control perform an action; actions are almost always
changes to the activation state.
|
int |
exec(int cmdID,
int options,
Variant in,
Variant out)
Asks the OLE Document or ActiveX Control to execute a command from a standard
list of commands.
|
protected org.eclipse.swt.internal.ole.win32.GUID |
getClassID(String clientName) |
Rectangle |
getIndent()
Returns the indent value that would be used to compute the clipping area
of the active X object.
|
String |
getProgramID()
Returns the program ID of the OLE Document or ActiveX Control.
|
protected int |
GetWindow(long phwnd) |
boolean |
isDirty()
Returns whether ole document is dirty by checking whether the content
of the file representing the document is dirty.
|
boolean |
isFocusControl()
Returns
true if the receiver has the user-interface
focus, and false otherwise. |
protected int |
QueryInterface(long riid,
long ppvObject) |
int |
queryStatus(int cmd)
Returns the status of the specified command.
|
protected int |
Release() |
protected void |
releaseObjectInterfaces() |
boolean |
save(File file,
boolean includeOleInfo)
Saves the document to the specified file and includes OLE specific information if specified.
|
void |
setIndent(Rectangle newIndent)
The indent value is no longer being used by the client site.
|
void |
showProperties(String title)
Displays a dialog with the property information for this OLE Object.
|
changed, checkSubclass, computeSize, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar
addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
protected org.eclipse.swt.internal.ole.win32.GUID appClsid
protected OleFrame frame
protected org.eclipse.swt.internal.ole.win32.IUnknown objIUnknown
protected org.eclipse.swt.internal.ole.win32.IOleObject objIOleObject
protected org.eclipse.swt.internal.ole.win32.IViewObject2 objIViewObject2
protected org.eclipse.swt.internal.ole.win32.IOleInPlaceObject objIOleInPlaceObject
protected org.eclipse.swt.internal.ole.win32.IOleCommandTarget objIOleCommandTarget
protected org.eclipse.swt.internal.ole.win32.IOleDocumentView objDocumentView
protected org.eclipse.swt.internal.ole.win32.IStorage tempStorage
protected OleClientSite(Composite parent, int style)
public OleClientSite(Composite parent, int style, File file)
parent
- a composite widget; must be an OleFramestyle
- the bitwise OR'ing of widget stylesfile
- the file that is to be opened in this OLE DocumentIllegalArgumentException
- SWTException
- public OleClientSite(Composite parent, int style, String progId)
parent
- a composite widget; must be an OleFramestyle
- the bitwise OR'ing of widget stylesprogId
- the unique program identifier of an OLE Document application;
the value of the ProgID key or the value of the VersionIndependentProgID key specified
in the registry for the desired OLE Document (for example, the VersionIndependentProgID
for Word is Word.Document)IllegalArgumentException
- SWTException
- public OleClientSite(Composite parent, int style, String progId, File file)
IMPORTANT: This method is not part of the public
API for OleClientSite
. It is marked public only so that it
can be shared within the packages provided by SWT. It is not
available on all platforms, and should never be called from
application code.
parent
- a composite widget; must be an OleFramestyle
- the bitwise OR'ing of widget stylesprogId
- the unique program identifier of am OLE Document application;
the value of the ProgID key or the value of the VersionIndependentProgID key specified
in the registry for the desired OLE Document (for example, the VersionIndependentProgID
for Word is Word.Document)file
- the file that is to be opened in this OLE DocumentIllegalArgumentException
- SWTException
- protected void addObjectReferences()
protected int AddRef()
protected void createCOMInterfaces()
protected org.eclipse.swt.internal.ole.win32.IStorage createTempStorage()
public void deactivateInPlaceClient()
protected void disposeCOMInterfaces()
public int doVerb(int verb)
verb
- the operation that is requested. This is one of the OLE.OLEIVERB_ valuespublic int exec(int cmdID, int options, Variant in, Variant out)
cmdID
- the ID of a command; these are the OLE.OLECMDID_ values - a small set of common
commandsoptions
- the optional flags; these are the OLE.OLECMDEXECOPT_ valuesin
- the argument for the commandout
- the return value of the commandprotected org.eclipse.swt.internal.ole.win32.GUID getClassID(String clientName)
public Rectangle getIndent()
public String getProgramID()
protected int GetWindow(long phwnd)
public boolean isDirty()
true
if the document has been modified,
false
otherwise.public boolean isFocusControl()
Control
true
if the receiver has the user-interface
focus, and false
otherwise.isFocusControl
in class Control
protected int QueryInterface(long riid, long ppvObject)
public int queryStatus(int cmd)
cmd
- the ID of a command; these are the OLE.OLECMDID_ values - a small set of common
commandsprotected int Release()
protected void releaseObjectInterfaces()
public boolean save(File file, boolean includeOleInfo)
file
- the file to which the changes are to be savedincludeOleInfo
- the flag to indicate whether OLE specific information should be saved.public void setIndent(Rectangle newIndent)
newIndent
- the rectangle representing the indent amountpublic void showProperties(String title)
title
- the name that will appear in the titlebar of the dialog
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.