9#if !defined(OCF_OLEWINDO_H)
13#if defined(BI_HAS_PRAGMA_ONCE)
167 void EvMDIActivate(HWND hWndActivated, HWND hWndDeactivated);
Class representing an embedded control within a document.
OC Document class, holds parts & is a owner of views.
Used to obtain the item name for building monikers.
Link Viewer object for a server document.
OC part class represents an embeded or linked part in a document.
Used to obtain the size of the rectangle that encloses the selection.
Remote Viewer object for a server document.
Use when doing parts save and load.
The TOcView partner is a container (viewer) of a given (server/client) document.
TOleClientDC(TOleWindow &win, bool scale=true)
Constructs a TOleClientDC object .
The generic OLE2 window. Use as a client of a frame window.
void EvSize(owl::uint sizeType, const owl::TSize &size)
Passes the event to TWindow::EvSize for normal processing and forwards the event to TOcView::EvResize...
bool EvOcViewLoadPart(TOcSaveLoad &ocLoad)
Requests that an embedded object load itself.
virtual bool EvOcAmbientSetBackColor(long rgb)
Handles the EV_OC_AMBIENT_SETBACKCOLOR message, which is sent by an OCX control.
bool EvOcViewSetLink(TOcLinkView &view)
Responds to an OC_VIEWSETLINK message TOcLinkView sends when the server document provides a link to a...
bool EvOcViewBorderSpaceReq(owl::TRect *rect)
Requests that the server create space for a tool bar in the view of an embedded object.
void SetupWindow() override
Establishes a connection between the TOcView object and the view's HWND so the view can send notifica...
virtual bool EvOcCtrlKeyDown(TCtrlKeyEvent *pev)
Handles the EV_OC_CTRLKEYDOWN message, which is sent by an OCX control.
bool HasActivePart()
Returns true if the container's view holds an in-place active embedded object.
virtual void InvalidatePart(TOcInvalidate invalid)
Invalidates the area where the embedded object exists.
TOcDocument * OcDoc
Holds the ObjectComponents document associated with this TOleWindow.
virtual bool EvOcAmbientSetSupportsMnemonics(bool support)
Handles the EV_OC_AMBIENT_SETSUPPORTSMNEMONICS message, which is sent by an OCX control.
void EvMDIActivate(HWND hWndActivated, HWND hWndDeactivated)
Responds to a message forwarded from the MDI child window (if one exists) and lets the TOcView class ...
bool EvOcViewGetItemName(TOcItemName &item)
Handles the EV_OC_VIEWGETITEMNAME. Returns false.
TOcView * GetOcView()
Points to the ObjectComponents container view associated with this window.
virtual bool EvOcAmbientSetTextAlign(short align)
Handles the EV_OC_AMBIENT_SETTEXTALIGN message, which is sent by an OCX control.
void CeFileClose(owl::TCommandEnabler &ce)
Enables the FileClose command, which lets the user exit from the window view.
void CeEditObject(owl::TCommandEnabler &ce)
Enables a command with an ID of CM_EDITOBJECT, which lets the user edit the embedded object.
void CmEditConvert()
Responds to a command with an ID of CM_EDITCONVERT by converting an object from one type to another.
virtual bool EvOcCtrlMouseUp(TCtrlMouseEvent *pev)
Handles the EV_OC_CTRLMOUSEUP message, which is sent by an OCX control.
void CmEditDelete()
Responds to a command with an ID of CM_EDITDELETE by deleting the selected text.
void EvOcViewSetTitle(LPCTSTR title)
Sets the window's caption to title.
void CeEditDelete(owl::TCommandEnabler &ce)
Enables a command with an ID of CM_EDITDELETE, which lets the user delete the selected object from th...
virtual bool EvOcAmbientGetMessageReflect(bool *msgReflect)
Handles the EV_OC_AMBIENT_GETMESSAGEREFLECT message, which is sent by an OCX control.
virtual bool EvOcAmbientGetUserMode(bool *mode)
Handles the EV_OC_AMBIENT_GETUSERMODE message, which is sent by an OCX control.
virtual bool EvOcCtrlKeyUp(TCtrlKeyEvent *pev)
Handles the EV_OC_CTRLKEYUP message, which is sent by an OCX control.
bool EvOcViewGetPalette(LOGPALETTE **palette)
Requests the color palette to draw the object.
void EvCommandEnable(owl::TCommandEnabler &) override
Overrides the usual EvCommandEnable message in order to enable the OLE verbs from CM_EDITFIRSTVERB to...
owl::TPoint DragPt
Indicates the point (in logical units) where the mouse is over the dragged object.
virtual void SetSelection(TOcPart *part)
Selects the embedded object indicated in the part parameter.
bool EvOcViewPartActivate(TOcPart &ocPart)
Notifies ObjectWindows container applications that an embedded object is active.
void CmEditPasteLink()
Responds to a command with an ID of CM_EDITPASTELINK by creating a link between the current document ...
TOcPart * InsertObject(TOcInitInfo &initInfo, owl::TRect *pos=0)
bool EvOcViewShowTools(TOcToolBarInfo &tbi)
Asks the server to provide its tool bars for display in the container's window.
bool EvOcViewScroll(TOcScrollDir scrollDir)
Asks the container to scroll the view window and updates any internal state as needed.
bool EvOcViewSavePart(TOcSaveLoad &ocSave)
Asks the server to write an embedded object's data (the part as represented by the ocSave parameter) ...
bool EvOcViewSetSiteRect(owl::TRect *rect)
Converts the rect to logical units.
void EvVScroll(owl::uint scrollCode, owl::uint thumbPos, HWND hWndCtl)
In response to a WM_VSCROLL message, EvVScroll calls TWindow::EvVScroll and invalidates the window.
owl::TPoint DragStart
Holds the point where the dragging of the embedded object began.
void CeEditCut(owl::TCommandEnabler &ce)
Enables a command with an ID of CM_EDITCUT, which lets a user copy and delete the selected object fro...
virtual bool EvOcAmbientGetForeColor(long *rgb)
Handles the EV_OC_AMBIENT_GETFORECOLOR message, which is sent by an OCX control.
virtual void SetupDC(owl::TDC &dc, bool scale=true)
Determines the viewport's origin and extent (the logical coordinates and the size of the device conte...
owl::TResult EvOcEvent(owl::TParam1 param1, owl::TParam2 param2)
Responds to a WM_OCEVENT message and subdispatches the message based on wParam.
DECLARE_RESPONSE_TABLE(TOleWindow)
TOcControl * GetOcControlOfOCX(CLSID ocxIID, owl::uint id=0)
virtual bool ShowCursor(HWND wnd, owl::uint hitTest, owl::uint mouseMsg)
Handles the WM_NCHITTEST message, setting the cursor according to its position on the screen.
virtual bool EvOcCtrlPropertyRequestEdit(TCtrlPropertyEvent *pev)
Handles the EV_OC_PROPERTYREQUESTEDIT message, which is sent by an OCX control.
void CmEditPaste()
Responds to a command with an ID of CM_EDITPASTE by pasting an object from the clipboard into the doc...
virtual bool EvOcCtrlErrorEvent(TCtrlErrorEvent *pev)
Handles the EV_OC_CTRLERROREVENT message, which is sent by an OCX control.
int MinWidth
The minimum width of the part.
virtual bool EvOcAmbientGetSupportsMnemonics(bool *support)
Handles the EV_OC_AMBIENT_GETSUPPORTSMNEMONICS message, which is sent by an OCX control.
bool IsOpenEditing() const
Checks whether the window is in Open-Edit mode.
virtual bool EvOcAmbientGetDisplayAsDefault(bool *disp)
Handles the EV_OC_AMBIENT_GETDISPLAYASDEFAULT message, which is sent by an OCX control.
bool EvOcViewGetScale(TOcScaleFactor &scaleFactor)
Responds to an OC_VIEWGETSCALE message and gets the scaling for the server object,...
void EvPaint()
Sets up the dc for proper scaling and scrolling and then calls the derived class's Paint method to pa...
virtual bool EvOcAmbientSetScaleUnits(owl::TString *units)
Handles the EV_OC_AMBIENT_SETSCALEUNITS message, which is sent by an OCX control.
void CmEditCopy()
Responds to a command with an ID of CM_EDITCOPY by copying the selected text to the clipboard.
virtual bool EvOcAmbientGetDisplayName(owl::TString **name)
Handles the EV_OC_AMBIENT_GETDISPLAYNAME message, which is sent by an OCX control.
LPCTSTR EvOcViewTitle()
Asks the container for the caption in its frame window.
void CmEditLinks()
Responds to a command with an ID of CM_EDITLINKS by updating the user-selected list of linked items i...
virtual bool EvOcAmbientGetScaleUnits(owl::TString **units)
Handles the EV_OC_AMBIENT_GETSCALEUNITS message, which is sent by an OCX control.
bool EvSetCursor(HWND hWndCursor, owl::uint hitTest, owl::uint mouseMsg)
Performs hit testing to tell where the cursor is located within the window and what object the cursor...
virtual bool EvOcViewTransformCoords(owl::uint verb)
virtual bool EvOcAmbientGetBackColor(long *rgb)
Handles the EV_OC_AMBIENT_GETBACKCOLOR message, which is sent by an OCX control.
virtual bool EvOcAmbientGetLocaleID(long *locale)
Handles the EV_OC_AMBIENT_GETLOCALEID message, which is sent by an OCX control.
owl::TPopupMenu * CreateVerbPopup(const TOcVerb &ocVerb)
Creates and enables a pop-up menu option (ocVerb) on the Edit menu.
virtual bool EvOcCtrlClick(TCtrlEvent *pev)
Handles the EV_OC_CTRLCLICK message, which is sent by an OCX control.
void EvLButtonDblClk(owl::uint modKeys, const owl::TPoint &point)
Responds to a mouse button double click message.
TOleWindow(owl::TWindow *parent=0, owl::TModule *module=0)
Constructs a TOleWindow object associated with the specified parent window and module instance.
virtual bool EvOcViewPartInvalid(TOcPartChangeInfo &changeInfo)
Informs an active container that one of its embedded objects needs to be redrawn.
void CmEditPasteSpecial()
Responds to a command with an ID of CM_EDITPASTESPECIAL by letting the user select an object from a l...
virtual bool EvOcCtrlDblClick(TCtrlEvent *pev)
Handles the EV_OC_CTRLDBLCLICK message, which is sent by an OCX control.
virtual bool OleShutDown()
Shuts down the associated ObjectComponents partners, if possible.
virtual bool EvOcAmbientSetLocaleID(long locale)
Handles the EV_OC_AMBIENT_SETLOCALEID message, which is sent by an OCX control.
bool Remote
Returns true if the window represents an embedded server. Returns false otherwise.
DECLARE_STREAMABLE_OCF(TOleWindow, 1)
void CeEditPasteLink(owl::TCommandEnabler &ce)
Enables a PasteLink command with an ID of CM_EDITPASTELINK, which lets the user link to the embedded ...
virtual LPCTSTR GetFileName()
On linking must be implemented and return the file name.
virtual bool Select(owl::uint modKeys, owl::TPoint &point)
Selects the embedded object at the specified point (measured in logical units).
virtual bool EvOcAmbientSetUserMode(bool mode)
Handles the EV_OC_AMBIENT_SETUSERMODE message, which is sent by an OCX control.
bool EvOcViewBorderSpaceSet(owl::TRect *rect)
Requests that the server's tool bar be placed in the container's view of an embedded object.
void CeEditPasteSpecial(owl::TCommandEnabler &ce)
Enables the PasteSpecial command, which lets the user select a clipboard format to be pasted or paste...
void CeEditInsertObject(owl::TCommandEnabler &ce)
Enables a command with an ID of CM_EDITINSERTOBJECT if the OcApp and OcView objects exist.
owl::TRect DragRect
Holds the rectangle being dragged.
virtual bool EvOcAmbientSetShowHatching(bool show)
Handles the EV_OC_AMBIENT_SETSETSHOWHATCHING message, which is sent by an OCX control.
owl::TUIHandle::TWhere DragHit
Indicates the position in the embedded object where the user points and clicks the mouse.
virtual bool PaintLink(owl::TDC &dc, bool erase, owl::TRect &rect, owl::TString &moniker)
Repaints part of an object on the given device context.
virtual bool EvOcAmbientGetTextAlign(short *align)
Handles the EV_OC_AMBIENT_GETTEXTALIGN message, which is sent by an OCX control.
owl::TRect Pos
Holds the current area in the window where the object is embedded.
bool SelectEmbedded()
Selects the embedded object and returns true to indicate that the object has been selected.
bool EvOcViewDrag(TOcDragDrop &ddInfo)
Handles an OC_VIEWDRAG message asking the container to provide visual feedback while the user is drag...
void EvDoVerb(owl::uint whichVerb)
Executes an OLE-related menu option from the Edit menu (for example, Edit, Copy, or Play) that is ass...
TOcPart * DragPart
Points to the embedded object (the part) being dragged.
int MinHeight
The minimum height of the part.
bool EvOcPartInvalid(TOcPart &)
Handles a WM_OCEVENT message concerning the embedded or linked object in the document and invalidates...
owl::tstring ContainerName
Holds the name of the container.
void EvLButtonDown(owl::uint modKeys, const owl::TPoint &point)
Responds to a left button down message by beginning a mouse drag transaction at the given point.
virtual bool EvOcCtrlMouseMove(TCtrlMouseEvent *pev)
Handles the EV_OC_CTRLMOUSEMOVE message, which is sent by an OCX control.
virtual bool EvOcAmbientSetShowGrabHandles(bool show)
Handles the EV_OC_AMBIENT_SETSHOWGRABHANDLES message, which is sent by an OCX control.
bool EvOcViewBreakLink(TOcLinkView &view)
EvOcViewBreakLink responds to an OC_VIEWBREAKLINK message that TOcLinkView sends when the server docu...
void EvDropFiles(owl::TDropInfo dropInfo)
This is a response method for an incoming EV_WM_DROPFILES message.
virtual bool EvOcAmbientGetShowGrabHandles(bool *show)
Handles the EV_OC_AMBIENT_GETSHOWGRABHANDLES message, which is sent by an OCX control.
TOcControl * InsertControl(TOcInitInfo &initInfo, owl::TRect *pos=0, int id=0)
void Init()
Initializes the TOleWindow object with the appropriate window style and initializes the necessary dat...
TOcApp * GetOcApp()
Returns the ObjectComponents application associated with this window.
virtual bool EvOcAmbientSetUIDead(bool dead)
Handles the EV_OC_AMBIENT_SETUIDEAD message, which is sent by an OCX control.
bool EvOcViewDoVerb(owl::uint verb)
Handles the EV_OC_VIEWDOVERB message.
virtual void GetInsertPosition(owl::TRect &rect)
Gets the position (rect) where the embedded object is inserted.
virtual void GetLogPerUnit(owl::TSize &logPerUnit)
Gets the logical units (typically pixels) per inch for a document so that the document's embedded obj...
bool InClient(owl::TDC &dc, owl::TPoint &point)
Returns true if point is inside the client area of the window. Returns false otherwise.
void EvLButtonUp(owl::uint modKeys, const owl::TPoint &point)
Responds to a left button up message by ending a mouse drag action.
bool EvOcViewInsMenus(TOcMenuDescr &sharedMenu)
Requests that the menus in a composite menu (a menu composed of both the server's and the container's...
virtual bool EvOcAmbientSetForeColor(long rgb)
Handles the EV_OC_AMBIENT_SETFORECOLOR message, which is sent by an OCX control.
virtual bool EvOcAmbientSetDisplayName(owl::TString *name)
Handles the EV_OC_AMBIENT_SETDISPLAYNAME message, which is sent by an OCX control.
void CeEditConvert(owl::TCommandEnabler &ce)
Enables a command with an ID of CM_EDITCONVERT, which lets the user convert the selected object from ...
owl::uint EvMouseActivate(HWND topParent, owl::uint hitCode, owl::uint msg)
Forwards the WM_MOUSEACTIVATE message to the top parent of the TOleWindow object.
virtual bool EvOcCtrlPropertyChange(TCtrlPropertyEvent *pev)
Handles the EV_OC_CTRLPROPERTYCHANGE message, which is sent by an OCX control.
bool EvOcViewPasteObject(TOcInitInfo &init)
Pastes an OLE object into the document pointed to by the TOleWindow::OcDoc data member.
owl::TDC * DragDC
Points to the device context used while an object is being dragged.
void EvRButtonDown(owl::uint modKeys, const owl::TPoint &point)
Responds to a right button down message.
TOcScaleFactor Scale
Holds the current scaling factor. The server uses this information to determine how to scale the docu...
void CeEditShowObjects(owl::TCommandEnabler &ce)
Checks or unchecks the Edit|Show Objects menu command according to the value of the ShowObjects data ...
bool EvOcViewClose()
Asks the server to close a currently open document and its associated view.
virtual bool EvOcAmbientGetFont(IDispatch **font)
Handles the EV_OC_AMBIENT_GETFONT message, which is sent by an OCX control.
virtual bool EvOcAmbientGetShowHatching(bool *show)
Handles the EV_OC_AMBIENT_GETSHOWHATCHING message, which is sent by an OCX control.
void EvMenuSelect(owl::uint menuItemId, owl::uint flags, HMENU hMenu)
Handles WM_MENUSELECT to provide hint text in the container's status bar, based on the menu item id.
void CeEditPaste(owl::TCommandEnabler &ce)
Enables a command with an ID of CM_EDITPASTE, which lets the user paste the embedded object from the ...
virtual bool EvOcAmbientSetDisplayAsDefault(bool disp)
Handles the EV_OC_AMBIENT_SETDISPLAYASDEFAULT message, which is sent by an OCX control.
bool EvOcViewPartSize(TOcPartSize &size)
The server asks itself the size of its current rectangle and lets the container know about the size o...
auto CanClose() -> bool override
Intercept CanClose() to interpose OpenEdit semantics.
virtual bool EvOcAmbientSetMessageReflect(bool msgReflect)
Handles the EV_OC_AMBIENT_SETMESSAGEREFLECT message, which is sent by an OCX control.
bool EvOcViewOpenDoc(LPCTSTR path)
Asks the container to open an existing document, which will be used for linking from the embedding si...
void CleanupWindow() override
Performs normal window cleanup and informs the TOcView object that the window is closed.
virtual bool EvOcCtrlCustomEvent(TCtrlCustomEvent *pev)
Handles the EV_OC_CTRLCUSTOMEVENT message, which is sent by an OCX control.
void CeEditLinks(owl::TCommandEnabler &ce)
Enables a command with an ID of CM_EDITLINKS, which lets the user manually update the list of linked ...
void CmEditCut()
Responds to a command with an ID of CM_EDITCUT by copying the selected text to the clipboard before c...
TOcRemView * GetOcRemView()
Returns the server's view associated with this window.
void CmEditInsertControl()
Responds to a command with an ID of CM_EDITINSERTCONTROL by creating, initializing,...
virtual bool PaintSelection(owl::TDC &dc, bool erase, owl::TRect &rect, void *userData=0)
Repaints the selected portion of a document on the given device context.
TOcApp * OcApp
Holds the ObjectComponents application associated with this TOleWindow.
bool ShowObjects
Is true if the embedded object's frame (the gray or shaded brushes around the object) is displayed.
auto EvCommand(owl::uint id, HWND hWndCtl, owl::uint notifyCode) -> owl::TResult override
Overrides the usual EvCommand message to handle the OLE verbs from CM_EDITFIRSTVERB to CM_EDITLASTVER...
void CeEditInsertControl(owl::TCommandEnabler &ce)
Enables a command with an ID of CM_EDITINSERTCONTROL if the OcApp and OcView objects exist.
void EvMouseMove(owl::uint modKeys, const owl::TPoint &point)
Responds to a mouse move message with the appropriate transaction.
bool EvOcViewDrop(TOcDragDrop &ddInfo)
Requests a given object be dropped at a specified place on the container's window.
bool IsRemote() const
Returns true if the window represents an embedded server.
bool EvOcViewPaint(TOcViewPaint &vp)
Asks the server to paint an object at a given position on a specified device context.
virtual bool EvOcCtrlFocus(TCtrlFocusEvent *pev)
Handles the EV_OC_CTRLFOCUS message, which is sent by an OCX control.
void CeEditVerbs(owl::TCommandEnabler &ce)
Enables the Edit|Verbs command, which lets the user select one of the OLE-specific verbs from the Edi...
virtual TOcView * CreateOcView(owl::TRegLink *link, bool isRemote, IUnknown *outer)
Called to perform the actual setting up of the OcView member.
TOcView * OcView
Holds the ObjectComponents view or remote view (the server's) associated with the TOleWindow view.
bool EvOcViewClipData(TOcFormatData &format)
Requests clipboard data in the specified format.
virtual bool EvOcAmbientGetUIDead(bool *dead)
Handles the EV_OC_AMBIENT_GETUIDEAD message, which is sent by an OCX control.
bool EvOcViewAttachWindow(bool attach)
Attaches the view to its ObjectWindows parent window so that the user can perform open editing on the...
virtual bool EvOcCtrlMouseDown(TCtrlMouseEvent *pev)
Handles the EV_OC_CTRLMOUSEDOWN message, which is sent by an OCX control.
bool EvOcViewSetScale(TOcScaleFactor &scaleFactor)
Responds to an OC_VIEWSETSCALE message and handles the scaling for server application,...
virtual bool Deactivate()
If an embedded object is no longer the active embedded object, either because the user has ended an i...
void CeEditCopy(owl::TCommandEnabler &ce)
Enables a command with an ID of CM_EDITCOPY, which lets the user copy selected object to the clipboar...
bool EvOcViewSetData(TOcFormatData &format)
void CmEditShowObjects()
Responds to a command with an ID of CM_EDITSHOWOBJECTS by toggling the value of the ShowObjects data ...
virtual bool EvOcAmbientSetFont(IDispatch *font)
Handles the EV_OC_AMBIENT_SETFONT message, which is sent by an OCX control.
void CmEditInsertObject()
Responds to a command with an ID of CM_EDITINSERTOBJECT by creating, initializing,...
TOcDocument * GetOcDoc()
Returns the ObjectComponents document associated with this window.
void EvHScroll(owl::uint scrollCode, owl::uint thumbPos, HWND hWndCtl)
In response to a WM_HSCROLL message, EvHScroll calls TWindow::EvHScroll and invalidates the window.
bool EvOcViewGetSiteRect(owl::TRect *rect)
Gets the size of the rectangle (the site) where the embedded object is to be placed.
void EvSetFocus(HWND hWndLostFocus)
Responds to a change in focus of the window.
virtual void SetScale(owl::uint16 percent)
Sets the ratio of the embedded object's size to the size of the site.
virtual bool StartDrag(owl::uint modKeys, owl::TPoint &point)
virtual bool PaintParts(owl::TDC &dc, bool erase, owl::TRect &rect, bool metafile)
Repaints the embedded objects on the given device context.
A device context class derived from TWindowDC, TClientDC provides access to the client area owned by ...
Base class for an extensible interface for auto enabling/disabling of commands (menu items,...
TDC is the root class for GDI DC wrappers.
TDropInfo is a simple class that supports file-name drag-and-drop operations using the WM_DROPFILES m...
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
TPoint is a support class, derived from tagPOINT.
TRect is a mathematical class derived from tagRect.
A linked structure in which each node points to a list of TRegList objects (or TRegList-derived objec...
The tagSIZE struct is defined as.
Reference to reference counted string object TUString Lightweight reference object consisting of a po...
TWhere
Enumeration describing the location of a grapple selection.
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
Definition of GDI DC encapsulation classes: TDC, TWindowDC, TScreenDC, TDesktopDC,...
#define DECLARE_STREAMABLE_INLINES(cls)
Object Component Framework (COM encapsulation).
Object Windows Library (OWLNext Core).
LPARAM TParam2
Second parameter type.
WPARAM TParam1
First parameter type.
LRESULT TResult
Result type.
Definition of OWL signatures for ObjectComponents messages.
Definition of TOcLinkView Class.
Definition of TOcPart class.
Definition of TOcRemView Class.
#define TYPESAFE_DOWNCAST(object, toClass)
Base struct for all control event messages.
For part adornment painting over part, & painting views.
Definition of the UI Helper Classes: TUIHandle, TUIBorder, TUIFace, TUIPart.
Base window class TWindow definition, including HWND encapsulation.