OWLNext 7.0
Borland's Object Windows Library for the modern age
|
Derived from TView, TOleLinkView provides embedding and linking support for a portion of a document instead of an entire document. More...
#include <ocf/oleview.h>
Public Member Functions | |
TOleLinkView (owl::TDocument &doc, TOcLinkView &view) | |
Constructs a TOleLinkView object associated with the given document object (doc) and view (view). | |
~TOleLinkView () | |
Destroys the TOleLinkView object and detaches the view from the associated document. | |
virtual bool | VnLinkView (TOcLinkView &view) |
Returns true if a TOleLinkView object is associated with the server's TOcRemView, the server's remote link view object. | |
virtual bool | VnLinkMoniker (owl::TString &moniker) |
Returns true if a TOleLinkView object is associated with the given server's TOcRemView. | |
virtual bool | UpdateLinks () |
When any changes occur to the server document, UpdateLinks updates all containers linked to the view of the server document. | |
owl::TString & | GetMoniker () |
Returns the moniker for the selection in a server document associated with this TOleLinkView container's view. | |
auto | GetViewName () -> LPCTSTR override |
Overrides TView's virtual GetViewName function and returns the static name, "Link View". | |
Public Member Functions inherited from owl::TView | |
TView (TDocument &doc) | |
Constructs a TView object of the document associated with the view. | |
virtual | ~TView () |
Frees a TView object and calls TDocument's private member function DetachView to detach the view from the associated document. | |
TDocument & | GetDocument () |
Returns a reference to the view's document. | |
void | SetDocument (TDocument &) |
uint | GetViewId () |
Returns the unique ID for this view. | |
virtual TMenuDescr * | GetViewMenu () |
Returns the menu descriptor for this view. | |
virtual TBarDescr * | GetViewBar () |
void | SetViewMenu (TMenuDescr *menu) |
void | SetViewBar (TBarDescr *bar) |
Sets the menu descriptor for this view. | |
bool | IsOK () |
true if successfully created | |
TView * | GetNextView () |
Returns the next global view ID to be assigned. | |
virtual TWindow * | GetWindow () |
Returns the TWindow instance associated with the view, or 0 if no view exists. | |
virtual bool | SetDocTitle (LPCTSTR docname, int index) |
Stores the document title. | |
bool | SetDocTitle (const tstring &docname, int index) |
virtual int | PropertyCount () |
Gets the total number of properties for the TDocument object. | |
virtual int | FindProperty (LPCTSTR name) |
return property index | |
int | FindProperty (const tstring &name) |
virtual int | PropertyFlags (int index) |
pfXxxxx bit array | |
virtual LPCTSTR | PropertyName (int index) |
locale invariant name | |
virtual int | GetProperty (int index, void *dest, int textlen=0) |
Retrieves the property identified by the given index. | |
virtual bool | SetProperty (int index, const void *src) |
Sets the value of the property, given the index of the property, and src, the data type (either binary or text) to which the property must be set. | |
void * | GetTag () const |
Retrieves the user-defined pointer attached to this view. | |
void | SetTag (void **tag) |
Associates an arbitrary (user-defined) pointer with this view. | |
Public Member Functions inherited from owl::TEventHandler | |
virtual bool | Find (TEventInfo &info, TEqualOperator op=0) |
Searches the list of response table entries looking for a match. | |
TResult | Dispatch (TEventInfo &info, TParam1, TParam2=0) |
Takes the message data from TEventInfo's Msg data member and dispatches it to the correct event-handling function. | |
TResult | DispatchMsg (TMsgId, uint id, TParam1, TParam2) |
Search for the event given the message and it and dispatch to the event handler if found. | |
Public Member Functions inherited from owl::TStreamableBase | |
virtual | ~TStreamableBase () |
Static Public Member Functions | |
static LPCTSTR | StaticName () |
Returns the constant string "Link View" that is displayed in the user interface selection box. | |
Static Public Member Functions inherited from owl::TView | |
static uint | GetNextViewId () |
Next global ID to assign. | |
static void | BumpNextViewId () |
Increments an internal count used by the Doc/View subsystem to identify each view. | |
Protected Member Functions | |
DECLARE_RESPONSE_TABLE (TOleLinkView) | |
Protected Member Functions inherited from owl::TView | |
void | NotOK () |
To flag errors in creation. | |
Protected Member Functions inherited from owl::TEventHandler | |
bool | SearchEntries (const TGenericTableEntry *entries, TEventInfo &info, TEqualOperator op) |
Low-level response table search function. | |
Protected Attributes | |
TOcLinkView & | OcLinkView |
Additional Inherited Members | |
Public Types inherited from owl::TView | |
enum | TViewProp { PrevProperty = 0 , ViewClass , ViewName , NextProperty } |
These property values, which describe the basic properties of a view, are available in classes derived from TView. More... | |
Public Types inherited from owl::TEventHandler | |
typedef bool(* | TEqualOperator) (const TGenericTableEntry &, const TEventInfo &) |
Derived from TView, TOleLinkView provides embedding and linking support for a portion of a document instead of an entire document.
With the added functionality of TOleLinkView, a container gains the ability to embed or link to a selection within the server document.
The main purpose of a class derived from TOleLinkView is to attach a view to a portion of a document whenever a link is created to a selection within a server document. After this link is established, any changes made to the linked selection in the server document are sent to the container via the following sequence of steps:
Non-Doc/View servers need to maintain a list of the TOleLinkViews attached to the document so that change notifications can be sent to each one of the views.
ocf::TOleLinkView::TOleLinkView | ( | owl::TDocument & | doc, |
TOcLinkView & | view ) |
Constructs a TOleLinkView object associated with the given document object (doc) and view (view).
Definition at line 579 of file oleview.cpp.
ocf::TOleLinkView::~TOleLinkView | ( | ) |
Destroys the TOleLinkView object and detaches the view from the associated document.
Definition at line 591 of file oleview.cpp.
References OcLinkView, and ocf::TOcLinkView::Release().
|
protected |
TString & ocf::TOleLinkView::GetMoniker | ( | ) |
Returns the moniker for the selection in a server document associated with this TOleLinkView container's view.
By looking at the moniker, the application can find the corresponding objects in its document.
Definition at line 655 of file oleview.cpp.
References ocf::TOcLinkView::GetMoniker(), and OcLinkView.
Overrides TView's virtual GetViewName function and returns the static name, "Link View".
Implements owl::TView.
Definition at line 284 of file oleview.h.
References StaticName().
|
inlinestatic |
|
virtual |
When any changes occur to the server document, UpdateLinks updates all containers linked to the view of the server document.
If successful, it returns true.
Definition at line 636 of file oleview.cpp.
References ocf::TOcLinkView::Invalidate(), ocf::invView, and OcLinkView.
|
virtual |
Returns true if a TOleLinkView object is associated with the given server's TOcRemView.
In contrast to VnLinkView, this function searches for the view using the specified server's moniker. When the document receives a request for the TOleLinkView associated with a particular moniker, the document sends a vnLinkView notification message to all its attached views. The handler for vnLinkMoniker in TOleLinkView simply returns true if the handler finds a view associated with the moniker.
Definition at line 622 of file oleview.cpp.
References ocf::TOcLinkView::GetMoniker(), and OcLinkView.
|
virtual |
Returns true if a TOleLinkView object is associated with the server's TOcRemView, the server's remote link view object.
A TOcRemView is the object created by a linking and embedding server so that the server can draw its OLE object in a metafile used by the container. In contrast to VnLinkMoniker, this function searches for the TOleLinkView object using a reference to the view.
Definition at line 604 of file oleview.cpp.
References OcLinkView.
|
protected |