8#if !defined(OCF_OCAPP_H)
12#if defined(BI_HAS_PRAGMA_ONCE)
21#include <ocf/ocapp.rh>
41#if !defined(_OCMCLASS)
55 TOcFormatName(LPCTSTR fmtName, LPCTSTR fmtResultName, LPCTSTR
id = 0);
58 LPCTSTR
GetId()
const {
return Id.c_str();}
79 TOcFormatName*& operator [](
unsigned index) {
return Base::operator[](index);}
81 void Clear(
int del = 1) { Base::Flush(del==1);}
83 bool IsEmpty()
const {
return Base::Empty();}
88 return del ? Base::DestroyItem(item) : Base::DetachItem(item);
95#if defined(_OCFDLL) || defined(BI_APP_DLL)
125 void * GetFactory(
const GUID& clsid,
const GUID &
iid);
130 HINSTANCE BOleInstance;
132 TOcClassMgr* OcClassMgr;
158 void SetupWindow(HWND frameWnd);
169 virtual void ReleaseObject();
173 void RegisterClasses();
174 void UnregisterClasses();
178 void AddUserFormatName(LPCTSTR name, LPCTSTR resultName,
186 void EvActivate(
bool);
188 bool RegisterClass(
const owl::tstring& progid,
BCID classId,
bool multiUse);
190 {
return HRSucceeded(BServiceI->TranslateAccel(msg));}
192 {
return HRSucceeded(BServiceI->OnModalDialog(enable));}
194 {
return BServiceI->HelpMode(newMode);}
205 bool Convert(
TOcPart* ocPart,
bool b);
210 HRESULT BOleComponentCreate(IUnknown * * retIface,
218 {
return GetOuter()->QueryInterface(
iid, iface);}
235 HRESULT QueryObject(
const IID &
iid,
void * * iface);
243 LPCOLESTR
_IFUNC GetWindowTitle();
244 void _IFUNC AppendWindowTitle(LPCOLESTR title);
245 HRESULT
_IFUNC SetStatusText(LPCOLESTR text);
251 HRESULT
_IFUNC SetFrameMenu(HMENU hMenu);
253 HRESULT
_IFUNC Accelerator(MSG * msg);
254 HRESULT
_IFUNC GetAccelerators(HACCEL *,
int *);
258 LPCOLESTR
_IFUNC GetAppName();
261 HRESULT
_IFUNC CanEmbed();
263 HRESULT
_IFUNC OnModalDialog(BOOL svrModal);
265 void _IFUNC ShutdownMaybe();
269 HRESULT
_IFUNC ComponentCreate(IUnknown * * ret,
271 HRESULT
_IFUNC ComponentInfoGet(IUnknown * * info,
320 new TOcApp(*
this, options, host, frameHost);
328 new TOcApp(*
this, options, retOcApp);
336#define WM_BCXNAME (0x7FFF-8)
337#define WM_OCEVENT (WM_BCXNAME-1)
342#define OC_APPINSMENUS 0x0100
343#define OC_APPMENUS 0x0101
344#define OC_APPPROCESSMSG 0x0102
345#define OC_APPFRAMERECT 0x0103
346#define OC_APPBORDERSPACEREQ 0x0104
347#define OC_APPBORDERSPACESET 0x0105
348#define OC_APPSTATUSTEXT 0x0106
349#define OC_APPRESTOREUI 0x0107
350#define OC_APPDIALOGHELP 0x0108
351#define OC_APPSHUTDOWN 0x0109
352#define OC_APPGETACCEL 0x010A
442 bool EvOcAppProcessMsg(MSG * msg);
444 bool EvOcAppBorderSpaceReq(
owl::TRect * rect);
445 bool EvOcAppBorderSpaceSet(
owl::TRect * rect);
446 void EvOcAppStatusText(
const char * rect);
447 void EvOcAppRestoreUI();
449 bool EvOcAppShutdown();
457 owl::TResult ForwardEvent(
int eventId,
const void* param);
478 InitOptions = options;
OLE Automation Class Definitions.
IClassMgr abstract base class.
IBDataConsumer – Supported by containers who want to accept drag/drop and paste.
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)
TOcAppFrameHost(TOcApp *ocApp=0)
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.
void SetWindow(HWND hWnd)
HWND EvOcGetWindow() const
TOcAppFrameHostMsg(TOcApp *ocApp)
OCF Application host class. Owner of & host for a TOcApp object.
bool IsOptionSet(owl::uint32 option) const
virtual void ReleaseOcObject()
virtual void AttachHost(TOcApp *ocApp)
TRegistrar & GetRegistrar()
void OcInit(TOcRegistrar ®istrar, owl::uint32 options)
friend class _ICLASS TOcPart
friend class _ICLASS TOcDocument
owl::ulong _IFUNC AddRef()
friend class _ICLASS TOcView
TOcHelp AppHelpMode(TOcHelp newMode)
owl::ulong _IFUNC Release()
friend class _ICLASS TOcRemView
TOcAppFrameHost * FrameHost
owl::tstring GetName() const
void SetOption(owl::uint32 bit, bool state)
bool TranslateAccel(MSG *msg)
bool EvSetFocus(bool set)
virtual void ReleaseObject()
Should only be called by the owner/creator of this object.
friend class _ICLASS TOcClassMgr
bool IsOptionSet(owl::uint32 option) const
HRESULT _IFUNC QueryInterface(const GUID &iid, void **iface)
TOcNameList & GetNameList()
TOcRegistrar & GetRegistrar()
bool ModalDialog(bool enable)
Data Provider object for a container document.
bool Detach(TOcFormatName *item, bool del=false)
int Add(TOcFormatName *name)
bool Find(const TOcFormatName *name)
OC part class represents an embeded or linked part in a document.
Linking & embeding version of the Registrar.
friend class _ICLASS TOcApp
void CreateOcApp(owl::uint32 options, TOcAppHost *host, TOcAppFrameHost *frameHost)
Object to initialize OLE and access memory manager.
Application registration manager interface class.
Standard implementation of a controlling IUnknown for an object, to be inherited with other COM inter...
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.
Reference to reference counted string object TUString Lightweight reference object consisting of a po...
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 ...
Object Component Framework (COM encapsulation)
IUnknown *(* TComponentFactory)(IUnknown *outer, owl::uint32 options, owl::uint32 id)
bool HRSucceeded(HRESULT hr)
class _ICLASS IBApplication
Object Windows Library (OWLNext Core)
LPARAM TParam2
Second parameter type.
LRESULT TResult
Result type.
TModule & GetGlobalModule()
ObjectComponents BOcOle engine linking & embedding interfaces.
Definition of TOcDataProvider Class.
Various general OC enums and structs.
OLE Registration definitions.
owl::TPointer< ocf::TRegistrar > Registrar
Global registrar object defined by the client application.