114 BServiceI->Init(
this);
164 Registrar.AppCount--;
319 BServiceI->OnResize();
329 BServiceI->OnActivate(
active);
346 return BServiceI ?
HRIsOK(BServiceI->CanClose()) :
true;
358 return BServiceI ?
HRIsOK(BServiceI->Browse(&init)) :
false;
364 return BServiceI ?
HRIsOK(BServiceI->BrowseControls(&init)) :
false;
370 return BServiceI ?
HRIsOK(BServiceI->BrowseClipboard(&init)):
false;
376 return BServiceI ?
HRIsOK(BServiceI->Paste(&init)) :
false;
391 return BServiceI ?
HRIsOK(BServiceI->Clip(
bPartI,
true,
true,
true)) :
false;
405 BServiceI->Clip(0,
false,
false,
false);
409 return HRIsOK(BServiceI->Clip(
ocData,
true,
true,
false));
490TOcApp::InsertContainerMenus(
HMENU hMenu, TOcMenuWidths *
omw)
500 for (
i = 0;
i < 6;
i++) {
510 for (
i = 0;
i < 6;
i++)
531TOcApp::Accelerator(
MSG*
msg)
586TOcApp::GetWindowRect(
TRect*
r)
597TOcApp::GetWindowTitle()
700TOcApp::ShutdownMaybe()
703 "ShutdownMaybe() on " << (
void*)
this <<
705 " Win:" <<
hex <<
static_cast<void*
>(GetWindow()));
731 void SetApp(TOcApp*
app) {OcApp =
app;}
735 {
return GetOuter()->QueryInterface(iid,
iface);}
758TOcClassMgr::~TOcClassMgr()
769TOcClassMgr::Release()
800 OcApp->ShutdownMaybe ();
807TOcClassMgr::ComponentInfoGet(IUnknown * *
info, IUnknown * ,
815TOcClassMgr::QueryObject(
const IID &
iid,
void * *
iface)
866 OcClassMgr->AddRef();
874 OcClassMgr->Release();
962 OcClassMgr->SetApp(
app);
1014#ifdef NT_PREFERS_UNICODE_INSTEAD_OF_ANSI
1061 Id( id ? id :
_T(
""))
1193 if (::IsWindow(
hWnd))
1203 if (::IsWindow(
hWnd))
TAppDescriptor - OLE application descriptor definitions.
OLE Automation Class Definitions.
#define PRECONDITION(condition)
#define DIAG_DECLARE_GROUP(group)
#define TRACEX(group, level, message)
#define DIAG_DEFINE_GROUP_INIT(f, g, e, l)
IBClass – Supported by BOleFactory.
IClassMgr abstract base class.
virtual HRESULT _IFUNC ComponentCreate(IUnknown **ppRet, IUnknown *pAggregator, BCID classId)=0
IBContainer – Supported by container app's document window.
IBDataConsumer – Supported by containers who want to accept drag/drop and paste.
IBPart – Supported by server objects.
const owl::TRegLink * GetRegLinkHead() const
LPCTSTR GetAppName(owl::TLangId lang)
owl::TRegLink * GetRegLink(const GUID &clsid)
Get the document template with the given GUID.
OCF Application frame window host class. Receives window events from OcApp.
virtual void EvOcAppRestoreUI()=0
virtual HWND EvOcGetWindow() const =0
virtual bool EvOcAppInsMenus(TOcMenuDescr &sharedMenu)=0
virtual void SetWindow(HWND)
virtual bool EvOcAppProcessMsg(MSG *msg)=0
virtual bool EvOcAppGetAccel(TOcGetAccel *acc)=0
virtual void EvOcAppDialogHelp(TOcDialogHelp &dh)=0
virtual bool EvOcAppShutdown()=0
virtual bool EvOcAppBorderSpaceReq(owl::TRect *rect)=0
virtual bool EvOcAppFrameRect(owl::TRect *rect)=0
virtual void EvOcAppStatusText(const char *rect)=0
virtual bool EvOcAppMenus(TOcMenuDescr &md)=0
virtual bool EvOcAppBorderSpaceSet(owl::TRect *rect)=0
virtual void ReleaseOcObject()
Default implementation of frame window host that uses messages.
bool EvOcAppBorderSpaceReq(owl::TRect *rect)
bool EvOcAppBorderSpaceSet(owl::TRect *rect)
void EvOcAppStatusText(const char *rect)
owl::TResult ForwardEvent(int eventId, const void *param)
HWND EvOcGetWindow() const
bool EvOcAppMenus(TOcMenuDescr &md)
bool EvOcAppInsMenus(TOcMenuDescr &sharedMenu)
bool EvOcAppProcessMsg(MSG *msg)
bool EvOcAppGetAccel(TOcGetAccel *acc)
void EvOcAppDialogHelp(TOcDialogHelp &dh)
bool EvOcAppFrameRect(owl::TRect *rect)
OCF Application host class. Owner of & host for a TOcApp object.
virtual void ReleaseOcObject()
virtual void AttachHost(TOcApp *ocApp)
HRESULT BOleComponentCreate(IUnknown **retIface, IUnknown *outer, owl::uint32 idClass)
Create a BOle helper for one of our OC objects in this app.
void UnregisterClasses()
Unregister doc class factories based on their 'progid' and their templates.
bool Convert(TOcPart *ocPart, bool b)
Open the Convert dialog, and perform the conversion if OK.
bool Paste(TOcInitInfo &initInfo)
void AddUserFormatName(LPCTSTR name, LPCTSTR resultName, LPCTSTR id=0)
Add a user defined clipboard format name.
owl::ulong _IFUNC AddRef()
bool BrowseClipboard(TOcInitInfo &initInfo)
bool BrowseControls(TOcInitInfo &initInfo)
void EvResize()
Let BOle know that the main window has resized.
bool Copy(TOcPart *ocPart)
Copy Selected embedded object.
~TOcApp()
Clean up this object be releasing all helpers.
owl::ulong _IFUNC Release()
void SetupWindow(TOcAppFrameHost *frameHost)
TOcAppFrameHost * FrameHost
bool RegisterClass(const owl::tstring &progid, BCID classId, bool multiUse)
virtual void ReleaseObject()
Should only be called by the owner/creator of this object.
HRESULT QueryObject(const IID &iid, void **iface)
Callback from TUnknown's implementation of QueryInterface.
bool Browse(TOcInitInfo &initInfo)
bool IsOptionSet(owl::uint32 option) const
owl::uint EnableEditMenu(TOcMenuEnable enable, IBDataConsumer *ocview)
bool UnregisterClass(const owl::tstring &progid)
void RegisterClasses()
Register doc factories based on their 'progid' and their templates.
TOcApp(TOcRegistrar ®istrar, owl::uint32 options, TOcAppHost *host, TOcAppFrameHost *frameHost)
New constructor for TOcApp using host interfaces.
void EvActivate(bool)
Let BOle know that the main window has [de]activated.
bool Drag(TOcDataProvider *ocData, TOcDropAction inAction, TOcDropAction &outAction)
Drag a selection.
TOcRegistrar & GetRegistrar()
Data Provider object for a container document.
TOcInitInfo(IBContainer *container)
int Add(TOcFormatName *name)
TOcFormatName *& operator[](unsigned index)
OC part class represents an embeded or linked part in a document.
Linking & embeding version of the Registrar.
void LoadBOle()
Dynamically load the OcOle Dll, get the one entry point that we need & make the class manager object ...
TOcRegistrar(owl::TRegList ®Info, TComponentFactory callback, owl::uint32 preselectedOptions, owl::tstring &cmdLine, owl::TRegLink *linkHead=0, owl::TModule *module=&owl::GetGlobalModule())
The 'preselectedOptions' parameter enables to preserve old (pre 6.40) behaviour (see Bug #376): Set t...
IBClassMgr * CreateBOleClassMgr()
void * GetFactory(const GUID &clsid, const GUID &iid)
Override TRegistrar's GetFactory to provide additional factory support using BOle factories.
Application registration manager interface class.
bool IsOptionSet(owl::uint32 option) const
TAppDescriptor & GetAppDescriptor()
owl::uint32 GetOptions() const
virtual void Shutdown(IUnknown *releasedObj, owl::uint32 options)
virtual void * GetFactory(const GUID &clsid, const GUID &iid)
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
TRect is a mathematical class derived from tagRect.
A linked structure in which each node points to a list of TRegList objects (or TRegList-derived objec...
A registration parameter table, composed of a list of TRegItems.
#define ocrSingleUse
Single client per instance.
Include for OC, gets common headers when precompiled headers are enabled.
Object Component Framework (COM encapsulation)
IUnknown *(* TComponentFactory)(IUnknown *outer, owl::uint32 options, owl::uint32 id)
HRESULT HRFailIfZero(int bexpr)
bool HRSucceeded(HRESULT hr)
class _ICLASS TOcClassMgr
HRESULT(PASCAL * TCreateClassMgr)(IUnknown **, IUnknown *, IMalloc *)
const BCID cidBOleFactory
@ amAutomation
set from cmdline when EXE lauched for automation
@ amSingleUse
set from app reg, may be forced on per instance
@ amServedApp
per instance flag, app refcnt held by container
@ amExeMode
may be overridden per instance if running DLL
@ amExeModule
set for EXE components, 0 if DLL inproc server
@ amDebug
user requested launching for debugging
@ amEmbedding
cmdline, overridden per Instance if embedded DLL
@ amRun
set in factory call to run application msg loop
const BCID cidBOleService
Object Windows Library (OWLNext Core)
LPARAM TParam2
Second parameter type.
LRESULT TResult
Result type.
TModule & GetGlobalModule()
const TLangId LangSysDefault
Definition of TOcApp application connection class.
#define OC_APPBORDERSPACESET
#define OC_APPBORDERSPACEREQ
Definition of TOcPart class.
OLE Registration definitions.
owl::TPointer< ocf::TRegistrar > Registrar
Global registrar object defined by the client application.
#define CONST_CAST(targetType, object)