21#include <owl/docview.rh>
22#include <ocf/oleview.rh>
326#if !defined(OWL_NO_OCX_CONTAINER_SUPPORT)
522 if (
pos->left ==
pos->right)
523 pos->right =
pos->left + 100;
524 if (
pos->top ==
pos->bottom)
525 pos->bottom =
pos->top + 100;
603 if (
id == 0 || pCtrl->
GetId() ==
id) {
631 if (
title.Length() > 0) {
1092 for (
int index = 0; index <
fileCount; index++) {
1134 if (p && p ==
GetOcView()->GetActivePart()) {
1510 if (flags == 0xFFFF &&
hMenu == 0) {
1738 else if (
vp.PaintSelection) {
2408 Scroller->BeginView(dc,
rect);
2416 Scroller->EndView();
2625#if OWL_PERSISTENT_STREAMS
2635 GetObject()->Remote =
false;
2636 GetObject()->OcApp = 0;
2637 GetObject()->OcDoc = 0;
2638 GetObject()->OcView = 0;
2639 GetObject()->Init();
2641 is >> GetObject()->Scale;
2642 is >> GetObject()->Pos;
2643 is >> GetObject()->ShowObjects;
2652TOleWindow::Streamer::Write(
opstream&
os)
const
2655 os << GetObject()->Scale;
2656 os << GetObject()->Pos;
2657 os << GetObject()->ShowObjects;
#define PRECONDITION(condition)
#define DIAG_DECLARE_GROUP(group)
#define TRACEX(group, level, message)
bool Convert(TOcPart *ocPart, bool b)
Open the Convert dialog, and perform the conversion if OK.
owl::ulong _IFUNC AddRef()
bool BrowseControls(TOcInitInfo &initInfo)
bool Copy(TOcPart *ocPart)
Copy Selected embedded object.
owl::ulong _IFUNC Release()
bool Browse(TOcInitInfo &initInfo)
bool IsOptionSet(owl::uint32 option) const
owl::uint EnableEditMenu(TOcMenuEnable enable, IBDataConsumer *ocview)
bool Drag(TOcDataProvider *ocData, TOcDropAction inAction, TOcDropAction &outAction)
Drag a selection.
Class representing an embedded control within a document.
bool Init(TOcInitInfo *initInfo, owl::TRect pos)
TOcPartCollection & GetParts()
owl::uint32 ReleaseDataObject()
Used to obtain the item name for building monikers.
Link Viewer object for a server document.
TOcPart * Locate(owl::TPoint &point)
walk thru Part collection & return the last one that logical point hits, (first one in Z order)
OC part class represents an embeded or linked part in a document.
bool IsVisible(const owl::TRect &logicalRect) const
HRESULT QueryServer(const IID &iid, void **iface)
Query server for its interfaces.
bool Draw(HDC dc, const owl::TRect &pos, const owl::TRect &clip, TOcAspect aspect=asDefault)
bool EnumVerbs(const TOcVerb &)
bool Activate(bool activate)
void SetPos(const owl::TPoint &pos)
Set part to the new position given in logical units.
void Delete()
Delete this object.
void SetSize(const owl::TSize &size)
Set part to the new size given in logical units.
owl::TRect GetRect() const
Used to obtain the size of the rectangle that encloses the selection.
Remote Viewer object for a server document.
owl::TString GetContainerTitle()
Get the window text of the container.
@ Link
Load-from-file is really a link.
void Invalidate(TOcInvalidate)
Invalidate the site within the active view.
bool SetContainerStatusText(LPCTSTR text)
@ OpenEditing
Open editing.
Use when doing parts save and load.
void SetScale(owl::uint16 percent)
Change the scaling factor.
The TOcView partner is a container (viewer) of a given (server/client) document.
virtual void ReleaseObject()
Should only be called by the owner/creator of this object.
virtual bool EvSetFocus(bool set)
Returns true if view keeps focus, false if the inplace server got it.
TOcPart * GetActivePart()
bool ActivatePart(TOcPart *part)
Activate a given part.
void SetupWindow(HWND hWin, bool embedded=false)
bool Paste(bool linking=false)
void EvActivate(bool activate)
View is activated/deactivated.
bool PasteNative(TOcInitInfo &init, owl::TPoint *where=0)
Paste native data into the container.
virtual void EvClose()
View is shuting down.
The TOcxView partner is a container (viewer) of a given (server/client) document.
Derived from TClientDC, TOleClientDC is a helper class that translates between two different coordina...
TOleClientDC(TOleWindow &win, bool scale=true)
Constructs a TOleClientDC object .
Decorated frame that supports OLE 2 using OCF.
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.
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.
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.
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 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.
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.
~TOleWindow()
Checks to see if there are any open views, and, if no open views exist, destroys the TOleWindow objec...
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.
OLE API related exception object.
TFrameWindow * GetMainWindow()
Return the current main window.
A device context class derived from TWindowDC, TClientDC provides access to the client area owned by ...
Class wrapper for management of color values.
Base class for an extensible interface for auto enabling/disabling of commands (menu items,...
@ Unchecked
Command is not enabled.
@ Checked
Command is enabled.
TDC is the root class for GDI DC wrappers.
virtual bool SetViewportOrg(const TPoint &origin, TPoint *oldOrg=nullptr)
Sets this DC's viewport origin to the given origin value, and saves the previous origin in oldOrg.
virtual int GetDeviceCaps(int index) const
Used under WIN3.1 or later, GetDeviceCaps returns capability information about this DC.
void SelectObject(const TBrush &brush)
Selects the given GDI brush object into this DC.
virtual int SetMapMode(int mode)
Sets the current window mapping mode of this DC to mode.
bool DPtoLP(TPoint *points, int count=1) const
Converts each of the count points in the points array from device points to logical points.
int SetROP2(int mode)
Sets the current foreground mix mode mode of this DC to the given mode value and returns the previous...
bool LPtoDP(TPoint *points, int count=1) const
Converts each of the count points in the points array from logical points to device points.
bool DrawFocusRect(int x1, int y1, int x2, int y2)
Draws the given rectangle on this DC in the style used to indicate focus.
bool Rectangle(int x1, int y1, int x2, int y2)
Draws and fills a rectangle of the given size on this DC with the current pen and brush objects.
virtual bool SetWindowExt(const TSize &extent, TSize *oldExtent=nullptr)
Sets this DC's window x- and y-extents to the given extent values.
virtual void SelectStockObject(int index)
Selects into the DC a predefined stock pen, brush, font, or palette.
bool SetWindowOrg(const TPoint &origin, TPoint *oldOrg=nullptr)
Sets the origin of the window associated with this DC to the given origin value, and saves the previo...
virtual bool SetViewportExt(const TSize &extent, TSize *oldExtent=nullptr)
Sets this DC's viewport x- and y-extents to the given extent values.
TDropInfo is a simple class that supports file-name drag-and-drop operations using the WM_DROPFILES m...
A nested class, TEventInfo provides specific information about the type of message sent,...
virtual bool Find(TEventInfo &info, TEqualOperator op=0)
Searches the list of response table entries looking for a match.
TResult Dispatch(TEventInfo &info, TParam1, TParam2=0)
Takes the message data from TEventInfo's Msg data member and dispatches it to the correct event-handl...
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
A DC class that wraps begin and end paint calls for use in an WM_PAINT response function.
PAINTSTRUCT Ps
The paint structure associated with this TPaintDC object.
TPen is derived from TGdiObject.
TPoint is a support class, derived from tagPOINT.
int X() const
Returns the x coordinate of the point.
int Y() const
Returns the Y coordinate of the point.
Iterator for Pointer Container.
TRect is a mathematical class derived from tagRect.
int Height() const
Returns the height of this rectangle (bottom - top).
TRect & Offset(int dx, int dy)
Changes this rectangle so its corners are offset by the given delta values.
const TPoint & TopLeft() const
Returns the upperleft point.
int Width() const
Returns the width of this rectangle (right - left).
void SetNull()
Sets the left, top, right, and bottom of the rectangle to 0.
TSize Size() const
Returns the size of rectangle.
A linked structure in which each node points to a list of TRegList objects (or TRegList-derived objec...
A registration parameter table, composed of a list of TRegItems.
Derived from TWindowDC, TScreenDC is a DC class that provides direct access to the screen bitmap.
The tagSIZE struct is defined as.
Reference to reference counted string object TUString Lightweight reference object consisting of a po...
Assists in drawing user manupulators for on-screen objects.
void Paint(TDC &dc) const
Paints the TUIHandle object onto the specified device context, dc.
@ Outside
Hit completely outside the object.
@ MidCenter
Somewhere inside the rectangle.
@ Grapples
Eight grapple boxes are drawn.
@ DashFramed
Frame rect is drawn dashed.
@ HandlesIn
Handles on the inside of the rectange.
@ Framed
Frame rect is drawn solid.
static const TUIMetric CyDoubleClk
static const TUIMetric CxDoubleClk
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
static TPoint GetCursorPos()
bool SetCursor(TModule *module, TResId resId)
Sets the mouse cursor for the window, loading the given resId from the given module.
HMENU LoadMenu(TResId id) const
HWND SetCapture()
Sets the mouse capture to the current window.
virtual void SetParent(TWindow *newParent)
Sets the parent for the specified window by setting Parent to the specified new Parent window object.
TApplication * GetApplication() const
Gets a pointer to the TApplication object associated with this.
virtual void EvCommandEnable(TCommandEnabler &ce)
Called by WindowProc to handle WM_COMMAND_ENABLE messages, EvCommandEnable calls the CmXxxx command-h...
TRect GetWindowRect() const
Gets the screen coordinates of the window's rectangle.
void EvHScroll(uint scrollCode, uint thumbPos, HWND hWndCtl)
Response method for an incoming WM_HSCROLL message.
void EvVScroll(uint scrollCode, uint thumbPos, HWND hWndCtl)
Response method for an incoming WM_VSCROLL message.
virtual void InvalidateRect(const TRect &rect, bool erase=true)
Invalidates a specified client area.
void Init(TWindow *parent, LPCTSTR title, TModule *module)
Normal initialization of a default constructed TWindow.
static void ReleaseCapture()
Releases the mouse capture from this window.
TModule * GetModule() const
Returns a pointer to the module object.
void RouteCommandEnable(HWND hInitCmdTarget, TCommandEnabler &ce)
Walks the chain of windows from the initial target window to this window.
void ClientToScreen(TPoint &point) const
Converts the client coordinates specified in point to screen coordinates for the new window.
bool IsChild(HWND hWnd) const
Returns true if the window is a child window or a descendant window of this window.
virtual void CleanupWindow()
Always called immediately before the HWindow becomes invalid, CleanupWindow gives derived classes an ...
HCURSOR LoadCursor(TResId id) const
TResult ForwardMessage(HWND handle, bool send=true)
Forwards the window's current message.
TResult DefaultProcessing()
Handles default processing of events, which includes continued processing of menu/accelerators comman...
TRect GetClientRect() const
Gets the coordinates of the window's client area (the area in a window you can use for drawing).
virtual TResult EvCommand(uint id, HWND hWndCtl, uint notifyCode)
WindowProc calls EvCommand to handle WM_COMMAND messages.
virtual bool CanClose()
Use this function to determine if it is okay to close a window.
void EvSetFocus(HWND hWndLostFocus)
The default message handler for WM_SETFOCUS.
void ScreenToClient(TPoint &point) const
Uses the screen coordinates specified in point to calculate the client window's coordinates and then ...
virtual void SetupWindow()
Performs setup following creation of an associated MS-Windows window.
virtual void Paint(TDC &dc, bool erase, TRect &rect)
Repaints the client area (the area you can use for drawing) of a window.
bool IsFlagSet(uint mask)
Returns the state of the bit flag in Attr.Flags whose mask is supplied.
static HWND GetFocus()
Gets a handle to the window that has the focus.
void EvMenuSelect(uint menuItemId, uint flags, HMENU hMenu)
The default message handler for WM_MENUSELECT.
void EvSize(uint sizeType, const TSize &size)
Response method for an incoming WM_SIZE message.
HWND THandle
TWindow encapsulates an HWND.
virtual void Invalidate(bool erase=true)
Invalidates (mark for painting) the entire client area of a window.
HWND GetHandle() const
Returns the handle of the window.
ipstream, a specialized input stream derivative of pstream, is the base class for reading (extracting...
Base class for writing streamable objects.
#define DEFINE_RESPONSE_TABLE1(cls, base)
Macro to define a response table for a class with one base.
Definition of abstract GDI object class and derived classes.
void ReadBaseObject(Base *base, ipstream &in)
#define IMPLEMENT_STREAMABLE1(cls, base1)
void WriteBaseObject(Base *base, opstream &out)
int LoadString(uint id, TCHAR *buf, int maxChars) const
Loads a string resource identified by id into the buffer pointed to by buff.
@ wfAlias
TWindow is an alias to a preexisting HWND.
Include for OC, gets common headers when precompiled headers are enabled.
Object Component Framework (COM encapsulation)
@ meEnableBrowseClipboard
EV_OC_AMBIENT_GETFORECOLOR
EV_OC_AMBIENT_SETSCALEUNITS
EV_OC_AMBIENT_GETDISPLAYNAME
EV_OC_AMBIENT_GETSHOWHATCHING
EV_OC_AMBIENT_SETSHOWHATCHING
EV_OC_AMBIENT_SETSHOWGRABHANDLES
EV_OC_AMBIENT_SETDISPLAYASDEFAULT
EV_OC_AMBIENT_GETSUPPORTSMNEMONICS
EV_OC_VIEWPARTINVALID
EV_OC_VIEWDISCARDUNDO, // !CQ not processing this yet...
EV_OC_AMBIENT_GETTEXTALIGN
EV_OC_AMBIENT_SETSUPPORTSMNEMONICS
EV_OC_AMBIENT_SETUSERMODE
EV_OC_AMBIENT_SETBACKCOLOR
EV_OC_AMBIENT_GETUSERMODE
EV_OC_AMBIENT_GETDISPLAYASDEFAULT
EV_OC_CTRLEVENT_PROPERTYCHANGE
class _ICLASS TOcDocument
EV_OC_AMBIENT_GETMESSAGEREFLECT
EV_OC_AMBIENT_GETBACKCOLOR
EV_OC_AMBIENT_SETLOCALEID
EV_OC_AMBIENT_GETSCALEUNITS
EV_OC_CTRLEVENT_PROPERTYREQUESTEDIT
EV_OC_AMBIENT_GETSHOWGRABHANDLES
EV_OC_AMBIENT_SETTEXTALIGN
EV_OC_CTRLEVENT_MOUSEDOWN
EV_OC_AMBIENT_GETLOCALEID
@ amExeMode
may be overridden per instance if running DLL
EV_OC_AMBIENT_SETFORECOLOR
EV_OC_CTRLEVENT_MOUSEMOVE
EV_OC_CTRLEVENT_CUSTOMEVENT
EV_OC_AMBIENT_SETDISPLAYNAME
EV_OC_CTRLEVENT_ERROREVENT
EV_OC_AMBIENT_SETMESSAGEREFLECT
Object Windows Library (OWLNext Core)
LPARAM TParam2
Second parameter type.
WPARAM TParam1
First parameter type.
LRESULT TResult
Result type.
Definition of TOcControl class - Proxy object representing a control in.
Definition of TOcDocument Class.
Definition of Compound Document TOcView Class.
TOleWindow - Class encapsulating a window which can be an OLE container or server window.
#define TYPESAFE_DOWNCAST(object, toClass)
Base struct for all control event messages.
For part adornment painting over part, & painting views.
Definition of TUIMetric, a UI metrics provider class.
Base window class TWindow definition, including HWND encapsulation.
#define EV_COMMAND_ENABLE(id, method)
Response table entry for enabling a command.
#define EV_MESSAGE(message, method)
Response table entry for raw message handling Uses a dispatcher that just forwards WPARAM and LPARAM.
#define EV_COMMAND(id, method)
Response table entry for a menu/accelerator/push button message.