|
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 &iid, 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 &iid, 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 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::GetName(), pEvents, pEventsOwnership, and pUserName.
| 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 pEventsOwnership.
|
protected |
Definition at line 251 of file occtrl.cpp.
References EventList, pEvents, pEventsOwnership, pIExtended, pUserName, and ocf::TServedObject::Release().
|
protected |
Definition at line 500 of file occtrl.cpp.
References ocf::TRegistrar::GetAppDescriptor(), ocf::TOcApp::GetRegistrar(), and ocf::TOcPart::OcDocument.
| 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 EventList, ocf::TEventList::GetCount(), and GetEventTypeInfo().
| TOcView * ocf::TOcControl::GetActiveControlView | ( | ) |
Definition at line 491 of file occtrl.cpp.
References ocf::TOcDocument::GetActiveView(), and ocf::TOcPart::OcDocument.
| 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(), and ocf::IBControl::GetEventTypeInfo().
| 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(), and ocf::TOcPart::OcDocument.
| TString & ocf::TOcControl::GetUserName | ( | ) |
Definition at line 548 of file occtrl.cpp.
References pUserName.
|
inlineprotectedvirtual |
Implements ocf::IBSite.
|
virtual |
Reimplemented from ocf::TOcPart.
Definition at line 265 of file occtrl.cpp.
References ocf::TOcPart::Init().
Implements ocf::IBControlSite.
Definition at line 698 of file occtrl.cpp.
|
protectedvirtual |
Perform common ctor initialization.
Reimplemented from ocf::TOcPart.
Definition at line 274 of file occtrl.cpp.
References 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::HRSucceeded(), ocf::ihLink, ocf::IBPart::Init(), ocf::TOcPart::InitObj(), ocf::iwNew, ocf::TOcPart::Link, ocf::TOcPart::OcDocument, pEvents, pIExtended, ocf::TOcPart::QueryInterface(), ocf::TServedObject::QueryObject(), ocf::TOcPart::Rename(), ocf::IBControl::SetAmbientDispatch(), SetEventDispatch(), ocf::TOcPart::Storage, ocf::TXObjComp::Throw(), TOcControlEvent, ocf::TXObjComp::xInternalPartError, and ocf::TXObjComp::xPartInitError.
Event support.
Implements ocf::IBControlSite.
Definition at line 616 of file occtrl.cpp.
References ocf::TOcDocument::GetActiveView(), HR_FAIL, HR_NOERROR, OC_CTRLEVENT_FOCUS, and ocf::TOcPart::OcDocument.
Implements ocf::IBControlSite.
Definition at line 635 of file occtrl.cpp.
References ocf::TOcDocument::GetActiveView(), HR_FAIL, HR_NOERROR, OC_CTRLEVENT_PROPERTYCHANGE, and ocf::TOcPart::OcDocument.
Implements ocf::IBControlSite.
Definition at line 650 of file occtrl.cpp.
References ocf::TOcDocument::GetActiveView(), HR_FAIL, HR_FALSE, HR_OK, OC_CTRLEVENT_PROPERTYREQUESTEDIT, and ocf::TOcPart::OcDocument.
Callback from TUnknown's implementation of QueryInterface.
Definition at line 518 of file occtrl.cpp.
References ocf::HRSucceeded(), pIExtended, PRECONDITION, ocf::TServedObject::QueryObject(), and ocf::TOcPart::QueryObject().
|
protected |
Definition at line 419 of file occtrl.cpp.
References ocf::asAnyCommand, BCtrlI, ocf::IBControl::GetEventIID(), ocf::IBControl::GetEventTypeInfo(), ocf::TOcControlEvent::InitEventDispatch(), OleStr, ocf::TOcControlEvent::pCtrl, pEvents, ocf::TOcControlEvent::pIEvents, and ocf::IBControl::SetEventDispatch().
Definition at line 605 of file occtrl.cpp.
References ocf::TOcPart::SetSize(), ocf::TOcPart::Size, and ocf::TOcPart::UpdateRect().
Definition at line 572 of file occtrl.cpp.
References ocf::TOcPart::Pos, ocf::TOcPart::SetPos(), and ocf::TOcPart::UpdateRect().
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 | ) |
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::TOcDocument::GetActiveView(), HR_FAIL, MAP_LOGHIM_TO_PIX, MAP_PIX_TO_LOGHIM, OC_VIEWTRANSFORMCOORDS, and ocf::TOcPart::OcDocument.
|
protected |
|
protected |
|
protected |
|
protected |