OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
ocf::TOleLinkView Class Reference

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>

Inheritance diagram for ocf::TOleLinkView:
owl::TView owl::TEventHandler owl::TStreamableBase

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::TStringGetMoniker ()
 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.
 
TDocumentGetDocument ()
 Returns a reference to the view's document.
 
void SetDocument (TDocument &)
 
uint GetViewId ()
 Returns the unique ID for this view.
 
virtual TMenuDescrGetViewMenu ()
 Returns the menu descriptor for this view.
 
virtual TBarDescrGetViewBar ()
 
void SetViewMenu (TMenuDescr *menu)
 
void SetViewBar (TBarDescr *bar)
 Sets the menu descriptor for this view.
 
bool IsOK ()
 true if successfully created
 
TViewGetNextView ()
 Returns the next global view ID to be assigned.
 
virtual TWindowGetWindow ()
 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.
 
voidGetTag () 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

TOcLinkViewOcLinkView
 

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 &)
 

Detailed Description

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:

  • 1. When a user changes the server document, TOleLinkView receives a notification message
  • 2. TOleLinkView checks to see if the selection it represents has changed. If the selection has changed, TOleLinkView notifies TOcLinkView about the change.
  • 3. When TOcLinkView receives the change message, it notifies the container that the selection has changed.

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.

Definition at line 210 of file oleview.h.

Constructor & Destructor Documentation

◆ TOleLinkView()

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.

◆ ~TOleLinkView()

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().

Member Function Documentation

◆ DECLARE_RESPONSE_TABLE()

ocf::TOleLinkView::DECLARE_RESPONSE_TABLE ( TOleLinkView )
protected

◆ GetMoniker()

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.

Note
Monker is the source file's path name and the object hierarchy for a linked object. A moniker functions much like a map by showing where the linked object's data is stored and explaining how to find the data. For example, the moniker returned from a word processor for a selected range of text could be the start and end offset of a text stream. The moniker returned for a spreadsheet range could be something like A1:D6. Anything that a server application can use to map to its data can be used as a moniker.

Definition at line 655 of file oleview.cpp.

References ocf::TOcLinkView::GetMoniker(), and OcLinkView.

◆ GetViewName()

LPCTSTR ocf::TOleLinkView::GetViewName ( ) -> LPCTSTR
inlineoverridevirtual

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().

◆ StaticName()

LPCTSTR ocf::TOleLinkView::StaticName ( )
inlinestatic

Returns the constant string "Link View" that is displayed in the user interface selection box.

Definition at line 277 of file oleview.h.

References _T.

◆ UpdateLinks()

bool ocf::TOleLinkView::UpdateLinks ( )
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.

◆ VnLinkMoniker()

bool ocf::TOleLinkView::VnLinkMoniker ( owl::TString & moniker)
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.

◆ VnLinkView()

bool ocf::TOleLinkView::VnLinkView ( TOcLinkView & view)
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.

Member Data Documentation

◆ OcLinkView

TOcLinkView& ocf::TOleLinkView::OcLinkView
protected

Definition at line 224 of file oleview.h.


The documentation for this class was generated from the following files: