8#if !defined(OCF_OCVIEW_H)
12#if defined(BI_HAS_PRAGMA_ONCE)
35#if !defined(_OCMCLASS)
65 void SetFormatName(LPTSTR name,
TOcApp& ocApp);
71 void Disable(
bool disable =
true) {Disabled = disable;}
87 _TCHAR ResultName[32];
107 TOcFormat*& operator [](
unsigned index) {
return Base::operator[](index);}
108 void Clear(
int del = 1) { Base::Flush(del==1);}
115 return del ? Base::DestroyItem(item) : Base::DetachItem(item);
144 void SetupWindow(HWND hWin,
bool embedded =
false);
146 virtual void ReleaseObject();
159 bool Paste(
bool linking =
false);
168 void ScrollWindow(
int dx,
int dy);
170 virtual void Rename();
180 bool ActivatePart(
TOcPart* part);
186 void EvActivate(
bool activate);
187 virtual void EvClose();
188 virtual bool EvSetFocus(
bool set);
200 {
return GetOuter()->QueryInterface(
iid, iface);}
206 HRESULT
_IFUNC Init(LPCOLESTR);
220 LPCOLESTR
_IFUNC GetWindowTitle();
221 void _IFUNC AppendWindowTitle(LPCOLESTR title);
222 HRESULT
_IFUNC SetStatusText(LPCOLESTR text);
226 HRESULT
_IFUNC SetFrameMenu(HMENU);
228 HRESULT
_IFUNC Accelerator(MSG *);
229 HRESULT
_IFUNC GetAccelerators(HACCEL *,
int *);
243 HRESULT
_IFUNC AllowInPlace();
244 HRESULT
_IFUNC BringToFront();
249 owl::TResult ForwardEvent(
int eventId,
const void* param);
258 HRESULT QueryObject(
const IID &
iid,
void * * iface);
332 bool saveSelection =
false,
void* userData = 0)
651 virtual bool EvOcViewOpenDoc(LPCTSTR path);
652 virtual LPCTSTR EvOcViewTitle();
653 virtual void EvOcViewSetTitle(LPCTSTR title);
655 virtual bool EvOcViewBorderSpaceReq(
const owl::TRect * rect);
656 virtual bool EvOcViewBorderSpaceSet(
const owl::TRect * rect);
661 virtual bool EvOcViewPasteObject(
TOcInitInfo& init);
669 virtual bool EvOcViewPartActivate(
TOcPart& ocPart);
679 owl::TResult ForwardEvent(
int eventId,
const void* param);
701 virtual bool EvOcViewGetItemName(
TOcItemName& item);
705 virtual bool EvOcViewSavePart(
TOcSaveLoad & ocSave);
710 virtual bool EvOcViewAttachWindow(
bool attach);
711 virtual void EvOcViewSetTitle(LPCTSTR title);
715 virtual bool EvOcViewGetPalette(LOGPALETTE * * palette);
719 virtual bool EvOcViewLoadPart(
TOcSaveLoad & ocLoad);
720 virtual bool EvOcViewInsMenus(
TOcMenuDescr & sharedMenu);
723 virtual bool EvOcViewClose();
725 virtual bool EvOcViewDoVerb(
owl::uint verb);
734 owl::TResult ForwardEvent(
int eventId,
const void* param);
762#define OC_VIEWOPENDOC 0x0200
763#define OC_VIEWTITLE 0x0201
764#define OC_VIEWSETTITLE 0x0202
765#define OC_VIEWBORDERSPACEREQ 0x0203
766#define OC_VIEWBORDERSPACESET 0x0204
767#define OC_VIEWDRAG 0x0205
768#define OC_VIEWDROP 0x0206
769#define OC_VIEWSCROLL 0x0207
770#define OC_VIEWPARTINVALID 0x0208
771#define OC_VIEWPASTEOBJECT 0x0209
773#define OC_VIEWGETSITERECT 0x020A
774#define OC_VIEWSETSITERECT 0x020B
775#define OC_VIEWPARTACTIVATE 0x020C
776#define OC_VIEWGETSCALE 0x020D
779#define OC_VIEWGETITEMNAME 0x0301
780#define OC_VIEWCLIPDATA 0x0302
781#define OC_VIEWSETDATA 0x0303
782#define OC_VIEWPARTSIZE 0x0304
783#define OC_VIEWSAVEPART 0x0305
784#define OC_VIEWPAINT 0x0306
787#define OC_VIEWATTACHWINDOW 0x0310
788#define OC_VIEWSETLINK 0x0311
789#define OC_VIEWBREAKLINK 0x0312
790#define OC_VIEWGETPALETTE 0x0313
793#define OC_VIEWLOADPART 0x0321
794#define OC_VIEWINSMENUS 0x0322
795#define OC_VIEWSHOWTOOLS 0x0323
796#define OC_VIEWCLOSE 0x0324
797#define OC_VIEWSETSCALE 0x0325
798#define OC_VIEWDOVERB 0x0326
802#define OC_VIEWTRANSFORMCOORDS 0x0330
803#define OC_CTRLEVENT_FOCUS 0x0340
804#define OC_CTRLEVENT_PROPERTYCHANGE 0x0341
805#define OC_CTRLEVENT_PROPERTYREQUESTEDIT 0x0342
806#define OC_CTRLEVENT_CLICK 0x0343
807#define OC_CTRLEVENT_DBLCLICK 0x0344
808#define OC_CTRLEVENT_MOUSEDOWN 0x0345
809#define OC_CTRLEVENT_MOUSEMOVE 0x0346
810#define OC_CTRLEVENT_MOUSEUP 0x0347
811#define OC_CTRLEVENT_KEYDOWN 0x0348
812#define OC_CTRLEVENT_KEYUP 0x0349
813#define OC_CTRLEVENT_ERROREVENT 0x034A
814#define OC_CTRLEVENT_CUSTOMEVENT 0x034B
818#define OC_AMBIENT_GETBACKCOLOR 0x0350
819#define OC_AMBIENT_GETFORECOLOR 0x0351
820#define OC_AMBIENT_GETSHOWGRABHANDLES 0x0352
821#define OC_AMBIENT_GETUIDEAD 0x0353
822#define OC_AMBIENT_GETSUPPORTSMNEMONICS 0x0354
823#define OC_AMBIENT_GETSHOWHATCHING 0x0355
824#define OC_AMBIENT_GETDISPLAYASDEFAULT 0x0356
825#define OC_AMBIENT_GETTEXTALIGN 0x0357
826#define OC_AMBIENT_GETMESSAGEREFLECT 0x0358
827#define OC_AMBIENT_GETLOCALEID 0x0359
828#define OC_AMBIENT_GETUSERMODE 0x035A
829#define OC_AMBIENT_GETDISPLAYNAME 0x035B
830#define OC_AMBIENT_GETSCALEUNITS 0x035C
831#define OC_AMBIENT_GETFONT 0x035D
835#define OC_AMBIENT_SETBACKCOLOR 0x0360
836#define OC_AMBIENT_SETFORECOLOR 0x0361
837#define OC_AMBIENT_SETSHOWGRABHANDLES 0x0362
838#define OC_AMBIENT_SETUIDEAD 0x0363
839#define OC_AMBIENT_SETSUPPORTSMNEMONICS 0x0364
840#define OC_AMBIENT_SETSHOWHATCHING 0x0365
841#define OC_AMBIENT_SETDISPLAYASDEFAULT 0x0366
842#define OC_AMBIENT_SETTEXTALIGN 0x0367
843#define OC_AMBIENT_SETMESSAGEREFLECT 0x0368
844#define OC_AMBIENT_SETLOCALEID 0x0369
845#define OC_AMBIENT_SETUSERMODE 0x036A
846#define OC_AMBIENT_SETDISPLAYNAME 0x036B
847#define OC_AMBIENT_SETSCALEUNITS 0x036C
848#define OC_AMBIENT_SETFONT 0x036D
850#define OC_USEREVENT 0xF000
IBContainer – Supported by container app's document window.
IContains abstract base class.
IBDocument – Supported by BOleDocument one per container child window.
IBDropDest – Supported by container app's document window and/or other areas inside the window.
IBLinkInfo – Supported by BOleParts which are link objects.
IBPart – Supported by server objects.
virtual bool EvOcViewPasteObject(TOcInitInfo &init)=0
virtual bool EvOcViewBorderSpaceReq(const owl::TRect *rect)=0
virtual bool EvOcViewDrop(TOcDragDrop &ddInfo)=0
virtual bool EvOcViewGetSiteRect(TOcSiteRect &sr)=0
virtual void ReleaseOcObject()=0
virtual HWND EvOcGetWindow() const =0
virtual bool EvOcViewPartActivate(TOcPart &ocPart)=0
virtual void EvOcViewSetTitle(LPCTSTR title)=0
virtual LPCTSTR EvOcViewTitle()=0
virtual bool EvOcViewScroll(TOcScrollDir scrollDir)=0
virtual bool EvOcViewGetScale(TOcScaleFactor &scaleFactor)=0
virtual bool EvOcViewBorderSpaceSet(const owl::TRect *rect)=0
virtual bool EvOcViewSetSiteRect(TOcSiteRect &sr)=0
virtual bool EvOcPartInvalid(TOcPartChangeInfo &part)=0
virtual bool EvOcViewDrag(TOcDragDrop &ddInfo)=0
virtual bool EvOcViewOpenDoc(LPCTSTR path)=0
virtual void SetWindow(HWND)
virtual HWND EvOcGetWindow() const
virtual void SetWindow(HWND hWnd)
virtual void ReleaseOcObject()
OC Control Event class for standard control events.
Class representing an embedded control within a document.
Data Provider object for a container document.
OC Document class, holds parts & is a owner of views.
Used to obtain the item name for building monikers.
LPCTSTR Moniker
item moniker
TOcLinkView * OcLinkView
The TOcLinkView connector object associated with this view.
TOcItemLink(LPCTSTR moniker, TOcLinkView *view)
Used to obtain the item name for building monikers.
TOcItemName(bool selection)
owl::TString Name
Item moniker.
bool Selection
Whether we want name for the whole or part(selection)
Link Viewer object for a server document.
OC part class represents an embeded or linked part in a document.
Used to obtain the size of the rectangle that encloses the selection.
void * UserData
User data.
TOcPartSize(bool selection, owl::TString *moniker=0, void *userData=0)
TOcPartSize(owl::TRect rect, bool selection=false, owl::TString *moniker=0, void *userData=0)
owl::TString * Moniker
we want the selection rect for moniker
bool Selection
whether we want rect for the whole or part(selection)
owl::TRect PartRect
rect enclosing the whole/part of the embedded object
Use when doing parts save and load.
bool SaveSelection
whether to save only the selection
bool SameAsLoad
Same IStorage as one used for loading.
TOcSaveLoad(IStorage *storageI, bool sameAsLoad=true, bool remember=false, bool saveSelection=false, void *userData=0)
bool Remember
whether to keep the IStorage ptr after save/load
void * UserData
User data.
virtual bool EvOcViewGetItemName(TOcItemName &item)=0
virtual bool EvOcViewBreakLink(TOcLinkView &view)=0
virtual bool EvOcViewSetData(TOcFormatData &format)=0
virtual bool EvOcViewPartSize(TOcPartSize &size)=0
virtual HWND EvOcGetWindow() const =0
virtual bool EvOcViewGetPalette(LOGPALETTE **palette)=0
virtual bool EvOcViewDrag(TOcDragDrop &ddInfo)=0
virtual bool EvOcViewSetLink(TOcLinkView &view)=0
virtual bool EvOcViewPaint(TOcViewPaint &vp)=0
virtual bool EvOcViewClipData(TOcFormatData &format)=0
virtual bool EvOcViewAttachWindow(bool attach)=0
virtual bool EvOcViewLoadPart(TOcSaveLoad &ocLoad)=0
virtual bool EvOcViewSavePart(TOcSaveLoad &ocSave)=0
virtual bool EvOcViewDoVerb(owl::uint verb)=0
virtual bool EvOcViewShowTools(TOcToolBarInfo &tbi)=0
virtual bool EvOcViewSetScale(TOcScaleFactor &scaleFactor)=0
virtual void SetWindow(HWND)
virtual void ReleaseOcObject()=0
virtual bool EvOcViewClose()=0
virtual bool EvOcViewInsMenus(TOcMenuDescr &sharedMenu)=0
virtual void EvOcViewSetTitle(LPCTSTR title)=0
virtual void SetWindow(HWND hWnd)
virtual void ReleaseOcObject()
virtual HWND EvOcGetWindow() const
The TOcView partner is a container (viewer) of a given (server/client) document.
TOcDocument & OcDocument
Our OC document object.
IUnknown * BContainer
Container helper object.
owl::ulong _IFUNC AddRef()
void SetOcData(TOcDataProvider *ocData=0)
owl::ulong _IFUNC Release()
TOcPart * ActivePart
Currently active part, if any.
TOcDocument & GetOcDocument()
owl::TString OrgTitle
Original window title string.
TOcPart * GetActivePart()
TOcDataProvider * OcData
Dataprovider representing this view.
TOcContainerHost * ContainerHost
The hosting app's container object.
IUnknown * BDocument
Document helper object.
TOcDataProvider * GetOcData()
HRESULT _IFUNC QueryInterface(const GUID &iid, void **iface)
IBRootLinkable * BLDocumentI
RootLinkable interface on the container.
owl::TPoint GetOrigin() const
bool IsOptionSet(owl::uint32 option) const
void SetOption(owl::uint32 bit, bool state)
TOcApp & OcApp
Our OC application object.
TOcServerHost * ServerHost
The hosting app's server object.
IBDocument * BDocumentI
Document interface on the document.
void SetActivePart(TOcPart *part)
int LinkFormat
adjustment for format count
IBRootLinkable * GetLinkable()
owl::TResult ForwardEvent(int eventId, const void *param)
Standard implementation of a controlling IUnknown for an object, to be inherited with other COM inter...
TPoint is a support class, derived from tagPOINT.
Iterator for Pointer Container.
TRect is a mathematical class derived from tagRect.
A registration parameter table, composed of a list of TRegItems.
The tagSIZE struct is defined as.
Reference to reference counted string object TUString Lightweight reference object consisting of a po...
ipstream, a specialized input stream derivative of pstream, is the base class for reading (extracting...
Base class for writing streamable objects.
Definition of container classes used and made available by OWL.
Dispatch functions (crackers) to crack a Windows message and pass control to a member function via a ...
ocrMedium
Medium: means of data transfer.
Object Component Framework (COM encapsulation)
TOcFormatList::Iterator TOcFormatListIter
Object Windows Library (OWLNext Core)
owl::opstream & operator<<(owl::opstream &os, const TColor &c)
Insert the color value into a persistent output stream.
LPARAM TParam2
Second parameter type.
LRESULT TResult
Result type.
owl::ipstream & operator>>(owl::ipstream &is, TColor &c)
Extract the color value from a persistent input stream.
Definition of TOcApp application connection class.
Definition of TOcDocument Class.
interface _ICLASS IStorage
TOcInitInfo * InitInfo
ViewDrop event only, else 0.
For part adornment painting over part, & painting views.
void * UserData
User data.
bool PaintSelection
paint the selection only
owl::TString * Moniker
moniker if any