OWLNext 7.0
Borland's Object Windows Library for the modern age
|
Remote Viewer object for a server document. More...
#include <ocf/ocremvie.h>
Public Types | |
enum | TState { Hidden , Closing , OpenEditing , InPlaceActive } |
enum | TKind { DontKnow , Embedding , LoadFromFile , Link } |
Protected Member Functions | |
HRESULT _IFUNC | Init (LPCOLESTR path) |
This is called when we want to create a part from data saved in the storage named "path". | |
HRESULT _IFUNC | GetPart (IBPart **, LPCOLESTR) |
HRESULT _IFUNC | BringToFront () |
Show the container window. | |
HRESULT | QueryObject (const IID &iid, void **iface) |
void _IFUNC | DragFeedback (owl::TPoint *p, const owl::TRect *r, TOcMouseAction a, owl::uint cf, HRESULT &hr) |
HRESULT _IFUNC | AllowInPlace () |
Check option flag to see if in place activation is allowed. | |
owl::uint _IFUNC | CountFormats () |
HRESULT _IFUNC | GetFormat (owl::uint index, TOcFormatInfo *fmt) |
HANDLE _IFUNC | GetFormatData (TOcFormatInfo *) |
Request native data for pasting into client application. | |
HRESULT _IFUNC | SetFormatData (TOcFormatInfo *fmt, HANDLE data, BOOL release) |
Request native data for pasting into client application. | |
HRESULT _IFUNC | Draw (HDC, const RECTL *, const RECTL *, TOcAspect, TOcDraw bd) |
Render the view in the DC provided. | |
HRESULT _IFUNC | Save (IStorage *, BOOL sameAsLoad, BOOL remember) |
Save the document that we are a view on. | |
HRESULT _IFUNC | Init (IBSite *, TOcInitInfo *) |
Load the associated document and activate the remote view. | |
HRESULT _IFUNC | Close () |
Close the remote view window, & if canShutDown is true, try to close the server app too. | |
HRESULT _IFUNC | CanOpenInPlace () |
Query to determine if this server view can open in place. | |
HRESULT _IFUNC | SetPartSize (owl::TSize *) |
HRESULT _IFUNC | SetPartPos (owl::TRect *) |
Set a new position for our document within its container. | |
HRESULT _IFUNC | Activate (BOOL) |
Activate this view. | |
HRESULT _IFUNC | Show (BOOL) |
Show/Hide the server view window. | |
HRESULT _IFUNC | Open (BOOL) |
Start or end open editing Work with the window Z-order and parenting. | |
HRESULT _IFUNC | EnumVerbs (TOcVerb *) |
Enumerate the verbs for our document. | |
HRESULT _IFUNC | DoVerb (owl::uint) |
Perform a verb on our document. | |
HWND _IFUNC | OpenInPlace (HWND) |
Open or close this view as an in-place edit session. | |
HRESULT _IFUNC | InsertMenus (HMENU, TOcMenuWidths *) |
Insert the server's menus into the shared menubar. | |
HRESULT _IFUNC | ShowTools (BOOL) |
Show or hide the tool windows used by our view. | |
void _IFUNC | FrameResized (const owl::TRect *, BOOL) |
A container window has resized. | |
HRESULT _IFUNC | DragFeedback (owl::TPoint *, BOOL) |
Let the server provide drag feedback. | |
HRESULT _IFUNC | GetPalette (LOGPALETTE **) |
Optional palette query for. | |
HRESULT _IFUNC | SetHost (IBContainer *objContainer) |
HRESULT _IFUNC | DoQueryInterface (const IID &iid, void **pif) |
LPOLESTR _IFUNC | GetName (TOcPartName) |
void | Init () |
Do real constructor work. | |
~TOcRemView () | |
Protected Member Functions inherited from ocf::TOcView | |
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 &iid, void **iface) |
Callback from TUnknown's implementation of QueryInterface. | |
HRESULT _IFUNC | Init (LPCOLESTR) |
Ask the container to load document named 'path'. | |
HRESULT _IFUNC | GetPart (IBPart **, LPCOLESTR) |
owl::uint _IFUNC | CountFormats () |
Format count. | |
HRESULT _IFUNC | GetFormat (owl::uint, TOcFormatInfo *) |
Format retrieval. | |
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 *) |
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 *) |
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 &iid, void **pif) |
QueryObject used when TUnknown is in constructor/destructor. | |
Protected Attributes | |
IBContainer * | BContainerI |
IBLinkable * | BLSiteI |
for site moniker | |
IUnknown * | BSite |
In-place site helper. | |
IBSite * | BSiteI |
Site interface. | |
IBApplication * | BAppI |
Site's application interface. | |
HWND | HRealParent |
View's real parent. | |
TOcToolBarInfo | ToolBarInfo |
Inplace tool bar info. | |
TState | State |
Current state of this server view. | |
TKind | Kind |
What kind of server view this is. | |
Protected Attributes inherited from ocf::TOcView | |
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 |
Remote Viewer object for a server document.
Definition at line 26 of file ocremvie.h.
Enumerator | |
---|---|
DontKnow | What kind of server view this is. Don't know yet, wait for Init() |
Embedding | Normal Embedding. |
LoadFromFile | Transient load-from-file. |
Link | Load-from-file is really a link. |
Definition at line 63 of file ocremvie.h.
Enumerator | |
---|---|
Hidden | Current state of this server view. Hidden & ready to go |
Closing | Shutting down. |
OpenEditing | Open editing. |
InPlaceActive | Inplace active. |
Definition at line 57 of file ocremvie.h.
ocf::TOcRemView::TOcRemView | ( | TOcDocument & | doc, |
TOcContainerHost * | cs, | ||
TOcServerHost * | ss, | ||
owl::TRegList * | regList = 0, | ||
IUnknown * | outer = 0 ) |
New constructor that uses host interfaces.
Definition at line 44 of file ocremvie.cpp.
ocf::TOcRemView::TOcRemView | ( | TOcDocument & | doc, |
owl::TRegList * | regList = 0, | ||
IUnknown * | outer = 0 ) |
Constructor for compatibility only.
Definition at line 30 of file ocremvie.cpp.
|
protected |
Definition at line 93 of file ocremvie.cpp.
References BSite, Closing, EvClose(), ocf::TOcServerHost::EvOcViewClose(), Kind, LoadFromFile, ocf::TOcView::ServerHost, ocf::TOcView::Shutdown(), and State.
Activate this view.
Implements ocf::IBPart.
Definition at line 702 of file ocremvie.cpp.
References ocf::TOcView::GetWindow(), and HR_NOERROR.
Definition at line 155 of file ocremvie.cpp.
References ocf::TUnknown::GetOuter().
Check option flag to see if in place activation is allowed.
Implements ocf::IBContainer.
Definition at line 200 of file ocremvie.cpp.
References HR_FALSE, HR_NOERROR, ocf::TOcView::IsOptionSet(), OpenEditing, State, ocf::voNoInPlace, and ocf::voNoNestedInPlace.
Show the container window.
Implements ocf::IBContainer.
Definition at line 190 of file ocremvie.cpp.
References ocf::TOcView::BringToFront(), and HR_NOERROR.
Query to determine if this server view can open in place.
Implements ocf::IBPart.
Definition at line 655 of file ocremvie.cpp.
References HR_FALSE, HR_NOERROR, ocf::TOcView::IsOptionSet(), and ocf::voNoInPlaceServer.
Close the remote view window, & if canShutDown is true, try to close the server app too.
Implements ocf::IBPart.
Definition at line 632 of file ocremvie.cpp.
References ocf::amExeMode, Closing, EvClose(), ocf::TOcServerHost::EvOcGetWindow(), HR_NOERROR, ocf::TOcApp::IsOptionSet(), ocf::TOcView::OcApp, ocf::TOcView::ServerHost, State, owl::ToBool(), and TRACEX.
Implements ocf::IBDataNegotiator.
Definition at line 449 of file ocremvie.cpp.
References ocf::TOcView::CountFormats().
void ocf::TOcRemView::Disconnect | ( | ) |
Disconnect from the client site.
Definition at line 227 of file ocremvie.cpp.
References BSiteI, ocf::IBSite::Disconnect(), and TRACEX.
Implements ocf::IBPart.
Definition at line 1067 of file ocremvie.cpp.
References PRECONDITION, and ocf::TOcView::QueryInterface().
Perform a verb on our document.
Implements ocf::IBPart.
Definition at line 789 of file ocremvie.cpp.
References ocf::TOcServerHost::EvOcViewDoVerb(), ocf::HRFailIfZero(), and ocf::TOcView::ServerHost.
|
protectedvirtual |
Let the server provide drag feedback.
Implements ocf::IBPart.
Definition at line 1040 of file ocremvie.cpp.
References ocf::TOcServerHost::EvOcViewDrag(), ocf::HRFailIfZero(), PRECONDITION, and ocf::TOcView::ServerHost.
|
protectedvirtual |
Implements ocf::IBDropDest.
Definition at line 176 of file ocremvie.cpp.
References ocf::TOcView::DragFeedback().
|
protectedvirtual |
Render the view in the DC provided.
May be a MetaFile Packup all the args & forward message to real view to paint
Implements ocf::IBDataProvider.
Definition at line 505 of file ocremvie.cpp.
References ocf::amExeModule, ocf::drShadingOnly, ocf::TOcServerHost::EvOcViewPaint(), ocf::TOcServerHost::EvOcViewSetScale(), ocf::TOcView::Extent, owl::TRect::Height(), HR_NOERROR, ocf::HRFailIfZero(), ocf::TOcApp::IsOptionSet(), owl::TRect::Normalize(), ocf::TOcView::OcApp, PRECONDITION, ocf::TOcView::ServerHost, owl::TRect::SetEmpty(), and owl::TRect::Width().
Enumerate the verbs for our document.
Implements ocf::IBPart.
Definition at line 780 of file ocremvie.cpp.
References HR_FAIL.
|
virtual |
Reimplemented from ocf::TOcView.
Definition at line 250 of file ocremvie.cpp.
References BLSiteI, BSite, ocf::TOcDocument::Close(), ocf::TOcView::EvClose(), ocf::TOcView::OcDocument, ocf::IBLinkable::OnRename(), and TRACEX.
Set focus to the inplace server.
Reimplemented from ocf::TOcView.
Definition at line 239 of file ocremvie.cpp.
References BSiteI, ocf::TOcView::EvSetFocus(), and ocf::IBSite::OnSetFocus().
|
protectedvirtual |
A container window has resized.
Perform any necessary adjustment of our tools.
Implements ocf::IBPart.
Definition at line 1022 of file ocremvie.cpp.
References ToolBarInfo.
TString ocf::TOcRemView::GetContainerTitle | ( | ) |
Get the window text of the container.
Definition at line 280 of file ocremvie.cpp.
References _T, BContainerI, and ocf::IBWindow::GetWindowTitle().
|
protectedvirtual |
Implements ocf::IBDataNegotiator.
Definition at line 455 of file ocremvie.cpp.
References ocf::TOcView::GetFormat().
|
protectedvirtual |
Request native data for pasting into client application.
This is only called at paste time (not at copy time).
Implements ocf::IBDataProvider.
Definition at line 468 of file ocremvie.cpp.
References ocf::TOcServerHost::EvOcViewClipData(), ocf::TOcFormatList::Find(), ocf::TOcView::FormatList, PRECONDITION, and ocf::TOcView::ServerHost.
Get the initial size and position from the app.
Definition at line 291 of file ocremvie.cpp.
References BSiteI, ocf::TOcServerHost::EvOcViewPartSize(), ocf::TOcView::Extent, ocf::IBSite::GetSiteRect(), ocf::TOcView::Origin, and ocf::TOcView::ServerHost.
|
inline |
Definition at line 70 of file ocremvie.h.
|
protectedvirtual |
Implements ocf::IBPart.
Definition at line 1075 of file ocremvie.cpp.
|
protectedvirtual |
Optional palette query for.
Implements ocf::IBPart.
Definition at line 1053 of file ocremvie.cpp.
References ocf::TOcServerHost::EvOcViewGetPalette(), ocf::HRFailIfZero(), PRECONDITION, and ocf::TOcView::ServerHost.
Implements ocf::IBContains.
Definition at line 437 of file ocremvie.cpp.
References ocf::TOcView::GetPart(), Kind, Link, and LoadFromFile.
|
virtual |
Return the 'size' of the document that this view in on.
Implements ocf::IBDataProvider.
Definition at line 576 of file ocremvie.cpp.
References ocf::TOcView::Extent, and HR_NOERROR.
|
inline |
Definition at line 69 of file ocremvie.h.
|
protected |
Do real constructor work.
Definition at line 61 of file ocremvie.cpp.
References ocf::amDebug, ocf::amExeModule, BAppI, BContainerI, BLSiteI, ocf::TOcApp::BOleComponentCreate(), BSite, BSiteI, ocf::cidBOleInProcSite, ocf::cidBOleSite, ocf::IBSite::Init(), ocf::TOcApp::IsOptionSet(), owl::TRegList::Lookup(), ocf::TOcView::OcApp, OleStr, ocf::TOcView::RegList, and Release().
|
protectedvirtual |
Load the associated document and activate the remote view.
Implements ocf::IBPart.
Definition at line 601 of file ocremvie.cpp.
References Activate(), Embedding, ocf::TOcServerHost::EvOcViewLoadPart(), GetInitialRect(), HR_FAIL, HR_NOERROR, ocf::iwNew, ocf::iwStorage, Kind, PRECONDITION, ocf::TOcView::ServerHost, and Show().
This is called when we want to create a part from data saved in the storage named "path".
Implements ocf::IBContains.
Definition at line 398 of file ocremvie.cpp.
References ocf::TOcView::BDocumentI, ocf::TOcView::ContainerHost, ocf::TOcContainerHost::EvOcGetWindow(), ocf::TOcServerHost::EvOcViewAttachWindow(), ocf::TOcContainerHost::EvOcViewOpenDoc(), GetInitialRect(), HR_FAIL, HR_NOERROR, ocf::IBDocument::Init(), Kind, LoadFromFile, ocf::TOcView::OcDocument, OleStr, OpenEditing, PRECONDITION, ocf::TOcView::ServerHost, ocf::TOcDocument::SetName(), ocf::TOcContainerHost::SetWindow(), and State.
|
protectedvirtual |
Insert the server's menus into the shared menubar.
Implements ocf::IBPart.
Definition at line 833 of file ocremvie.cpp.
References ocf::TOcServerHost::EvOcViewInsMenus(), HR_FAIL, HR_NOERROR, PRECONDITION, and ocf::TOcView::ServerHost.
void ocf::TOcRemView::Invalidate | ( | TOcInvalidate | invalid | ) |
Invalidate the site within the active view.
Definition at line 217 of file ocremvie.cpp.
References BSiteI, and ocf::IBSite::Invalidate().
Load remote view specific information.
Definition at line 358 of file ocremvie.cpp.
References ocf::TOcView::Extent, ocf::HRSucceeded(), ocf::TOcView::Origin, ocf::RemViewStreamName, and ocf::TOcStorage::Stat().
Start or end open editing Work with the window Z-order and parenting.
Implements ocf::IBPart.
Definition at line 725 of file ocremvie.cpp.
References BAppI, BContainerI, ocf::TOcView::BDocumentI, BringToFront(), ocf::TOcServerHost::EvOcViewAttachWindow(), ocf::TOcServerHost::EvOcViewSetTitle(), owl::GetGlobalModule(), ocf::IBWindow::GetWindow(), ocf::IBWindow::GetWindowTitle(), HR_NOERROR, ocf::IBDocument::Init(), InPlaceActive, Kind, Link, LoadFromFile, owl::TModule::LoadString(), OleStr, ocf::IBDocument::OnClose(), OpenEditing, ocf::TOcView::RegList, ocf::TOcView::ServerHost, and State.
Open or close this view as an in-place edit session.
If hWndParent is 0, then in-place is closing
Implements ocf::IBPart.
Definition at line 799 of file ocremvie.cpp.
References ocf::TOcPart::Activate(), ocf::TOcView::ActivePart, ocf::TOcView::BDocumentI, ocf::TOcServerHost::EvOcViewAttachWindow(), ocf::TOcView::GetWindow(), Hidden, ocf::IBDocument::Init(), InPlaceActive, ocf::TOcView::OcApp, ocf::IBDocument::OnClose(), ocf::TOcView::ServerHost, Show(), and State.
Definition at line 167 of file ocremvie.cpp.
References ocf::TUnknown::GetOuter().
Definition at line 129 of file ocremvie.cpp.
References BSite, PRECONDITION, and ocf::TOcView::QueryObject().
Definition at line 161 of file ocremvie.cpp.
References ocf::TUnknown::GetOuter().
|
virtual |
Should only be called by the owner/creator of this object.
Reimplemented from ocf::TOcView.
Definition at line 119 of file ocremvie.cpp.
References AddRef(), and ocf::TOcView::ReleaseObject().
|
virtual |
Update monikers with new name.
Reimplemented from ocf::TOcView.
Definition at line 265 of file ocremvie.cpp.
References BLSiteI, PRECONDITION, and ocf::TOcView::Rename().
|
protectedvirtual |
Save the document that we are a view on.
Implements ocf::IBDataProvider.
Definition at line 586 of file ocremvie.cpp.
References ocf::TOcServerHost::EvOcViewSavePart(), ocf::HRFailIfZero(), PRECONDITION, ocf::TOcView::ServerHost, and owl::ToBool().
Save remote view specific information to compound file.
Definition at line 330 of file ocremvie.cpp.
References ocf::TOcView::Extent, ocf::TOcView::Origin, ocf::RemViewStreamName, and ocf::TOcStorage::Stat().
Definition at line 160 of file ocremvie.h.
References BAppI, ocf::HRIsOK(), OleStr, and ocf::IBWindow::SetStatusText().
|
protectedvirtual |
Request native data for pasting into client application.
This is only called at paste time (not at copy time).
Implements ocf::IBDataProvider2.
Definition at line 486 of file ocremvie.cpp.
References ocf::TOcServerHost::EvOcViewSetData(), ocf::TOcFormatList::Find(), ocf::TOcView::FormatList, HR_FAIL, HR_NOERROR, PRECONDITION, and ocf::TOcView::ServerHost.
|
protectedvirtual |
|
inline |
Definition at line 74 of file ocremvie.h.
|
protectedvirtual |
Set a new position for our document within its container.
Implements ocf::IBPart.
Definition at line 667 of file ocremvie.cpp.
References BSiteI, CHECK, ocf::TOcServerHost::EvOcViewSetScale(), ocf::TOcView::GetWindow(), ocf::IBSite::GetZoom(), HR_NOERROR, ocf::TOcView::Origin, and ocf::TOcView::ServerHost.
|
protectedvirtual |
Implements ocf::IBPart.
Definition at line 692 of file ocremvie.cpp.
References ocf::TOcView::Extent, and HR_NOERROR.
Show/Hide the server view window.
Implements ocf::IBPart.
Definition at line 713 of file ocremvie.cpp.
References ocf::TOcView::GetWindow(), and HR_NOERROR.
Show or hide the tool windows used by our view.
Implements ocf::IBPart.
Definition at line 936 of file ocremvie.cpp.
References BAppI, ocf::TOcServerHost::EvOcViewShowTools(), ocf::IBWindow::GetWindow(), ocf::IBWindow::GetWindowRect(), HR_FAIL, HR_NOERROR, ocf::TOcView::OcApp, ocf::IBWindow::RequestBorderSpace(), ocf::TOcView::ServerHost, ocf::IBWindow::SetBorderSpace(), and ToolBarInfo.
|
protected |
Site's application interface.
Definition at line 147 of file ocremvie.h.
|
protected |
Definition at line 143 of file ocremvie.h.
|
protected |
for site moniker
Definition at line 144 of file ocremvie.h.
|
protected |
In-place site helper.
Definition at line 145 of file ocremvie.h.
|
protected |
Site interface.
Definition at line 146 of file ocremvie.h.
|
protected |
View's real parent.
Definition at line 148 of file ocremvie.h.
|
protected |
What kind of server view this is.
Definition at line 152 of file ocremvie.h.
|
protected |
Current state of this server view.
Definition at line 151 of file ocremvie.h.
|
protected |
Inplace tool bar info.
Definition at line 149 of file ocremvie.h.