7#if !defined(OCF_OLEVIEW_H)
11#if defined(BI_HAS_PRAGMA_ONCE)
28#if defined(OWL5_COMPAT)
47 template <owl::u
int NotificationCode>
54 template <
class T,
bool (T::*M)(owl::TRect&)>
58 return (p2 != 0 && (
static_cast<T*
>(i)->*M)(*
reinterpret_cast<owl::TRect*
>(p2))) ? TRUE : FALSE;
64 template <
class T,
bool (T::*M)(TOcLinkView&)>
68 return (p2 != 0 && (
static_cast<T*
>(i)->*M)(*
reinterpret_cast<TOcLinkView*
>(p2))) ? TRUE : FALSE;
74 template <
class T,
bool (T::*M)(owl::TString&)>
78 return (p2 != 0 && (
static_cast<T*
>(i)->*M)(*
reinterpret_cast<owl::TString*
>(p2))) ? TRUE : FALSE;
82#define OCF_EV_VN_(notificationCode, method)\
83 VN_DEFINE(notificationCode, method, ::ocf::TDocViewDispatch<WM_OWLNOTIFY>::TNotificationDispatch<notificationCode>::Decode)
85#define EV_VN_INVALIDATE OCF_EV_VN_(vnInvalidate, VnInvalidate)
86#define EV_VN_LINKVIEW OCF_EV_VN_(vnLinkView, VnLinkView)
87#define EV_VN_LINKMONIKER OCF_EV_VN_(vnLinkMoniker, VnLinkMoniker)
134 auto SetDocTitle(LPCTSTR docname,
int index) ->
bool override;
180 bool VnIsWindow(HWND hWnd);
241 return _T(
"Ole View");
262# if defined(BI_COMP_BORLANDC)
278 return _T(
"Link View");
#define PRECONDITION(condition)
Used to obtain the item name for building monikers.
Link Viewer object for a server document.
Use when doing parts save and load.
The TOcView partner is a container (viewer) of a given (server/client) document.
virtual bool UpdateLinks()
When any changes occur to the server document, UpdateLinks updates all containers linked to the view ...
DECLARE_RESPONSE_TABLE(TOleLinkView)
auto GetViewName() -> LPCTSTR override
Overrides TView's virtual GetViewName function and returns the static name, "Link View".
owl::TString & GetMoniker()
Returns the moniker for the selection in a server document associated with this TOleLinkView containe...
virtual bool VnLinkMoniker(owl::TString &moniker)
Returns true if a TOleLinkView object is associated with the given server's TOcRemView.
TOleLinkView(owl::TDocument &doc, TOcLinkView &view)
Constructs a TOleLinkView object associated with the given document object (doc) and view (view).
virtual bool VnLinkView(TOcLinkView &view)
Returns true if a TOleLinkView object is associated with the server's TOcRemView, the server's remote...
static LPCTSTR StaticName()
Returns the constant string "Link View" that is displayed in the user interface selection box.
The OLE2 window view class. Used as a view in doc/view model.
bool EvOcViewClose()
Asks the server to close the view associated with this document.
bool VnDocOpened(int omode)
Ensures that TOleView's data members, such as DragPart, Pos, and Scale, are initialized properly afte...
auto GetViewMenu() -> owl::TMenuDescr *override
Overrides TView's GetViewMenu to make an on-the-fly decision about which menu to use: normal,...
auto GetFileName() -> LPCTSTR override
auto SetDocTitle(LPCTSTR docname, int index) -> bool override
Overrides TView's and TWindow's virtual SetDocTitle function and stores the title of the document ass...
bool EvOcViewGetItemName(TOcItemName &item)
Finds the item name for whole document or for the selection.
auto CanClose() -> bool override
A view uses this function to verify whether or not it can shut down.
static LPCTSTR StaticName()
Returns the constant string "Ole View" that is displayed in the user interface selection box.
bool EvOcViewAttachWindow(bool attach)
Attaches this view to its ObjectWindows parent window so the embedded object can be either opened and...
auto CreateOcView(owl::TRegLink *, bool isEmbedded, IUnknown *outer) -> TOcView *override
Override TOleWindow's version to pass info to TOleDocument & provide a second chance to find the RegL...
bool EvOcViewLoadPart(TOcSaveLoad &ocLoad)
Asks the server to load itself from storage.
TOleView(owl::TDocument &doc, owl::TWindow *parent=0)
Constructs a TOleView object associated with the given document object (doc) and parent window (paren...
bool EvOcViewSavePart(TOcSaveLoad &ocSave)
Asks the server to save the embedded object's data to storage.
bool VnDocClosed(int omode)
Sets the OcDoc data member to 0.
auto GetViewName() -> LPCTSTR override
Overrides TView's virtual GetViewName function and returns the name of the class (TOleView).
bool VnInvalidate(owl::TRect &rect)
Invalidates the view region specified by p.
bool EvOcViewSetLink(TOcLinkView &view)
Responds to an OC_VIEWSETLINK message TOcLinkView sends when the server document provides a link to a...
bool EvOcViewBreakLink(TOcLinkView &view)
Responds to an OC_VIEWBREAKLINK message that TOcLinkView sends when the server document that provides...
void CleanupWindow() override
Performs a normal CleanupWindow. Also lets the OcView object know we have closed.
bool EvOcViewOpenDoc(LPCTSTR path)
Asks the container application to open an existing document so the document can receive embedded and ...
bool EvOcViewInsMenus(TOcMenuDescr &sharedMenu)
Inserts the server's menu into the composite menu.
auto EvOcViewPartInvalid(TOcPartChangeInfo &changeInfo) -> bool override
Notifies the active view of any changes made to the embedded object's data (changeInfo).
auto OleShutDown() -> bool override
Shuts down the associated OCF partners if possible.
auto GetWindow() -> owl::TWindow *override
Overrides TView's virtual GetWindow function and returns the TWindow instance associated with this vi...
bool OtherViewExists()
Checks whether another TOleView already exists.
TOleWindow(owl::TWindow *parent=0, owl::TModule *module=0)
Constructs a TOleWindow object associated with the specified parent window and module instance.
virtual LPCTSTR GetFileName()
On linking must be implemented and return the file name.
An abstract base class, TDocument is the base class for all document objects and serves as an interfa...
LPCTSTR GetTitle() const
Returns the title of the document.
TRect is a mathematical class derived from tagRect.
A linked structure in which each node points to a list of TRegList objects (or TRegList-derived objec...
Reference to reference counted string object TUString Lightweight reference object consisting of a po...
Abstract base class for view access from document.
virtual LPCTSTR GetViewName()=0
Pure virtual function that returns 0.
TDocument & GetDocument()
Returns a reference to the view's document.
virtual TWindow * GetWindow()
Returns the TWindow instance associated with the view, or 0 if no view exists.
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
virtual bool SetDocTitle(LPCTSTR docname, int index)
Default behavior for updating document title is to pass it to parent frame.
Definition of class TDocManager.
Definition of classes TDocument, TView, TWindowView, TStream, TInStream, TOutStream.
#define DECLARE_STREAMABLE_INLINES(cls)
Object Component Framework (COM encapsulation).
const owl::uint vnInvalidate
const owl::uint vnLinkMoniker
const owl::uint vnLinkView
UINT TMsgId
Message ID type.
LPARAM TParam2
Second parameter type.
WPARAM TParam1
First parameter type.
LRESULT TResult
Result type.
TOleWindow - Class encapsulating a window which can be an OLE container or server window.
static TResult Decode(void *i, TParam1, TParam2 p2)
static TResult Decode(void *i, TParam1, TParam2 p2)
static TResult Decode(void *i, TParam1, TParam2 p2)
static const owl::TMsgId MessageId