OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
ocdata.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 TOcDataProvider Class
6//----------------------------------------------------------------------------
7
8#if !defined(OCF_OCDATA_H)
9#define OCF_OCDATA_H
10
11#include <owl/private/defs.h>
12#if defined(BI_HAS_PRAGMA_ONCE)
13# pragma once
14#endif
15
16#include <ocf/ocview.h>
17
18namespace ocf {
19//
20// Callback function for user data clean up
21//
22typedef void (*TDeleteUserData)(void* userData);
23
24//
25/// \class TOcDataProvider
26// ~~~~~ ~~~~~~~~~~~~~~~
27/// Data Provider object for a container document
28//
30 public IBDataProvider { // !CQ should we use IBDataProvider2?
31 public:
32 TOcDataProvider(TOcView& ocView, owl::TRegList* regList, IUnknown* outer = 0,
33 void* userData = 0, TDeleteUserData callBack = 0);
34
35 // Object reference & lifetime managment
36 //
37 public:
38 owl::ulong _IFUNC AddRef() {return GetOuter()->AddRef();}
39 owl::ulong _IFUNC Release() {return GetOuter()->Release();}
40 HRESULT _IFUNC QueryInterface(const GUID & iid, void ** iface)
41 {return GetOuter()->QueryInterface(iid, iface);}
42
43 // Supporting methods
44 //
45 void Disconnect();
46 void Rename();
47 void* GetUserData() {return UserData;}
48 void SetUserData(void* userData) {UserData = userData;}
49
50 protected:
51 // IBDataNegotiator implementation
52 //
53 UINT _IFUNC CountFormats();
54 HRESULT _IFUNC GetFormat(owl::uint index, TOcFormatInfo * fmt);
55
56 // IBDataProvider implementation
57 // !CQ IBDataProvider2 implementation ???
58 //
59 HANDLE _IFUNC GetFormatData(TOcFormatInfo * fmt);
60// HRESULT _IFUNC SetFormatData(TOcFormatInfo * fmt, HANDLE data, bool release);
61 HRESULT _IFUNC Draw(HDC dc, const RECTL * pos, const RECTL * clip,
62 TOcAspect aspect, TOcDraw bd);
63 HRESULT _IFUNC GetPartSize(owl::TSize * size);
64 HRESULT _IFUNC Save(IStorage*, BOOL sameAsLoad, BOOL remember);
65
68
69 private:
71
72 // TUnknown overrides
73 //
74 HRESULT QueryObject(const IID & iid, void * * iface);
75
76 TOcView& OcView;
77 IUnknown* BSite; ///< site helper
78 IBSite* BSiteI; ///< Site interface
79 IBLinkable* BLSiteI; ///< for item moniker
80 void* UserData; ///< pointer to application specific data such as selection
81 TDeleteUserData CBDelete; ///< Call back function for cleaning up user data
82};
83
84} // OCF namespace
85
86#endif // OCF_OCDATA_H
IBDataProvider – Supported by parts and/or sites which can be copied to the OLE2 clipboard.
Definition ocbocole.h:219
ILinkable abstract base class.
Definition ocbocole.h:321
IBSite – Supported by container apps for each linked/embedded object.
Definition ocbocole.h:437
Data Provider object for a container document.
Definition ocdata.h:30
owl::ulong _IFUNC Release()
Definition ocdata.h:39
void * GetUserData()
Definition ocdata.h:47
void SetUserData(void *userData)
Definition ocdata.h:48
owl::TSize Extent
Definition ocdata.h:67
owl::ulong _IFUNC AddRef()
Definition ocdata.h:38
owl::TPoint Origin
Definition ocdata.h:66
HRESULT _IFUNC QueryInterface(const GUID &iid, void **iface)
Definition ocdata.h:40
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
A registration parameter table, composed of a list of TRegItems.
Definition registry.h:531
The tagSIZE struct is defined as.
Definition geometry.h:234
Object Component Framework (COM encapsulation)
Definition appdesc.h:22
TOcAspect
Definition ocobject.h:64
const GUID & iid
Definition appdesc.h:328
TOcDraw
Definition ocobject.h:81
void(* TDeleteUserData)(void *userData)
Definition ocdata.h:22
unsigned long ulong
Definition number.h:26
unsigned int uint
Definition number.h:25
interface _ICLASS IStorage
Definition ocdoc.h:25
#define _OCFCLASS
Definition defs.h:45
Definition of Compound Document TOcView Class.
#define _IFUNC
Definition oleutil.h:28