70 "debugprogid" :
"progid");
79 TRACEX(OcfRefCount, 1,
"TOcView() @" << (
void*)
this);
123 "debugprogid" :
"progid");
132 TRACEX(OcfRefCount, 1,
_T(
"TOcView() @") << (
void*)
this);
199 SUCCEEDED(hr = IBContainer_QueryInterface(
this,
iid, iface))
200 || SUCCEEDED(hr = IBContains_QueryInterface(
this,
iid, iface))
201 || SUCCEEDED(hr = IBDataConsumer_QueryInterface(
this,
iid, iface))
202 || SUCCEEDED(hr = IBDropDest_QueryInterface(
this,
iid, iface))
203 || SUCCEEDED(hr = IBDataNegotiator_QueryInterface(
this,
iid, iface))
284 views.
Add(ocLinkView);
291 views.
Detach(ocLinkView,
true);
435 ::InvalidateRect(
GetWindow(), &auxRect,
true);
513 if (ocPart && strcmp(ocPart->
GetName(),
OleStr(name)) == 0) {
515 if (SUCCEEDED(ocPart->
QueryInterface(IID_IBPart, (LPVOID*)bpart))) {
527 if (SUCCEEDED(ocLinkView->
QueryInterface(IID_IBPart, (LPVOID*)bpart)))
712 TRect aobjPos(*objPos);
748 TRect aobjPos(*objPos);
799 HWND hMdiChild = ::GetParent(
GetWindow());
801 HWND hMdiClient = ::GetParent(hMdiChild);
803 HWND hMdiFrame = ::GetParent(hMdiClient);
804 while (::GetParent(hMdiFrame)) {
805 hMdiChild = hMdiClient;
806 hMdiClient = hMdiFrame;
807 hMdiFrame = ::GetParent(hMdiFrame);
809 ::SendMessage(hMdiClient, WM_MDIACTIVATE, (WPARAM)hMdiChild, 0);
816 ::SetWindowPos(
OcApp.GetWindow(), HWND_TOP, 0, 0, 0, 0,
817 SWP_NOMOVE|SWP_NOSIZE | SWP_SHOWWINDOW);
818 ::SetFocus(
OcApp.GetWindow());
819 ::ShowWindow(
GetWindow(), SW_SHOWNORMAL);
820 ::SetWindowPos(
GetWindow(), HWND_TOP, 0, 0, 0, 0,
821 SWP_NOMOVE|SWP_NOSIZE | SWP_SHOWWINDOW);
849 uint cfLinkSource = ::RegisterClipboardFormat(
_T(
"Link Source"));
861 wsprintf(key,
_T(
"format%d"), i);
863 buf =
const_cast<LPTSTR
>(regList[
_W2A(key)]);
874 for (
int i = 0; i < 3; i++) {
890 uint cf = ::RegisterClipboardFormat(buf);
891 if (cf == cfLinkSource)
946 TOcFormatData formatData(*format, 0, init.Handle.Data,
true, where);
983 _TCHAR fstr[] =
_T(
"%s");
999 uint medium,
bool isLinkable,
1004 IsLinkable = isLinkable;
1006 Direction = direction;
1010 _tcscpy(ResultName, resultName);
OLE Automation Class Definitions.
#define PRECONDITION(condition)
#define TRACEX(group, level, message)
IBContainer – Supported by container app's document window.
virtual HRESULT _IFUNC Init(IBContainer *)=0
virtual HRESULT _IFUNC EnumLinks(IBLinkInfo **)=0
virtual HRESULT _IFUNC OnSetFocus(BOOL)=0
virtual void _IFUNC OnClose()=0
virtual HRESULT _IFUNC BrowseLinks()=0
virtual void _IFUNC OnResize()=0
virtual HRESULT _IFUNC UpdateLinks()=0
virtual void _IFUNC OnActivate(BOOL)=0
IBDropDest – Supported by container app's document window and/or other areas inside the window.
IBLinkInfo – Supported by BOleParts which are link objects.
virtual HRESULT _IFUNC OnRename(IBLinkable *pContainer, LPCOLESTR name)=0
IBPart – Supported by server objects.
HRESULT BOleComponentCreate(IUnknown **retIface, IUnknown *outer, owl::uint32 idClass)
Create a BOle helper for one of our OC objects in this app.
bool Paste(TOcInitInfo &initInfo)
bool BrowseClipboard(TOcInitInfo &initInfo)
bool EvSetFocus(bool set)
bool IsOptionSet(owl::uint32 option) const
TOcNameList & GetNameList()
virtual bool EvOcViewPasteObject(TOcInitInfo &init)=0
virtual bool EvOcViewBorderSpaceReq(const owl::TRect *rect)=0
virtual bool EvOcViewDrop(TOcDragDrop &ddInfo)=0
virtual void ReleaseOcObject()=0
virtual HWND EvOcGetWindow() const =0
virtual void EvOcViewSetTitle(LPCTSTR title)=0
virtual LPCTSTR EvOcViewTitle()=0
virtual bool EvOcViewScroll(TOcScrollDir scrollDir)=0
virtual bool EvOcViewBorderSpaceSet(const owl::TRect *rect)=0
virtual bool EvOcPartInvalid(TOcPartChangeInfo &part)=0
virtual bool EvOcViewDrag(TOcDragDrop &ddInfo)=0
virtual bool EvOcViewOpenDoc(LPCTSTR path)=0
virtual void SetWindow(HWND)
virtual bool EvOcViewGetScale(TOcScaleFactor &scaleFactor)
virtual bool EvOcViewSetSiteRect(TOcSiteRect &sr)
virtual bool EvOcViewPasteObject(TOcInitInfo &init)
virtual bool EvOcPartInvalid(TOcPartChangeInfo &part)
virtual bool EvOcViewPartActivate(TOcPart &ocPart)
virtual bool EvOcViewOpenDoc(LPCTSTR path)
virtual bool EvOcViewBorderSpaceSet(const owl::TRect *rect)
virtual bool EvOcViewDrop(TOcDragDrop &ddInfo)
virtual HWND EvOcGetWindow() const
virtual bool EvOcViewDrag(TOcDragDrop &ddInfo)
virtual LPCTSTR EvOcViewTitle()
owl::TResult ForwardEvent(int eventId, const void *param)
virtual bool EvOcViewBorderSpaceReq(const owl::TRect *rect)
virtual void EvOcViewSetTitle(LPCTSTR title)
virtual bool EvOcViewGetSiteRect(TOcSiteRect &sr)
virtual bool EvOcViewScroll(TOcScrollDir scrollDir)
void Disconnect()
Disconnect from the site.
OC Document class, holds parts & is a owner of views.
TOcLinkCollection & GetViews()
void SetActiveView(TOcView *view)
void RenameParts(IBRootLinkable *bLDocumentI)
void SetName(const owl::tstring &newName)
Notify container that doc pathname has changed.
owl::tstring GetName() const
TOcPartCollection & GetParts()
owl::uint32 ReleaseDataObject()
Used to obtain the item name for building monikers.
int Detach(TOcLinkView *const &view, int del=0)
int Add(TOcLinkView *const &View)
int Find(TOcLinkView *const &view)
Link Viewer object for a server document.
void SetMoniker(LPCTSTR name)
Remember the name of the moniker.
void GetLinkRect()
Get the initial size and position from the host app into our members.
HRESULT _IFUNC QueryInterface(const GUID &iid, void **iface)
TOcLinkView(TOcView *ocView, owl::TRegList *regList=0, IUnknown *outer=0)
OC part class represents an embeded or linked part in a document.
bool Activate(bool activate)
TOcPart(TOcDocument &document, int id=0)
Construct a new part with a given temp id Must call Init method to complete initialization.
HRESULT _IFUNC QueryInterface(const GUID &iid, void **iface)
owl::TRect GetRect() const
Used to obtain the size of the rectangle that encloses the selection.
Use when doing parts save and load.
owl::uint16 GetScale()
Get the scale percentage.
void GetScaleFactor(TOcScaleInfo &scaleInfo) const
Copy a BOle scale factor structure.
void SetScale(owl::uint16 percent)
Change the scaling factor.
TOcScaleFactor & operator=(const TOcScaleInfo &scaleInfo)
Assign a BOle structure to this scale factor.
bool IsZoomed()
Whether there is zoom factor.
virtual bool EvOcViewSetLink(TOcLinkView &view)=0
virtual bool EvOcViewClipData(TOcFormatData &format)=0
virtual void SetWindow(HWND)
virtual void ReleaseOcObject()=0
virtual bool EvOcViewDrag(TOcDragDrop &ddInfo)
virtual bool EvOcViewSetData(TOcFormatData &format)
virtual bool EvOcViewAttachWindow(bool attach)
virtual bool EvOcViewClose()
virtual bool EvOcViewClipData(TOcFormatData &format)
virtual bool EvOcViewPartSize(TOcPartSize &size)
virtual bool EvOcViewSetScale(TOcScaleFactor &scaleFactor)
virtual bool EvOcViewInsMenus(TOcMenuDescr &sharedMenu)
virtual bool EvOcViewBreakLink(TOcLinkView &view)
virtual bool EvOcViewGetPalette(LOGPALETTE **palette)
virtual bool EvOcViewGetItemName(TOcItemName &item)
virtual bool EvOcViewPaint(TOcViewPaint &vp)
virtual HWND EvOcGetWindow() const
virtual bool EvOcViewSavePart(TOcSaveLoad &ocSave)
virtual bool EvOcViewLoadPart(TOcSaveLoad &ocLoad)
virtual void EvOcViewSetTitle(LPCTSTR title)
virtual bool EvOcViewSetLink(TOcLinkView &view)
virtual bool EvOcViewShowTools(TOcToolBarInfo &tbi)
virtual bool EvOcViewDoVerb(owl::uint verb)
owl::TResult ForwardEvent(int eventId, const void *param)
HRESULT _IFUNC FindDropDest(owl::TPoint *, IBDropDest **)
Locate the drop destination object.
owl::TRect GetWindowRect() const
Return the client rect for the view window.
TOcDocument & OcDocument
Our OC document object.
IUnknown * BContainer
Container helper object.
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.
HRESULT _IFUNC Scroll(TOcScrollDir scrollDir)
Ask the container view window to scroll itself in a given direction.
friend class _ICLASS TOcPart
void _IFUNC AppendWindowTitle(LPCOLESTR title)
Append server's doc title info to our view's window title.
HRESULT _IFUNC BringToFront()
owl::ulong _IFUNC AddRef()
friend class _ICLASS TOcLinkView
owl::ulong _IFUNC Release()
HRESULT _IFUNC AllowInPlace()
LPCOLESTR _IFUNC GetWindowTitle()
TOcPart * ActivePart
Currently active part, if any.
HRESULT QueryObject(const IID &iid, void **iface)
Callback from TUnknown's implementation of QueryInterface.
HRESULT _IFUNC Accelerator(MSG *)
owl::TString OrgTitle
Original window title string.
HRESULT _IFUNC SetFrameMenu(HMENU)
HRESULT _IFUNC InsertContainerMenus(HMENU, TOcMenuWidths *)
bool ActivatePart(TOcPart *part)
Activate a given part.
HRESULT _IFUNC Drop(TOcInitInfo *, owl::TPoint *, const owl::TRect *)
Drop a part onto this view.
void Shutdown()
Called from destructor of this class or of derived class to release helpers and host interfaces.
TOcDataProvider * OcData
Dataprovider representing this view.
TOcContainerHost * ContainerHost
The hosting app's container object.
bool BrowseClipboard(TOcInitInfo &initInfo)
IUnknown * BDocument
Document helper object.
owl::uint _IFUNC CountFormats()
Format count.
void InvalidatePart(TOcPartChangeInfo &changeInfo)
bool EnumLinks(IBLinkInfo **)
HRESULT _IFUNC RequestBorderSpace(const owl::TRect *)
void SetupWindow(HWND hWin, bool embedded=false)
HRESULT _IFUNC SetStatusText(LPCOLESTR text)
HRESULT _IFUNC GetFormat(owl::uint, TOcFormatInfo *)
Format retrieval.
TOcLinkView * GetDocLink(LPCTSTR name=0)
Obtain a TOcLinkView representing a moniker, the whole document by default.
HRESULT _IFUNC GetPart(IBPart **, LPCOLESTR)
IBRootLinkable * BLDocumentI
RootLinkable interface on the container.
bool RegisterClipFormats(owl::TRegList ®List)
Register the clipboard formats supported.
void _IFUNC DragFeedback(owl::TPoint *, const owl::TRect *, TOcMouseAction, owl::uint, HRESULT &hr)
Provide feedback to the users drag action in our container window.
owl::TPoint GetOrigin() const
bool IsOptionSet(owl::uint32 option) const
bool Paste(bool linking=false)
void EvActivate(bool activate)
View is activated/deactivated.
TOcView(TOcDocument &doc, TOcContainerHost *ch, TOcServerHost *sh, owl::TRegList *regList=0, IUnknown *outer=0)
New, interface constructor.
TOcApp & OcApp
Our OC application object.
TOcServerHost * ServerHost
The hosting app's server object.
IBDocument * BDocumentI
Document interface on the document.
HRESULT _IFUNC SetBorderSpace(const owl::TRect *)
int LinkFormat
adjustment for format count
HRESULT _IFUNC GetScrollRect(owl::TRect *)
HRESULT _IFUNC GetAccelerators(HACCEL *, int *)
bool PasteNative(TOcInitInfo &init, owl::TPoint *where=0)
Paste native data into the container.
virtual void EvClose()
View is shuting down.
HRESULT _IFUNC Init(LPCOLESTR)
Ask the container to load document named 'path'.
void ScrollWindow(int dx, int dy)
Scroll this container window a give dx,dy.
IUnknown * SetOuter(IUnknown *outer=0)
TPoint is a support class, derived from tagPOINT.
TPoint()
Constructs an uninitialized point.
TRect is a mathematical class derived from tagRect.
int Height() const
Returns the height of this rectangle (bottom - top).
int Width() const
Returns the width of this rectangle (right - left).
A registration parameter table, composed of a list of TRegItems.
LPCTSTR Lookup(LPCSTR key, TLangId lang=TLocaleString::UserDefaultLangId)
Performs the lookup of the TRegItems using a key (an item name such as progid) and returns the value ...
The tagSIZE struct is defined as.
ipstream, a specialized input stream derivative of pstream, is the base class for reading (extracting...
Base class for writing streamable objects.
Classes for window system geometry.
int LoadString(uint id, TCHAR *buf, int maxChars) const
Loads a string resource identified by id into the buffer pointed to by buff.
ocrMedium
Medium: means of data transfer.
Include for OC, gets common headers when precompiled headers are enabled.
TLocaleString - localized name support.
Reliable platform independent header for common memory and string functions.
Object Component Framework (COM encapsulation).
HRESULT HRFailIfZero(int bexpr)
const BCID cidBOleContainer
_OCFCFUNC(ipstream &) operator>>(ipstream &is
TOcLinkCollection TOcViewCollection
bool HRSucceeded(HRESULT hr)
TOcFormatList::Iterator TOcFormatListIter
TOcPartCollection::Iterator TOcPartCollectionIter
@ amDebug
user requested launching for debugging
const BCID cidBOleDocument
owl::opstream & operator<<(owl::opstream &os, const TColor &c)
Insert the color value into a persistent output stream.
LPARAM TParam2
Second parameter type.
LRESULT TResult
Result type.
TModule & GetGlobalModule()
owl::ipstream & operator>>(owl::ipstream &is, TColor &c)
Extract the color value from a persistent input stream.
DIAG_DECLARE_GROUP(OwlThread)
Definition of TOcApp application connection class.
Definition of TOcDataProvider Class.
Definition of TOcPart class.
Definition of TOcRemView Class.
Definition of TOcStorage & TOcStream classes.
Definition of Compound Document TOcView Class.
#define OC_VIEWGETITEMNAME
#define OC_VIEWATTACHWINDOW
#define OC_VIEWGETPALETTE
#define OC_VIEWBORDERSPACESET
#define OC_VIEWSETSITERECT
#define OC_VIEWGETSITERECT
#define OC_VIEWBORDERSPACEREQ
#define OC_VIEWPASTEOBJECT
#define OC_VIEWPARTACTIVATE
#define OC_VIEWPARTINVALID
Low level OLE Utility class definitions.
TOcInitInfo * InitInfo
ViewDrop event only, else 0.
owl::ulong xN
numerator in x direction
owl::ulong yN
numerator in y direction
owl::ulong yD
denominator in y direction
owl::ulong xD
denominator in x direction
For part adornment painting over part, & painting views.