7#if !defined(OCF_OLEVIEW_H)
11#if defined(BI_HAS_PRAGMA_ONCE)
28#if defined(OWL5_COMPAT)
47 template <owl::u
int NotificationCode>
48 struct TNotificationDispatch;
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)
128 static LPCTSTR StaticName();
132 auto GetViewName() -> LPCTSTR
override;
134 auto SetDocTitle(LPCTSTR docname,
int index) ->
bool override;
135 auto OleShutDown() ->
bool override;
139 auto CanClose() ->
bool override;
143 void CleanupWindow()
override;
144 bool OtherViewExists();
149 bool VnDocOpened(
int omode);
150 bool VnDocClosed(
int omode);
154 auto GetFileName() -> LPCTSTR
override;
164 bool EvOcViewClose();
167 bool EvOcViewOpenDoc(LPCTSTR path);
169 bool EvOcViewAttachWindow(
bool attach);
180 bool VnIsWindow(HWND hWnd);
217 virtual bool UpdateLinks();
220 static LPCTSTR StaticName();
221 auto GetViewName() -> LPCTSTR
override;
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.
Derived from TView, TOleLinkView provides embedding and linking support for a portion of a document i...
DECLARE_RESPONSE_TABLE(TOleLinkView)
auto GetViewName() -> LPCTSTR override
Overrides TView's virtual GetViewName function and returns the static name, "Link View".
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.
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...
static LPCTSTR StaticName()
Returns the constant string "Ole View" that is displayed in the user interface selection box.
auto GetViewName() -> LPCTSTR override
Overrides TView's virtual GetViewName function and returns the name of the class (TOleView).
auto GetWindow() -> owl::TWindow *override
Overrides TView's virtual GetWindow function and returns the TWindow instance associated with this vi...
The generic OLE2 window. Use as a client of a frame window.
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.
TDocument & GetDocument()
Returns a reference to the view's document.
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_RESPONSE_TABLE(cls)
#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.
#define DECLARE_STREAMABLE_OCF(cls, ver)
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)