|
OWLNext 7.0
Borland's Object Windows Library for the modern age
|
Class representing an embedded control within a document. More...
#include <ocf/occtrl.h>
Public Member Functions | |
| TOcControl (TOcDocument &document, int id=0, TOcControlEvent *pEv=nullptr) | |
| Construct a new part with a given temp id. | |
| TOcControl (TOcDocument &document, LPCTSTR name) | |
| Construct a part from a named stream in an oc doc's storage. | |
| bool | Init (TOcInitInfo *initInfo, owl::TRect pos) |
| IBControl * | GetBControlI () |
| TOcView * | GetActiveControlView () |
| ITypeInfo * | GetEventTypeInfo () |
| Retrieves the ITypeInfo the 'default source' event object of this control. | |
| IDispatch * | GetCtlDispatch () |
| Retrieves the primary IDispatch of the control. | |
| void | SetDefault (bool def) |
| void | SetCancel (bool cancel) |
| void | SetUserName (owl::TString &name) |
| Extended property support. | |
| owl::uint | GetId () const |
| void | SetId (owl::uint id) |
| bool | FillEventList () |
| Retrieves a list of events generated by this control. | |
| TEventList * | GetEventList () const |
| bool | IsCancel () const |
| bool | IsDefault () const |
| long | GetLeft () |
| long | GetTop () |
| long | GetWidth () |
| long | GetHeight () |
| void | SetLeft (long Value) |
| void | SetWidth (long Value) |
| void | SetTop (long Value) |
| void | SetHeight (long Value) |
| owl::TString & | GetUserName () |
| IDispatch * | GetParent () |
| Retrieves the extended IDispatch (exposing extended properties). | |
| HRESULT | Refresh () |
| HRESULT | DoClick () |
| HRESULT | AboutBox () |
| Public Member Functions inherited from ocf::TOcPart | |
| TOcPart (TOcDocument &document, int id=0) | |
| Construct a new part with a given temp id Must call Init method to complete initialization. | |
| TOcPart (TOcDocument &document, LPCTSTR name) | |
| Construct a part from a named stream in an oc doc's storage. | |
| TOcPart (TOcDocument &document, TOcInitInfo &initInfo, owl::TRect pos, int id=0) | |
| Old style constructor - does init in constructor - OCF messages will get passed before constructor is complete. | |
| void | Delete () |
| Delete this object. | |
| bool | operator== (const TOcPart &other) |
| IBPart * | GetBPartI () |
| TOcStorage * | GetStorage () |
| void | SetStorage (IStorage *storage, bool remember=true) |
| Set the storage for this part. | |
| bool | Save (bool SameAsLoad=true, bool remember=true) |
| Save this part to storage. | |
| bool | Load () |
| Load this part from its ocpart stream in its current storage. | |
| int | Detach () |
| void | FinishLoading () |
| owl::TPoint | GetPos () const |
| void | SetPos (const owl::TPoint &pos) |
| Set part to the new position given in logical units. | |
| owl::TSize | GetSize () const |
| Update this part's idea of its size via the server, & then return that. | |
| void | SetSize (const owl::TSize &size) |
| Set part to the new size given in logical units. | |
| owl::TRect | GetRect () const |
| void | UpdateRect () |
| Set part to the new rect given in logical units. | |
| bool | IsVisible (const owl::TRect &logicalRect) const |
| void | Select (bool select) |
| bool | IsSelected () const |
| void | SetVisible (bool visible) |
| bool | IsVisible () const |
| bool | IsActive () const |
| void | SetActive () |
| bool | IsLink () const |
| owl::TString | GetName () |
| void | Rename () |
| Rename the embed site for linking. | |
| bool | Save (IStorage *storage, bool sameAsLoad, bool remember) |
| bool | Draw (HDC dc, const owl::TRect &pos, const owl::TRect &clip, TOcAspect aspect=asDefault) |
| bool | Activate (bool activate) |
| bool | Show (bool show) |
| bool | Open (bool open) |
| HWND | OpenInPlace (HWND hwnd) |
| bool | CanOpenInPlace () |
| bool | Close () |
| Disconnect servers by closing & releasing our BOle helper. | |
| bool | SetHost (IBContainer *container) |
| bool | EnumVerbs (const TOcVerb &) |
| bool | DoVerb (owl::uint) |
| LPCOLESTR | GetServerName (TOcPartName partName) |
| HRESULT | QueryServer (const IID &iidiid, void **iface) |
| Query server for its interfaces. | |
| bool | SetFormatData (TOcFormatInfo *fmt, HANDLE data, bool release) |
| Set data into the server object. | |
| owl::ulong _IFUNC | AddRef () |
| owl::ulong _IFUNC | Release () |
| HRESULT _IFUNC | QueryInterface (const GUID &iidiid, void **iface) |
| Public Member Functions inherited from ocf::TUnknown | |
| operator IUnknown & () | |
| operator IUnknown * () | |
| IUnknown * | SetOuter (IUnknown *outer=0) |
| IUnknown * | GetOuter () |
| unsigned long | GetRefCount () |
| unsigned long | AdjustRefCount (int i) |
| IUnknown & | Aggregate (TUnknown &inner) |
Public Attributes | |
| TUNKNOWN_STANDARD_IUNKNOWN_METHODS | |
Protected Member Functions | |
| ~TOcControl () | |
| bool | InitObj (TOcInitInfo *initInfo) |
| Perform common ctor initialization. | |
| TUnknown * | CreateAutoObject (const void *obj, TAutoClass &clsInfo) |
| HRESULT | QueryObject (const IID &iidiid, void **iface) |
| Callback from TUnknown's implementation of QueryInterface. | |
| HRESULT _IFUNC | Init (UINT, IBControl *, UINT) |
| HRESULT _IFUNC | OnPropertyChanged (DISPID dispid) |
| HRESULT _IFUNC | OnPropertyRequestEdit (DISPID dispid) |
| HRESULT _IFUNC | OnControlFocus (BOOL fGotFocus) |
| Event support. | |
| HRESULT _IFUNC | TransformCoords (owl::TPointL *lpptlHimetric, owl::TPointF *lpptfContainer, DWORD flags) |
| HRESULT _IFUNC | Init (IBDataProvider *dp, IBPart *p, LPCOLESTR s, BOOL b) |
| void | SetEventDispatch () |
| Protected Member Functions inherited from ocf::TOcPart | |
| ~TOcPart () | |
| HRESULT | QueryObject (const IID &iidiid, void **iface) |
| Callback from TUnknown's implementation of QueryInterface. | |
| HRESULT _IFUNC | SiteShow (BOOL) |
| Show/hide a site. | |
| HRESULT _IFUNC | DiscardUndo () |
| Discard undo stack for our associated [the active] view. | |
| HRESULT _IFUNC | GetSiteRect (owl::TRect *, owl::TRect *) |
| Retrieve the site rect [relative to the active view? | |
| HRESULT _IFUNC | SetSiteRect (const owl::TRect *) |
| Set the site's rect from an in-place active part. | |
| HRESULT _IFUNC | SetSiteExtent (const owl::TSize *) |
| Set the part's site extent. | |
| HRESULT _IFUNC | GetZoom (TOcScaleInfo *scale) |
| Get zoom factor for part. | |
| void _IFUNC | Invalidate (TOcInvalidate) |
| Invalidate the site within the active view. | |
| void _IFUNC | OnSetFocus (BOOL set) |
| HRESULT _IFUNC | Init (IBDataProvider *, IBPart *, LPCOLESTR, BOOL) |
| void _IFUNC | Disconnect () |
| HRESULT _IFUNC | GetParentWindow (HWND *) |
| Get parent window for part. | |
| Protected Member Functions inherited from ocf::TUnknown | |
| TUnknown () | |
| virtual | ~TUnknown () |
| IUnknown & | ThisUnknown () |
| virtual HRESULT | QueryObject (const GUID &iidiid, void **pif) |
| QueryObject used when TUnknown is in constructor/destructor. | |
Protected Attributes | |
| IBControl * | BCtrlI |
| owl::TString * | pUserName |
| TServedObject * | pIExtended |
| TOcControlEvent * | pEvents |
| bool | pEventsOwnership |
| owl::uint | CtlId |
| TEventList * | EventList |
| friend | TOcControlEvent |
| Protected Attributes inherited from ocf::TOcPart | |
| IUnknown * | BPart |
| Our corresponding helper object & interfaces. | |
| IBPart * | BPartI |
| IBLinkable * | BLPartI |
| TOcDocument & | OcDocument |
| The OC document we are imbeded in. | |
| TOcStorage * | Storage |
| The storage we are in. | |
| owl::tstring | Name |
| owl::TPoint | Pos |
| owl::TSize | Size |
| owl::uint16 | Flags |
| Is this part Selected/Visible/Active/ALink? | |
| Protected Attributes inherited from ocf::TUnknown | |
| IUnknown * | Outer |
Additional Inherited Members | |
| Protected Types inherited from ocf::TOcPart | |
| enum | TFlag { Visible =0x01 , Selected =0x02 , Active =0x04 , Link =0x08 , Closing =0x10 , OcxDefault =0x20 , OcxCancel =0x40 } |
Class representing an embedded control within a document.
| ocf::TOcControl::TOcControl | ( | TOcDocument & | document, |
| int | id = 0, | ||
| TOcControlEvent * | pEv = nullptr ) |
Construct a new part with a given temp id.
Definition at line 226 of file occtrl.cpp.
References ocf::TOcPart::TOcPart(), BCtrlI, EventList, ocf::TOcPart::GetName(), pEvents, pEventsOwnership, pIExtended, pUserName, and TOcControlEvent.
| ocf::TOcControl::TOcControl | ( | TOcDocument & | document, |
| LPCTSTR | name ) |
Construct a part from a named stream in an oc doc's storage.
Definition at line 240 of file occtrl.cpp.
References ocf::TOcPart::TOcPart(), BCtrlI, EventList, pEvents, pEventsOwnership, pIExtended, and pUserName.
|
protected |
Definition at line 251 of file occtrl.cpp.
References EventList, pEvents, pEventsOwnership, pIExtended, pUserName, and ocf::TServedObject::Release().
|
inline |
Definition at line 133 of file occtrl.h.
References GetBControlI().
|
protected |
Definition at line 500 of file occtrl.cpp.
References ocf::TAppDescriptor::CreateAutoObject(), ocf::GetAppDescriptor(), ocf::TOcApp::GetRegistrar(), ocf::TAutoClass::GetTypeInfo(), and ocf::TOcPart::OcDocument.
|
inline |
Definition at line 132 of file occtrl.h.
References GetBControlI().
| bool ocf::TOcControl::FillEventList | ( | ) |
Retrieves a list of events generated by this control.
Returns true if the event list was successfully retrieved.
Definition at line 373 of file occtrl.cpp.
References ocf::TEventList::TEventList(), EventList, ocf::TEventList::GetCount(), GetEventTypeInfo(), and ITypeInfo.
| TOcView * ocf::TOcControl::GetActiveControlView | ( | ) |
Definition at line 491 of file occtrl.cpp.
References ocf::TOcDocument::GetActiveView(), and ocf::TOcPart::OcDocument.
|
inline |
| IDispatch * ocf::TOcControl::GetCtlDispatch | ( | ) |
Retrieves the primary IDispatch of the control.
Definition at line 407 of file occtrl.cpp.
References GetBControlI(), and ocf::IBControl::GetCtrlDispatch().
| TEventList * ocf::TOcControl::GetEventList | ( | ) | const |
Definition at line 397 of file occtrl.cpp.
References EventList.
| ITypeInfo * ocf::TOcControl::GetEventTypeInfo | ( | ) |
Retrieves the ITypeInfo the 'default source' event object of this control.
Definition at line 360 of file occtrl.cpp.
References GetBControlI(), ocf::IBControl::GetEventTypeInfo(), and ITypeInfo.
|
inline |
Definition at line 121 of file occtrl.h.
References ocf::TOcPart::Size.
|
inline |
|
inline |
Definition at line 118 of file occtrl.h.
References ocf::TOcPart::Pos.
| IDispatch * ocf::TOcControl::GetParent | ( | ) |
Retrieves the extended IDispatch (exposing extended properties).
Definition at line 557 of file occtrl.cpp.
References ocf::TOcDocument::GetActiveView(), ocf::HRSucceeded(), ocf::TOcPart::OcDocument, and ocf::TOcView::QueryInterface().
|
inline |
Definition at line 119 of file occtrl.h.
References ocf::TOcPart::Pos.
| TString & ocf::TOcControl::GetUserName | ( | ) |
Definition at line 548 of file occtrl.cpp.
References pUserName.
|
inline |
Definition at line 120 of file occtrl.h.
References ocf::TOcPart::Size.
|
inlineprotectedvirtual |
Implements ocf::IBSite.
Definition at line 169 of file occtrl.h.
References _IFUNC, and ocf::TOcPart::Init().
|
virtual |
Reimplemented from ocf::TOcPart.
Definition at line 265 of file occtrl.cpp.
References ocf::TOcPart::Init().
|
protectedvirtual |
Perform common ctor initialization.
Reimplemented from ocf::TOcPart.
Definition at line 274 of file occtrl.cpp.
References ocf::TOcControlEvent::TOcControlEvent(), ocf::TOcView::ActivatePart(), ocf::TOcPart::Active, BCtrlI, ocf::TOcPart::BLPartI, ocf::TOcApp::BOleComponentCreate(), ocf::TOcPart::BPart, ocf::TOcPart::BPartI, CHECK, ocf::TXObjComp::Check(), ocf::cidBOleControl, CreateAutoObject(), ocf::TOcPart::Flags, ocf::TOcDocument::GetActiveView(), ocf::TOcStorage::GetIStorage(), ocf::TUnknown::GetOuter(), ocf::TOcInitInfo::How, ocf::HRSucceeded(), ocf::ihLink, ocf::TOcPart::InitObj(), ocf::iwNew, ocf::TOcPart::Link, ocf::TOcPart::OcDocument, pEvents, pIExtended, ocf::TOcPart::QueryInterface(), ocf::TServedObject::QueryObject(), ocf::TOcPart::Rename(), SetEventDispatch(), ocf::TOcInitInfo::Storage, ocf::TOcPart::Storage, ocf::TXObjComp::Throw(), ocf::TOcInitInfo::Where, ocf::TXObjComp::xInternalPartError, and ocf::TXObjComp::xPartInitError.
|
inline |
Definition at line 116 of file occtrl.h.
References ocf::TOcPart::Flags, and ocf::TOcPart::OcxCancel.
|
inline |
Definition at line 117 of file occtrl.h.
References ocf::TOcPart::Flags, and ocf::TOcPart::OcxDefault.
|
protectedvirtual |
Event support.
Implements ocf::IBControlSite.
Definition at line 616 of file occtrl.cpp.
References ocf::TOcPart::Activate(), ocf::TOcView::ForwardEvent(), ocf::TOcView::GetActivePart(), ocf::TOcDocument::GetActiveView(), HR_FAIL, HR_NOERROR, OC_CTRLEVENT_FOCUS, and ocf::TOcPart::OcDocument.
|
protectedvirtual |
Implements ocf::IBControlSite.
Definition at line 635 of file occtrl.cpp.
References ocf::TOcView::ForwardEvent(), ocf::TOcDocument::GetActiveView(), HR_FAIL, HR_NOERROR, OC_CTRLEVENT_PROPERTYCHANGE, and ocf::TOcPart::OcDocument.
|
protectedvirtual |
Implements ocf::IBControlSite.
Definition at line 650 of file occtrl.cpp.
References ocf::TCtrlPropertyEvent::accept, ocf::TOcView::ForwardEvent(), ocf::TOcDocument::GetActiveView(), HR_FAIL, HR_FALSE, HR_OK, OC_CTRLEVENT_PROPERTYREQUESTEDIT, and ocf::TOcPart::OcDocument.
|
protected |
Callback from TUnknown's implementation of QueryInterface.
Definition at line 518 of file occtrl.cpp.
References ocf::HRSucceeded(), pIExtended, PRECONDITION, ocf::TOcPart::QueryObject(), and ocf::TServedObject::QueryObject().
|
inline |
Definition at line 131 of file occtrl.h.
References GetBControlI().
|
inline |
Definition at line 103 of file occtrl.h.
References ocf::TOcPart::Flags, and ocf::TOcPart::OcxCancel.
|
inline |
Definition at line 101 of file occtrl.h.
References ocf::TOcPart::Flags, and ocf::TOcPart::OcxDefault.
|
protected |
Definition at line 419 of file occtrl.cpp.
References ocf::asAnyCommand, BCtrlI, ocf::TServedObject::Class, ocf::TAutoClass::FindId(), ocf::TAutoClass::GetArgCount(), ocf::IBControl::GetEventIID(), ocf::IBControl::GetEventTypeInfo(), ocf::TOcControlEvent::InitEventDispatch(), ITypeInfo, ocf::TAutoClass::Lookup(), OleStr, ocf::TOcControlEvent::pCtrl, pEvents, ocf::TOcControlEvent::pIEvents, ocf::TServedObject::QueryObject(), ocf::IBControl::SetEventDispatch(), and ocf::TAutoSymbol::TestFlag().
| void ocf::TOcControl::SetHeight | ( | long | Value | ) |
Definition at line 605 of file occtrl.cpp.
References ocf::TOcPart::SetSize(), ocf::TOcPart::Size, and ocf::TOcPart::UpdateRect().
|
inline |
| void ocf::TOcControl::SetLeft | ( | long | Value | ) |
Definition at line 572 of file occtrl.cpp.
References ocf::TOcPart::Pos, ocf::TOcPart::SetPos(), and ocf::TOcPart::UpdateRect().
| void ocf::TOcControl::SetTop | ( | long | Value | ) |
Definition at line 594 of file occtrl.cpp.
References ocf::TOcPart::Pos, ocf::TOcPart::SetPos(), and ocf::TOcPart::UpdateRect().
| void ocf::TOcControl::SetUserName | ( | owl::TString & | name | ) |
| void ocf::TOcControl::SetWidth | ( | long | Value | ) |
Definition at line 583 of file occtrl.cpp.
References ocf::TOcPart::SetSize(), ocf::TOcPart::Size, and ocf::TOcPart::UpdateRect().
|
protectedvirtual |
Implements ocf::IBControlSite.
Definition at line 665 of file occtrl.cpp.
References ocf::TOcView::ForwardEvent(), ocf::TOcDocument::GetActiveView(), HR_FAIL, MAP_LOGHIM_TO_PIX, MAP_PIX_TO_LOGHIM, OC_VIEWTRANSFORMCOORDS, ocf::TOcPart::OcDocument, owl::tPOINTF::x, and owl::tPOINTF::y.
|
protected |
|
protected |
|
protected |
|
protected |