public final class OleFrame extends Composite
This object implements the OLE Interfaces IUnknown and IOleInPlaceFrame
OleFrame allows the container to do the following:
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
ACCEL_KEY_HIT |
private static short[] |
ACCENTS |
private static java.lang.String |
CHECK_FOCUS |
private static java.lang.String |
CONSUME_KEY |
private MenuItem[] |
containerMenuItems |
private OleClientSite |
currentdoc |
private MenuItem[] |
fileMenuItems |
private static java.lang.String |
HHOOK |
private static java.lang.String |
HHOOKMSG |
private static boolean |
ignoreNextKey |
private COMObject |
iOleInPlaceFrame |
private COMObject |
iUnknown |
private Listener |
listener |
private IOleInPlaceActiveObject |
objIOleInPlaceActiveObject |
private int |
refCount |
private MenuItem[] |
windowMenuItems |
Constructor and Description |
---|
OleFrame(Composite parent,
int style)
Create an OleFrame child widget using style bits
to select a particular look or set of properties.
|
Modifier and Type | Method and Description |
---|---|
(package private) int |
AddRef()
Increment the count of references to this instance
|
private int |
ContextSensitiveHelp(int fEnterMode) |
private void |
createCOMInterfaces() |
private void |
disposeCOMInterfaces() |
private int |
GetBorder(int lprectBorder) |
MenuItem[] |
getContainerMenus()
Returns the application menu items that will appear in the Container location when an OLE Document
is in-place activated.
|
(package private) OleClientSite |
getCurrentDocument() |
MenuItem[] |
getFileMenus()
Returns the application menu items that will appear in the File location when an OLE Document
is in-place activated.
|
(package private) int |
getIOleInPlaceFrame() |
private int |
getMenuItemID(int hMenu,
int index) |
(package private) static int |
getMsgProc(int code,
int wParam,
int lParam) |
private int |
GetWindow(int phwnd) |
MenuItem[] |
getWindowMenus()
Returns the application menu items that will appear in the Window location when an OLE Document
is in-place activated.
|
private static void |
initCheckFocus(Display display) |
private static void |
initMsgHook(Display display) |
private int |
InsertMenus(int hmenuShared,
int lpMenuWidths) |
(package private) void |
onActivate(Event e) |
(package private) void |
onDeactivate(Event e) |
private void |
onDispose(Event e) |
private void |
onResize(Event e) |
private int |
QueryInterface(int riid,
int ppvObject) |
(package private) int |
Release()
Decrement the count of references to this instance
|
private void |
releaseObjectInterfaces() |
private int |
RemoveMenus(int hmenuShared) |
private int |
RequestBorderSpace(int pborderwidths) |
(package private) int |
SetActiveObject(int pActiveObject,
int pszObjName) |
private int |
SetBorderSpace(int pborderwidths) |
void |
setContainerMenus(MenuItem[] containerMenus)
Specify the menu items that should appear in the Container location when an OLE Document
is in-place activated.
|
(package private) void |
setCurrentDocument(OleClientSite doc) |
void |
setFileMenus(MenuItem[] fileMenus)
Specify the menu items that should appear in the File location when an OLE Document
is in-place activated.
|
private int |
SetMenu(int hmenuShared,
int holemenu,
int hwndActiveObject) |
void |
setWindowMenus(MenuItem[] windowMenus)
Set the menu items that should appear in the Window location when an OLE Document
is in-place activated.
|
private int |
TranslateAccelerator(int lpmsg,
int wID) |
private boolean |
translateOleAccelerator(MSG msg) |
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, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, 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, 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
private COMObject iUnknown
private COMObject iOleInPlaceFrame
private IOleInPlaceActiveObject objIOleInPlaceActiveObject
private OleClientSite currentdoc
private int refCount
private MenuItem[] fileMenuItems
private MenuItem[] containerMenuItems
private MenuItem[] windowMenuItems
private Listener listener
private static java.lang.String CHECK_FOCUS
private static java.lang.String HHOOK
private static java.lang.String HHOOKMSG
private static boolean ignoreNextKey
private static final short[] ACCENTS
private static final java.lang.String CONSUME_KEY
private static final java.lang.String ACCEL_KEY_HIT
public OleFrame(Composite parent, int style)
parent
- a composite widget (cannot be null)style
- the bitwise OR'ing of widget stylesjava.lang.IllegalArgumentException
- SWTException
- private static void initCheckFocus(Display display)
private static void initMsgHook(Display display)
static int getMsgProc(int code, int wParam, int lParam)
int AddRef()
private int ContextSensitiveHelp(int fEnterMode)
private void createCOMInterfaces()
private void disposeCOMInterfaces()
private int GetBorder(int lprectBorder)
public MenuItem[] getContainerMenus()
When an OLE Document is in-place active, the Document provides its own menus but the application is given the opportunity to merge some of its menus into the menubar. The application is allowed to insert its menus in three locations: File (far left), Container(middle) and Window (far right just before Help). The OLE Document retains control of the Edit, Object and Help menu locations. Note that an application can insert more than one menu into a single location.
public MenuItem[] getFileMenus()
When an OLE Document is in-place active, the Document provides its own menus but the application is given the opportunity to merge some of its menus into the menubar. The application is allowed to insert its menus in three locations: File (far left), Container(middle) and Window (far right just before Help). The OLE Document retains control of the Edit, Object and Help menu locations. Note that an application can insert more than one menu into a single location.
int getIOleInPlaceFrame()
private int getMenuItemID(int hMenu, int index)
private int GetWindow(int phwnd)
public MenuItem[] getWindowMenus()
When an OLE Document is in-place active, the Document provides its own menus but the application is given the opportunity to merge some of its menus into the menubar. The application is allowed to insert its menus in three locations: File (far left), Container(middle) and Window (far right just before Help). The OLE Document retains control of the Edit, Object and Help menu locations. Note that an application can insert more than one menu into a single location.
private int InsertMenus(int hmenuShared, int lpMenuWidths)
void onActivate(Event e)
void onDeactivate(Event e)
private void onDispose(Event e)
private void onResize(Event e)
private int QueryInterface(int riid, int ppvObject)
int Release()
private void releaseObjectInterfaces()
private int RemoveMenus(int hmenuShared)
private int RequestBorderSpace(int pborderwidths)
int SetActiveObject(int pActiveObject, int pszObjName)
private int SetBorderSpace(int pborderwidths)
public void setContainerMenus(MenuItem[] containerMenus)
When an OLE Document is in-place active, the Document provides its own menus but the application is given the opportunity to merge some of its menus into the menubar. The application is allowed to insert its menus in three locations: File (far left), Container(middle) and Window (far right just before Help). The OLE Document retains control of the Edit, Object and Help menu locations. Note that an application can insert more than one menu into a single location.
This method must be called before in place activation of the OLE Document. After the Document is activated, the menu bar will not be modified until a subsequent activation.
containerMenus
- an array of top level MenuItems to be inserted into the Container location of
the menubarOleClientSite getCurrentDocument()
void setCurrentDocument(OleClientSite doc)
public void setFileMenus(MenuItem[] fileMenus)
When an OLE Document is in-place active, the Document provides its own menus but the application is given the opportunity to merge some of its menus into the menubar. The application is allowed to insert its menus in three locations: File (far left), Container(middle) and Window (far right just before Help). The OLE Document retains control of the Edit, Object and Help menu locations. Note that an application can insert more than one menu into a single location.
This method must be called before in place activation of the OLE Document. After the Document is activated, the menu bar will not be modified until a subsequent activation.
fileMenus
- an array of top level MenuItems to be inserted into the File location of
the menubarprivate int SetMenu(int hmenuShared, int holemenu, int hwndActiveObject)
public void setWindowMenus(MenuItem[] windowMenus)
When an OLE Document is in-place active, the Document provides its own menus but the application is given the opportunity to merge some of its menus into the menubar. The application is allowed to insert its menus in three locations: File (far left), Container(middle) and Window (far right just before Help). The OLE Document retains control of the Edit, Object and Help menu locations. Note that an application can insert more than one menu into a single location.
This method must be called before in place activation of the OLE Document. After the Document is activated, the menu bar will not be modified until a subsequent activation.
windowMenus
- an array of top level MenuItems to be inserted into the Window location of
the menubarprivate boolean translateOleAccelerator(MSG msg)
private int TranslateAccelerator(int lpmsg, int wID)