28 OcDocument(
document), BPart(0), BPartI(0), BLPartI(0), Flags(Visible),
55 OcDocument(
document), BPart(0), BPartI(0), BLPartI(0), Flags(Visible),
83 OcDocument(
document), BPart(0), BPartI(0), BLPartI(0), Flags(Visible),
312 view->ActivatePart(
this);
313 view->ContainerHost->EvOcViewPartActivate(*
this);
484 ::SetFocus(
view->GetWindow());
819 for (
int i =
Count() - 1;
i >= 0;
i--) {
836 if (
i.Current()->IsVisible(
hitRect))
848 i.Current()->Select(select);
#define PRECONDITION(condition)
IBDataProvider – Supported by parts and/or sites which can be copied to the OLE2 clipboard.
virtual HRESULT _IFUNC Save(IStorage *, BOOL fSamAsLoad, BOOL fRemember)=0
virtual HRESULT _IFUNC Draw(HDC, const RECTL *, const RECTL *, TOcAspect, TOcDraw bd=drNone)=0
virtual HRESULT _IFUNC GetPartSize(owl::TSize *)=0
virtual HRESULT _IFUNC OnRename(IBLinkable *pContainer, LPCOLESTR name)=0
IBPart2 – Supported by server objects.
IBPart – Supported by server objects.
virtual HRESULT _IFUNC Activate(BOOL)=0
virtual HRESULT _IFUNC Close()=0
virtual HRESULT _IFUNC SetPartPos(owl::TRect *)=0
virtual HRESULT _IFUNC Show(BOOL)=0
virtual HRESULT _IFUNC DoVerb(owl::uint)=0
virtual HRESULT _IFUNC Init(IBSite *, TOcInitInfo *)=0
virtual HRESULT _IFUNC EnumVerbs(TOcVerb *)=0
virtual HRESULT _IFUNC DoQueryInterface(const IID &iid, void **pif)=0
HRESULT BOleComponentCreate(IUnknown **retIface, IUnknown *outer, owl::uint32 idClass)
Create a BOle helper for one of our OC objects in this app.
OC Document class, holds parts & is a owner of views.
TOcStorage * GetStorage()
TOcPartCollection & GetParts()
TOcView * GetActiveView()
virtual unsigned Count() const
bool SelectAll(bool select=false)
Select/unselect all parts.
void Clear()
Release parts in the collection.
int Find(TOcPart *const &part)
TOcPart * Locate(owl::TPoint &point)
walk thru Part collection & return the last one that logical point hits, (first one in Z order)
int Detach(TOcPart *const &part, int del=0)
int Add(TOcPart *const &part)
OC part class represents an embeded or linked part in a document.
bool Close()
Disconnect servers by closing & releasing our BOle helper.
void SetVisible(bool visible)
owl::TSize GetSize() const
Update this part's idea of its size via the server, & then return that.
virtual bool Init(TOcInitInfo *initInfo, owl::TRect pos)
Perform common ctor initialization.
void UpdateRect()
Set part to the new rect given in logical units.
TOcDocument & OcDocument
The OC document we are imbeded in.
HRESULT _IFUNC DiscardUndo()
Discard undo stack for our associated [the active] view.
owl::uint16 Flags
Is this part Selected/Visible/Active/ALink?
void _IFUNC OnSetFocus(BOOL set)
HRESULT QueryServer(const IID &iid, void **iface)
Query server for its interfaces.
bool Draw(HDC dc, const owl::TRect &pos, const owl::TRect &clip, TOcAspect aspect=asDefault)
TOcStorage * Storage
The storage we are in.
virtual bool InitObj(TOcInitInfo *initInfo)
HRESULT _IFUNC GetParentWindow(HWND *)
Get parent window for part.
owl::ulong _IFUNC Release()
bool EnumVerbs(const TOcVerb &)
HRESULT QueryObject(const IID &iid, void **iface)
Callback from TUnknown's implementation of QueryInterface.
bool Activate(bool activate)
bool SetHost(IBContainer *container)
HRESULT _IFUNC SetSiteExtent(const owl::TSize *)
Set the part's site extent.
IUnknown * BPart
Our corresponding helper object & interfaces.
HRESULT _IFUNC SetSiteRect(const owl::TRect *)
Set the site's rect from an in-place active part.
owl::ulong _IFUNC AddRef()
void SetStorage(IStorage *storage, bool remember=true)
Set the storage for this part.
bool Load()
Load this part from its ocpart stream in its current storage.
HRESULT _IFUNC GetSiteRect(owl::TRect *, owl::TRect *)
Retrieve the site rect [relative to the active view?], and optionally the view's rect too?
HRESULT _IFUNC SiteShow(BOOL)
Show/hide a site.
void SetPos(const owl::TPoint &pos)
Set part to the new position given in logical units.
bool SetFormatData(TOcFormatInfo *fmt, HANDLE data, bool release)
Set data into the server object.
void Delete()
Delete this object.
void SetSize(const owl::TSize &size)
Set part to the new size given in logical units.
TOcPart(TOcDocument &document, int id=0)
Construct a new part with a given temp id Must call Init method to complete initialization.
bool Save(bool SameAsLoad=true, bool remember=true)
Save this part to storage.
void _IFUNC Invalidate(TOcInvalidate)
Invalidate the site within the active view.
HRESULT _IFUNC GetZoom(TOcScaleInfo *scale)
Get zoom factor for part.
void Rename()
Rename the embed site for linking.
HRESULT Stat(STATSTG *pstatstg, owl::uint32 grfStatFlag)
The TOcView partner is a container (viewer) of a given (server/client) document.
TOcPart * GetActivePart()
void SetActivePart(TOcPart *part)
static void Check(HRESULT stat, TError err, LPCTSTR msg=0)
TPoint is a support class, derived from tagPOINT.
Iterator for Pointer Container.
TRect is a mathematical class derived from tagRect.
The tagSIZE struct is defined as.
Include for OC, gets common headers when precompiled headers are enabled.
Object Component Framework (COM encapsulation)
bool HRSucceeded(HRESULT hr)
const TCHAR PartStreamName[]
Object Windows Library (OWLNext Core)
Definition of TOcApp application connection class.
Definition of TOcDocument Class.
interface _ICLASS IStorage
Definition of TOcPart class.
Definition of TOcStorage & TOcStream classes.
Definition of Compound Document TOcView Class.