|
OWLNext 7.0
Borland's Object Windows Library for the modern age
|
The TOcView partner is a container (viewer) of a given (server/client) document. More...
#include <ocf/ocview.h>
Public Member Functions | |
| TOcView (TOcDocument &doc, TOcContainerHost *ch, TOcServerHost *sh, owl::TRegList *regList=0, IUnknown *outer=0) | |
| New, interface constructor. | |
| TOcView (TOcDocument &doc, owl::TRegList *regList=0, IUnknown *outer=0) | |
| Compatibility constructor. | |
| void | SetupWindow (HWND hWin, bool embedded=false) |
| virtual void | ReleaseObject () |
| Should only be called by the owner/creator of this object. | |
| TOcDocument & | GetOcDocument () |
| IBRootLinkable * | GetLinkable () |
Clipboard support | |
| bool | RegisterClipFormats (owl::TRegList ®List) |
| Register the clipboard formats supported. | |
| bool | BrowseClipboard (TOcInitInfo &initInfo) |
| bool | PasteNative (TOcInitInfo &init, owl::TPoint *where=0) |
| Paste native data into the container. | |
| bool | Paste (bool linking=false) |
| void | SetOcData (TOcDataProvider *ocData=0) |
| TOcDataProvider * | GetOcData () |
View related | |
| owl::TPoint | GetOrigin () const |
| owl::TRect | GetWindowRect () const |
| Return the client rect for the view window. | |
| void | ScrollWindow (int dx, int dy) |
| Scroll this container window a give dx,dy. | |
| void | InvalidatePart (TOcPartChangeInfo &changeInfo) |
| virtual void | Rename () |
| TOcLinkView * | GetDocLink (LPCTSTR name=0) |
| Obtain a TOcLinkView representing a moniker, the whole document by default. | |
| bool | IsOptionSet (owl::uint32 option) const |
| void | SetOption (owl::uint32 bit, bool state) |
Get/Set active part | |
| TOcPart * | GetActivePart () |
| void | SetActivePart (TOcPart *part) |
| bool | ActivatePart (TOcPart *part) |
| Activate a given part. | |
IBDocument pass-thrus | |
| void | EvResize () |
| void | EvActivate (bool activate) |
| View is activated/deactivated. | |
| virtual void | EvClose () |
| View is shuting down. | |
| virtual bool | EvSetFocus (bool set) |
| Returns true if view keeps focus, false if the inplace server got it. | |
| bool | EnumLinks (IBLinkInfo **) |
| bool | BrowseLinks () |
| bool | UpdateLinks () |
Object reference & lifetime managment | |
For internal OCF use only | |
| owl::ulong _IFUNC | AddRef () |
| owl::ulong _IFUNC | Release () |
| HRESULT _IFUNC | QueryInterface (const GUID &iidiid, void **iface) |
| Public Member Functions inherited from ocf::TUnknown | |
| operator IUnknown & () | |
| operator IUnknown * () | |
| IUnknown * | SetOuter (IUnknown *outer=0) |
| IUnknown * | GetOuter () |
| unsigned long | GetRefCount () |
| unsigned long | AdjustRefCount (int i) |
| IUnknown & | Aggregate (TUnknown &inner) |
Protected Member Functions | |
| owl::TResult | ForwardEvent (int eventId, const void *param) |
| owl::TResult | ForwardEvent (int eventId, owl::TParam2 param=0) |
| ~TOcView () | |
| void | Shutdown () |
| Called from destructor of this class or of derived class to release helpers and host interfaces. | |
| HRESULT | QueryObject (const IID &iidiid, void **iface) |
| Callback from TUnknown's implementation of QueryInterface. | |
IBContains implementation for BOle to use | |
| HRESULT _IFUNC | Init (LPCOLESTR) |
| Ask the container to load document named 'path'. | |
| HRESULT _IFUNC | GetPart (IBPart **, LPCOLESTR) |
IBDataNegotiator implementation | |
| owl::uint _IFUNC | CountFormats () |
| Format count. | |
| HRESULT _IFUNC | GetFormat (owl::uint, TOcFormatInfo *) |
| Format retrieval. | |
IBWindow implementation | |
| HWND _IFUNC | GetWindow () |
| HRESULT _IFUNC | GetWindowRect (owl::TRect *r) |
| LPCOLESTR _IFUNC | GetWindowTitle () |
| void _IFUNC | AppendWindowTitle (LPCOLESTR title) |
| Append server's doc title info to our view's window title. | |
| HRESULT _IFUNC | SetStatusText (LPCOLESTR text) |
| HRESULT _IFUNC | RequestBorderSpace (const owl::TRect *) |
| HRESULT _IFUNC | SetBorderSpace (const owl::TRect *) |
| HRESULT _IFUNC | InsertContainerMenus (HMENU, TOcMenuWidths *) |
| HRESULT _IFUNC | SetFrameMenu (HMENU) |
| void _IFUNC | RestoreUI () |
| HRESULT _IFUNC | Accelerator (MSG *) |
| HRESULT _IFUNC | GetAccelerators (HACCEL *, int *) |
IBDropDest implementation | |
| HRESULT _IFUNC | Drop (TOcInitInfo *, owl::TPoint *, const owl::TRect *) |
| Drop a part onto this view. | |
| void _IFUNC | DragFeedback (owl::TPoint *, const owl::TRect *, TOcMouseAction, owl::uint, HRESULT &hr) |
| Provide feedback to the users drag action in our container window. | |
| HRESULT _IFUNC | Scroll (TOcScrollDir scrollDir) |
| Ask the container view window to scroll itself in a given direction. | |
| HRESULT _IFUNC | GetScrollRect (owl::TRect *) |
IBContainer implementation | |
| HRESULT _IFUNC | FindDropDest (owl::TPoint *, IBDropDest **) |
| Locate the drop destination object. | |
| HRESULT _IFUNC | AllowInPlace () |
| HRESULT _IFUNC | BringToFront () |
| Protected Member Functions inherited from ocf::TUnknown | |
| TUnknown () | |
| virtual | ~TUnknown () |
| IUnknown & | ThisUnknown () |
| virtual HRESULT | QueryObject (const GUID &iidiid, void **pif) |
| QueryObject used when TUnknown is in constructor/destructor. | |
Protected Attributes | |
| IUnknown * | BDocument |
| Document helper object. | |
| IBDocument * | BDocumentI |
| Document interface on the document. | |
| IUnknown * | BContainer |
| Container helper object. | |
| IBRootLinkable * | BLDocumentI |
| RootLinkable interface on the container. | |
| TOcApp & | OcApp |
| Our OC application object. | |
| TOcDocument & | OcDocument |
| Our OC document object. | |
| TOcContainerHost * | ContainerHost |
| The hosting app's container object. | |
| TOcServerHost * | ServerHost |
| The hosting app's server object. | |
| TOcPart * | ActivePart |
| Currently active part, if any. | |
| owl::uint32 | Options |
| owl::TPoint | Origin |
| owl::TSize | Extent |
| owl::tstring | WinTitle |
| TOcFormatList | FormatList |
| owl::TString | OrgTitle |
| Original window title string. | |
| int | LinkFormat |
| adjustment for format count | |
| owl::TRegList * | RegList |
| TOcDataProvider * | OcData |
| Dataprovider representing this view. | |
| Protected Attributes inherited from ocf::TUnknown | |
| IUnknown * | Outer |
Friends | |
| class _ICLASS | TOcControl |
| class _ICLASS | TOcControlEvent |
| class _ICLASS | TOcPart |
| class _ICLASS | TOcDataProvider |
| class _ICLASS | TOcLinkView |
The TOcView partner is a container (viewer) of a given (server/client) document.
| ocf::TOcView::TOcView | ( | TOcDocument & | doc, |
| TOcContainerHost * | ch, | ||
| TOcServerHost * | sh, | ||
| owl::TRegList * | regList = 0, | ||
| IUnknown * | outer = 0 ) |
New, interface constructor.
Definition at line 85 of file ocview.cpp.
References TOcView(), ocf::_T(), ActivePart, AddRef(), ocf::amDebug, BContainer, BDocument, BDocumentI, BLDocumentI, ocf::TOcApp::BOleComponentCreate(), ocf::cidBOleContainer, ocf::cidBOleDocument, ContainerHost, Extent, ocf::TOcApp::IsOptionSet(), LinkFormat, owl::TRegList::Lookup(), OcApp, OcData, OcDocument, OleStr, Options, Origin, RegisterClipFormats(), RegList, Release(), ServerHost, ocf::TOcDocument::SetActiveView(), ocf::TUnknown::SetOuter(), and TRACEX.
| ocf::TOcView::TOcView | ( | TOcDocument & | doc, |
| owl::TRegList * | regList = 0, | ||
| IUnknown * | outer = 0 ) |
Compatibility constructor.
Definition at line 33 of file ocview.cpp.
References TOcView(), ActivePart, AddRef(), ocf::amDebug, BContainer, BDocument, BDocumentI, BLDocumentI, ocf::TOcApp::BOleComponentCreate(), ocf::cidBOleContainer, ocf::cidBOleDocument, ContainerHost, Extent, ocf::TOcApp::IsOptionSet(), LinkFormat, owl::TRegList::Lookup(), OcApp, OcData, OcDocument, OleStr, Options, Origin, RegisterClipFormats(), RegList, Release(), ServerHost, ocf::TOcDocument::SetActiveView(), ocf::TUnknown::SetOuter(), and TRACEX.
|
protected |
Definition at line 138 of file ocview.cpp.
References Shutdown().
|
protectedvirtual |
| bool ocf::TOcView::ActivatePart | ( | TOcPart * | part | ) |
Activate a given part.
Definition at line 444 of file ocview.cpp.
References ocf::TOcPart::Activate(), ActivePart, ocf::TOcPart::IsActive(), and TOcPart.
|
inline |
Definition at line 197 of file ocview.h.
References _IFUNC, and ocf::TUnknown::GetOuter().
|
protectedvirtual |
Implements ocf::IBContainer.
Definition at line 830 of file ocview.cpp.
References HR_FALSE, HR_NOERROR, IsOptionSet(), and ocf::voNoInPlace.
|
protectedvirtual |
Append server's doc title info to our view's window title.
Implements ocf::IBWindow.
Definition at line 605 of file ocview.cpp.
References ContainerHost, ocf::TOcContainerHost::EvOcViewSetTitle(), owl::GetGlobalModule(), GetWindowTitle(), owl::TModule::LoadString(), OleStr, and WinTitle.
|
protectedvirtual |
Implements ocf::IBContainer.
Definition at line 795 of file ocview.cpp.
References GetWindow(), HR_NOERROR, and OcApp.
| bool ocf::TOcView::BrowseClipboard | ( | TOcInitInfo & | initInfo | ) |
Definition at line 928 of file ocview.cpp.
References ocf::TOcApp::BrowseClipboard(), and OcApp.
| bool ocf::TOcView::BrowseLinks | ( | ) |
Definition at line 375 of file ocview.cpp.
References BDocumentI, ocf::IBDocument::BrowseLinks(), and ocf::HRSucceeded().
Format count.
Implements ocf::IBDataNegotiator.
Definition at line 543 of file ocview.cpp.
References ocf::TOcFormatList::Count(), and FormatList.
|
protectedvirtual |
Provide feedback to the users drag action in our container window.
Implements ocf::IBDropDest.
Definition at line 743 of file ocview.cpp.
References ContainerHost, ocf::TOcContainerHost::EvOcViewDrag(), ocf::HRFailIfZero(), and PRECONDITION.
|
protectedvirtual |
Drop a part onto this view.
Creates the part based on initInfo, activating it as appropriate
Implements ocf::IBDropDest.
Definition at line 706 of file ocview.cpp.
References ocf::TOcPart::TOcPart(), ocf::TOcInitInfo::Container, ContainerHost, ocf::TOcContainerHost::EvOcViewDrop(), HR_FAIL, HR_NOERROR, ocf::TOcDragDrop::InitInfo, OcDocument, PasteNative(), PRECONDITION, and Rename().
| bool ocf::TOcView::EnumLinks | ( | IBLinkInfo ** | linkInfo | ) |
Definition at line 364 of file ocview.cpp.
References BDocumentI, ocf::IBDocument::EnumLinks(), ocf::HRSucceeded(), and PRECONDITION.
| void ocf::TOcView::EvActivate | ( | bool | activate | ) |
View is activated/deactivated.
Definition at line 338 of file ocview.cpp.
References BDocumentI, OcDocument, ocf::IBDocument::OnActivate(), and ocf::TOcDocument::SetActiveView().
|
virtual |
View is shuting down.
Reimplemented in ocf::TOcRemView.
Definition at line 313 of file ocview.cpp.
References BContainer, BDocument, BDocumentI, BLDocumentI, ocf::TOcDataProvider::Disconnect(), OcData, ocf::IBDocument::OnClose(), and ocf::IBLinkable::OnRename().
| void ocf::TOcView::EvResize | ( | ) |
Definition at line 303 of file ocview.cpp.
References BDocumentI, and ocf::IBDocument::OnResize().
|
virtual |
Returns true if view keeps focus, false if the inplace server got it.
Reimplemented in ocf::TOcRemView.
Definition at line 352 of file ocview.cpp.
References BDocumentI, ocf::TOcApp::EvSetFocus(), OcApp, and ocf::IBDocument::OnSetFocus().
|
protectedvirtual |
Locate the drop destination object.
For default OC, it is just this view. Other extensions might have subtargets within the view.
Implements ocf::IBContainer.
Definition at line 785 of file ocview.cpp.
References HR_NOERROR.
|
inlineprotected |
Definition at line 744 of file ocview.h.
References ContainerHost, and ForwardEvent().
|
inlineprotected |
Definition at line 751 of file ocview.h.
References ContainerHost, and ForwardEvent().
|
protectedvirtual |
|
inline |
Definition at line 178 of file ocview.h.
References ActivePart, and TOcPart.
| TOcLinkView * ocf::TOcView::GetDocLink | ( | LPCTSTR | name = 0 | ) |
Obtain a TOcLinkView representing a moniker, the whole document by default.
Definition at line 264 of file ocview.cpp.
References ocf::TOcLinkView::TOcLinkView(), ocf::TOcLinkCollection::Add(), CHECK, ocf::TOcLinkCollection::Detach(), ocf::DocContent, ocf::TOcServerHost::EvOcViewSetLink(), ocf::TOcLinkCollection::Find(), ocf::TOcLinkView::GetLinkRect(), ocf::TOcDocument::GetViews(), OcDocument, OleStr, RegList, ServerHost, ocf::TOcLinkView::SetMoniker(), and TOcLinkView.
|
protectedvirtual |
Format retrieval.
Implements ocf::IBDataNegotiator.
Definition at line 552 of file ocview.cpp.
References CountFormats(), FormatList, HR_NOERROR, LinkFormat, and PRECONDITION.
|
inline |
Definition at line 152 of file ocview.h.
References BLDocumentI.
|
inline |
Definition at line 161 of file ocview.h.
References OcData, and TOcDataProvider.
|
inline |
Definition at line 148 of file ocview.h.
References OcDocument.
|
inline |
Implements ocf::IBContains.
Definition at line 507 of file ocview.cpp.
References ocf::TOcPart::FinishLoading(), GetDocLink(), ocf::TOcPart::GetName(), ocf::TOcDocument::GetParts(), HR_FAIL, HR_NOERROR, OcDocument, OleStr, PRECONDITION, ocf::TOcLinkView::QueryInterface(), ocf::TOcPart::QueryInterface(), TOcLinkView, and TOcPart.
|
protectedvirtual |
|
protectedvirtual |
Implements ocf::IBWindow.
Definition at line 572 of file ocview.cpp.
References ContainerHost, and ocf::TOcContainerHost::EvOcGetWindow().
| TRect ocf::TOcView::GetWindowRect | ( | ) | const |
Return the client rect for the view window.
Definition at line 411 of file ocview.cpp.
References TOcView(), and GetWindowRect().
|
protectedvirtual |
Implements ocf::IBWindow.
Definition at line 581 of file ocview.cpp.
References GetWindow(), HR_NOERROR, and PRECONDITION.
|
protectedvirtual |
Implements ocf::IBWindow.
Definition at line 593 of file ocview.cpp.
References ContainerHost, ocf::TOcContainerHost::EvOcViewTitle(), and OrgTitle.
|
protectedvirtual |
Ask the container to load document named 'path'.
Implements ocf::IBContains.
Definition at line 488 of file ocview.cpp.
References CHECK, ContainerHost, ocf::TOcContainerHost::EvOcViewOpenDoc(), ocf::HRFailIfZero(), OcDocument, OleStr, Rename(), and ocf::TOcDocument::SetName().
|
protectedvirtual |
| void ocf::TOcView::InvalidatePart | ( | TOcPartChangeInfo & | changeInfo | ) |
Definition at line 428 of file ocview.cpp.
References CHECK, ContainerHost, ocf::TOcContainerHost::EvOcPartInvalid(), GetOrigin(), ocf::TOcPartChangeInfo::GetPart(), ocf::TOcPart::GetRect(), and GetWindow().
|
inline |
Definition at line 857 of file ocview.h.
References Options, and owl::ToBool().
| bool ocf::TOcView::Paste | ( | bool | linking = false | ) |
Definition at line 959 of file ocview.cpp.
References ContainerHost, ocf::TOcContainerHost::EvOcViewPasteObject(), LinkFormat, OcApp, ocf::TOcApp::Paste(), and PasteNative().
| bool ocf::TOcView::PasteNative | ( | TOcInitInfo & | init, |
| owl::TPoint * | where = 0 ) |
Paste native data into the container.
Definition at line 937 of file ocview.cpp.
References ocf::TOcServerHost::EvOcViewClipData(), ocf::TOcFormatList::Find(), FormatList, ocf::TOcInitInfo::How, ocf::ihEmbed, ocf::iwHandle, ocf::TOcInitInfo::ReleaseDataObject(), ServerHost, and ocf::TOcInitInfo::Where.
|
inline |
Definition at line 199 of file ocview.h.
References _IFUNC, and ocf::TUnknown::GetOuter().
|
protected |
Callback from TUnknown's implementation of QueryInterface.
Definition at line 190 of file ocview.cpp.
References BContainer, BDocument, GetDocLink(), HR_NOINTERFACE, PRECONDITION, ocf::TOcLinkView::QueryInterface(), and TOcLinkView.
| bool ocf::TOcView::RegisterClipFormats | ( | owl::TRegList & | regList | ) |
Register the clipboard formats supported.
Definition at line 845 of file ocview.cpp.
References ocf::TOcFormat::TOcFormat(), _istdigit, ocf::_T(), _tcschr, _tcscpy, _ttoi, _USES_CONVERSION, _W2A, ocf::TOcFormatList::Add(), FormatList, OcApp, ocf::TOcFormat::SetAspect(), ocf::TOcFormat::SetDirection(), ocf::TOcFormat::SetFormatId(), ocf::TOcFormat::SetFormatName(), ocf::TOcFormat::SetLinkable(), and ocf::TOcFormat::SetMedium().
|
inline |
Definition at line 198 of file ocview.h.
References _IFUNC, and ocf::TUnknown::GetOuter().
|
virtual |
Should only be called by the owner/creator of this object.
Releases host interfaces and this.
Reimplemented in ocf::TOcRemView.
Definition at line 173 of file ocview.cpp.
References ContainerHost, Release(), ocf::TOcContainerHost::ReleaseOcObject(), ocf::TOcServerHost::ReleaseOcObject(), and ServerHost.
|
virtual |
Reimplemented in ocf::TOcRemView.
Definition at line 393 of file ocview.cpp.
References BLDocumentI, ocf::TOcDocument::GetName(), OcDocument, OleStr, ocf::IBLinkable::OnRename(), and ocf::TOcDocument::RenameParts().
|
protectedvirtual |
Implements ocf::IBWindow.
Definition at line 629 of file ocview.cpp.
References ContainerHost, ocf::TOcContainerHost::EvOcViewBorderSpaceReq(), ocf::HRFailIfZero(), and PRECONDITION.
|
protectedvirtual |
Implements ocf::IBWindow.
Definition at line 675 of file ocview.cpp.
References ContainerHost, ocf::TOcContainerHost::EvOcViewSetTitle(), and WinTitle.
|
protectedvirtual |
Ask the container view window to scroll itself in a given direction.
Asked by the server when dragging or working in a clipped site.
Implements ocf::IBDropDest.
Definition at line 759 of file ocview.cpp.
References ContainerHost, ocf::TOcContainerHost::EvOcViewScroll(), HR_FALSE, and HR_NOERROR.
| void ocf::TOcView::ScrollWindow | ( | int | dx, |
| int | dy ) |
Scroll this container window a give dx,dy.
Definition at line 422 of file ocview.cpp.
References owl::TPoint::TPoint(), and Origin.
|
inline |
Definition at line 179 of file ocview.h.
References ActivePart, and TOcPart.
|
protectedvirtual |
Implements ocf::IBWindow.
Definition at line 642 of file ocview.cpp.
References ContainerHost, ocf::TOcContainerHost::EvOcViewBorderSpaceSet(), and ocf::HRFailIfZero().
|
protectedvirtual |
|
inline |
Definition at line 160 of file ocview.h.
References OcData, and TOcDataProvider.
|
inline |
|
protectedvirtual |
| void ocf::TOcView::SetupWindow | ( | HWND | hWin, |
| bool | embedded = false ) |
Definition at line 229 of file ocview.cpp.
References BDocumentI, ContainerHost, EvActivate(), ocf::IBDocument::Init(), Rename(), ServerHost, ocf::TOcContainerHost::SetWindow(), and ocf::TOcServerHost::SetWindow().
|
protected |
Called from destructor of this class or of derived class to release helpers and host interfaces.
Definition at line 148 of file ocview.cpp.
References BContainer, BDocument, ContainerHost, ocf::TOcContainerHost::ReleaseOcObject(), ocf::TOcServerHost::ReleaseOcObject(), and ServerHost.
| bool ocf::TOcView::UpdateLinks | ( | ) |
Definition at line 384 of file ocview.cpp.
References BDocumentI, ocf::HRSucceeded(), and ocf::IBDocument::UpdateLinks().
|
friend |
Definition at line 291 of file ocview.h.
References _ICLASS, and TOcControl.
|
friend |
Definition at line 292 of file ocview.h.
References _ICLASS, and TOcControlEvent.
|
friend |
Definition at line 294 of file ocview.h.
References _ICLASS, and TOcDataProvider.
|
friend |
Definition at line 295 of file ocview.h.
References _ICLASS, and TOcLinkView.
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |