OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
oclink.h
Go to the documentation of this file.
1//----------------------------------------------------------------------------
2// ObjectComponents
3// Copyright (c) 1994, 1996 by Borland International, All Rights Reserved
4/// \file
5/// Definition of TOcLinkView Class
6//----------------------------------------------------------------------------
7
8#if !defined(OCF_OCLINK_H)
9#define OCF_OCLINK_H
10
11#include <owl/private/defs.h>
12#if defined(BI_HAS_PRAGMA_ONCE)
13# pragma once
14#endif
15
16#include <owl/geometry.h>
17
18#include <owl/contain.h>
19#include <owl/template.h>
20
21#include <ocf/ocbocole.h>
22#include <ocf/ocreg.h>
23#include <ocf/ocobject.h>
24
25
26
27
28namespace ocf {
29
30class _ICLASS TOcView;
31
32//
33/// \class TOcLinkView
34// ~~~~~ ~~~~~~~~~~~
35/// Link Viewer object for a server document
36//
38// public IBPart2 {
39 public IBPart {
40 public:
41 TOcLinkView(TOcView* ocView, owl::TRegList* regList = 0, IUnknown* outer = 0);
42 int Detach();
43
44 // IBSite pass-thrus
45 //
46 void Invalidate(TOcInvalidate);
47 void Disconnect();
48
49 // Misc status accessors, etc.
50 //
51 void GetLinkRect();
52 void SetMoniker(LPCTSTR name);
53 owl::TString& GetMoniker() {return Moniker;};
54
55 // Object reference & lifetime managment
56 //
57 owl::ulong _IFUNC AddRef() {return GetOuter()->AddRef();}
58 owl::ulong _IFUNC Release() {return GetOuter()->Release();}
59 HRESULT _IFUNC QueryInterface(const GUID & iid, void ** iface)
60 {return GetOuter()->QueryInterface(iid, iface);}
61
62 protected:
63 // TUnknown virtual overrides
64 //
65 HRESULT QueryObject(const IID & iid, void * * iface);
66
67 // IBDataNegotiator implementation
68 //
69 owl::uint _IFUNC CountFormats();
70 HRESULT _IFUNC GetFormat(owl::uint index, TOcFormatInfo * fmt);
71
72 // IBDataProvider2 implementation
73 //
74 HANDLE _IFUNC GetFormatData(TOcFormatInfo *);
75 HRESULT _IFUNC Draw(HDC, const RECTL *, const RECTL *, TOcAspect, TOcDraw bd);
76 HRESULT _IFUNC GetPartSize(owl::TSize *);
77 HRESULT _IFUNC Save(IStorage*, BOOL sameAsLoad, BOOL remember);
78// HRESULT _IFUNC SetFormatData(TOcFormatInfo * fmt, HANDLE data, bool release);
79
80 // IBPart2 implementation
81 //
82 HRESULT _IFUNC Init(IBSite *, TOcInitInfo *);
83 HRESULT _IFUNC Close();
84 HRESULT _IFUNC CanOpenInPlace();
85 HRESULT _IFUNC SetPartSize(owl::TSize *);
86 HRESULT _IFUNC SetPartPos(owl::TRect *);
87 HRESULT _IFUNC Activate(BOOL);
88 HRESULT _IFUNC Show(BOOL);
89 HRESULT _IFUNC Open(BOOL);
90 HRESULT _IFUNC EnumVerbs(TOcVerb *);
91 HRESULT _IFUNC DoVerb(owl::uint);
92 HWND _IFUNC OpenInPlace(HWND);
93 HRESULT _IFUNC InsertMenus(HMENU, TOcMenuWidths *);
94 HRESULT _IFUNC ShowTools(BOOL);
95 void _IFUNC FrameResized(const owl::TRect *, BOOL);
96 HRESULT _IFUNC DragFeedback(owl::TPoint *, BOOL);
97 HRESULT _IFUNC GetPalette(LOGPALETTE * *);
98 HRESULT _IFUNC SetHost(IBContainer * objContainer);
99 HRESULT _IFUNC DoQueryInterface(const IID & iid, void * * pif);
100 LPOLESTR _IFUNC GetName(TOcPartName);
101
104
105 private:
106 ~TOcLinkView();
107
108 TOcView* OcView; ///< Our hosting view that link is on
109 IUnknown* BSite; ///< In-place site helper object
110 IBSite* BSiteI; ///< Site interface
111 IBApplication* BAppI; ///< Site's application interface
112
113 owl::TString Moniker;
114
115 friend class TOcLinkCollection;
116};
117
118//
119/// \class TOcLinkCollection
120// ~~~~~ ~~~~~~~~~~~~~~~~~
121/// Container of link views with iterator
122//
123class _OCFCLASS TOcLinkCollection : public owl::TPtrArray<TOcLinkView*> {
124 private:
126 //friend class TOcLinkCollectionIter;
127 public:
130 //void operator delete(void* ptr) {TStandardAllocator::operator delete(ptr);}
131
132 void Clear();
133 int Add(TOcLinkView* const& View)
134 { return Base::Add(View);}
135 int IsEmpty() const {return Base::Empty();}
136 int Find(TOcLinkView* const& view)
137 { return Base::Find(view);}
138 virtual unsigned Count() const {return Base::Size();}
139 int Detach(TOcLinkView* const& view, int del = 0);
140 TOcLinkView* Find(owl::TString const moniker) const;
141};
142typedef TOcLinkCollection TOcViewCollection; // For compatibility only
143
144//
145/// Iterator for view collection
146//
148
149//
150/// Iterator for view collection.
151/// For compatibility only.
152//
154
155} // OCF namespace
156
157#endif // OCF_OCLINK_H
IBApplication – Supported at frame window/app object of container apps.
Definition ocbocole.h:422
IBContainer – Supported by container app's document window.
Definition ocbocole.h:398
IBPart – Supported by server objects.
Definition ocbocole.h:241
IBSite – Supported by container apps for each linked/embedded object.
Definition ocbocole.h:437
The TOcView partner is a container (viewer) of a given (server/client) document.
Definition ocview.h:136
Standard implementation of a controlling IUnknown for an object, to be inherited with other COM inter...
Definition oleutil.h:264
TPoint is a support class, derived from tagPOINT.
Definition geometry.h:87
array of pointers of simple types
Definition template.h:830
Iterator for Pointer Container.
Definition template.h:543
TRect is a mathematical class derived from tagRect.
Definition geometry.h:308
A registration parameter table, composed of a list of TRegItems.
Definition registry.h:531
The tagSIZE struct is defined as.
Definition geometry.h:234
Reference to reference counted string object TUString Lightweight reference object consisting of a po...
Definition string.h:67
Definition of container classes used and made available by OWL.
Classes for window system geometry.
Object Component Framework (COM encapsulation)
Definition appdesc.h:22
TOcAspect
Definition ocobject.h:64
TOcLinkCollection TOcViewCollection
Definition oclink.h:142
TOcLinkCollectionIter TOcViewCollectionIter
Iterator for view collection.
Definition oclink.h:153
TOcInvalidate
Definition ocobject.h:59
class _ICLASS TOcView
Definition ocdoc.h:35
const GUID & iid
Definition appdesc.h:328
TOcLinkCollection::Iterator TOcLinkCollectionIter
Iterator for view collection.
Definition oclink.h:147
TOcPartName
Definition ocobject.h:87
TOcDraw
Definition ocobject.h:81
unsigned long ulong
Definition number.h:26
unsigned int uint
Definition number.h:25
ObjectComponents BOcOle engine linking & embedding interfaces.
interface _ICLASS IStorage
Definition ocdoc.h:25
#define _OCFCLASS
Definition defs.h:45
Various general OC enums and structs.
OLE Registration definitions.
#define _IFUNC
Definition oleutil.h:28
#define _ICLASS
Definition oleutil.h:25
Definition of container classes used and made available by OWL.