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>
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 _T, AddRef(), ocf::amDebug, BContainer, BDocument, BDocumentI, BLDocumentI, ocf::TOcApp::BOleComponentCreate(), ocf::cidBOleContainer, ocf::cidBOleDocument, ocf::IBRootLinkable::Init(), ocf::TOcApp::IsOptionSet(), OcApp, OcDocument, OleStr, RegisterClipFormats(), Release(), 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 AddRef(), ocf::amDebug, BContainer, BDocument, BDocumentI, BLDocumentI, ocf::TOcApp::BOleComponentCreate(), ocf::cidBOleContainer, ocf::cidBOleDocument, ocf::IBRootLinkable::Init(), ocf::TOcApp::IsOptionSet(), OcApp, OcDocument, OleStr, RegisterClipFormats(), Release(), ocf::TOcDocument::SetActiveView(), ocf::TUnknown::SetOuter(), and TRACEX.
|
protected |
Definition at line 138 of file ocview.cpp.
References Shutdown().
Activate a given part.
Definition at line 444 of file ocview.cpp.
References ocf::TOcPart::Activate(), ActivePart, and ocf::TOcPart::IsActive().
|
inline |
Implements ocf::IBContainer.
Definition at line 830 of file ocview.cpp.
References HR_FALSE, HR_NOERROR, IsOptionSet(), and ocf::voNoInPlace.
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.
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 ContainerHost, ocf::TOcContainerHost::EvOcViewDrop(), HR_FAIL, HR_NOERROR, OcDocument, PasteNative(), PRECONDITION, Rename(), and TOcPart.
bool ocf::TOcView::EnumLinks | ( | IBLinkInfo ** | linkInfo | ) |
Definition at line 364 of file ocview.cpp.
References BDocumentI, ocf::IBDocument::EnumLinks(), ocf::HRSucceeded(), and PRECONDITION.
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().
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().
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::TOcLinkCollection::Add(), CHECK, ocf::TOcLinkCollection::Detach(), ocf::DocContent, ocf::TOcServerHost::EvOcViewSetLink(), ocf::TOcLinkCollection::Find(), ocf::TOcDocument::GetViews(), OcDocument, OleStr, RegList, ServerHost, 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 |
|
inline |
|
inline |
|
inline |
Implements ocf::IBContains.
Definition at line 507 of file ocview.cpp.
References GetDocLink(), ocf::TOcDocument::GetParts(), HR_FAIL, HR_NOERROR, OcDocument, OleStr, and PRECONDITION.
|
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 GetWindowRect().
|
protectedvirtual |
Implements ocf::IBWindow.
Definition at line 581 of file ocview.cpp.
References GetWindow(), HR_NOERROR, and PRECONDITION.
Implements ocf::IBWindow.
Definition at line 593 of file ocview.cpp.
References ContainerHost, ocf::TOcContainerHost::EvOcViewTitle(), and OrgTitle.
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(), and GetWindow().
|
inline |
Definition at line 857 of file ocview.h.
References Options, and owl::ToBool().
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::Handle, ocf::TOcInitInfo::How, ocf::ihEmbed, ocf::iwHandle, ocf::TOcInitInfo::ReleaseDataObject(), ServerHost, and ocf::TOcInitInfo::Where.
Callback from TUnknown's implementation of QueryInterface.
Definition at line 190 of file ocview.cpp.
References BContainer, BDocument, GetDocLink(), HR_NOINTERFACE, and PRECONDITION.
bool ocf::TOcView::RegisterClipFormats | ( | owl::TRegList & | regList | ) |
Register the clipboard formats supported.
Definition at line 845 of file ocview.cpp.
References _istdigit, _T, _tcschr, _tcscpy, _ttoi, _USES_CONVERSION, _W2A, ocf::TOcFormatList::Add(), FormatList, and OcApp.
|
inline |
|
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.
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.
Scroll this container window a give dx,dy.
Definition at line 422 of file ocview.cpp.
References Origin.
|
protectedvirtual |
Implements ocf::IBWindow.
Definition at line 642 of file ocview.cpp.
References ContainerHost, ocf::TOcContainerHost::EvOcViewBorderSpaceSet(), and ocf::HRFailIfZero().
|
inline |
|
inline |
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().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |