OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
ocf::TOcApp Class Reference

OCF Application class. More...

#include <ocf/ocapp.h>

Inheritance diagram for ocf::TOcApp:
ocf::TUnknown ocf::IBApplication ocf::IBClassMgr

Public Member Functions

 TOcApp (TOcRegistrar &registrar, owl::uint32 options, TOcAppHost *host, TOcAppFrameHost *frameHost)
 New constructor for TOcApp using host interfaces.
 
void SetupWindow (TOcAppFrameHost *frameHost)
 
 TOcApp (TOcRegistrar &registrar, owl::uint32 options, TOcApp *&retOcApp)
 Compatibility constructor & SetupWindow for TOcApp.
 
void SetupWindow (HWND frameWnd)
 
TOcRegistrarGetRegistrar ()
 
owl::tstring GetName () const
 
bool IsOptionSet (owl::uint32 option) const
 
void SetOption (owl::uint32 bit, bool state)
 
virtual void ReleaseObject ()
 Should only be called by the owner/creator of this object.
 
void RegisterClasses ()
 Register doc factories based on their 'progid' and their templates.
 
void UnregisterClasses ()
 Unregister doc class factories based on their 'progid' and their templates.
 
void AddUserFormatName (LPCTSTR name, LPCTSTR resultName, LPCTSTR id=0)
 Add a user defined clipboard format name.
 
TOcNameListGetNameList ()
 
bool UnregisterClass (const owl::tstring &progid)
 
void EvResize ()
 Let BOle know that the main window has resized.
 
void EvActivate (bool)
 Let BOle know that the main window has [de]activated.
 
bool EvSetFocus (bool set)
 
bool RegisterClass (const owl::tstring &progid, BCID classId, bool multiUse)
 
bool TranslateAccel (MSG *msg)
 
bool ModalDialog (bool enable)
 
TOcHelp AppHelpMode (TOcHelp newMode)
 
bool CanClose ()
 
bool Browse (TOcInitInfo &initInfo)
 
bool BrowseControls (TOcInitInfo &initInfo)
 
bool BrowseClipboard (TOcInitInfo &initInfo)
 
bool Paste (TOcInitInfo &initInfo)
 
bool Copy (TOcPart *ocPart)
 Copy Selected embedded object.
 
bool Copy (TOcDataProvider *ocData)
 Copy a selection in server document.
 
bool Drag (TOcDataProvider *ocData, TOcDropAction inAction, TOcDropAction &outAction)
 Drag a selection.
 
bool Drag (TOcPart *ocData, TOcDropAction inAction, TOcDropAction &outAction)
 Drag an embedded object.
 
bool Convert (TOcPart *ocPart, bool b)
 Open the Convert dialog, and perform the conversion if OK.
 
owl::uint EnableEditMenu (TOcMenuEnable enable, IBDataConsumer *ocview)
 
HRESULT BOleComponentCreate (IUnknown **retIface, IUnknown *outer, owl::uint32 idClass)
 Create a BOle helper for one of our OC objects in this app.
 
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)
 

Protected Member Functions

 ~TOcApp ()
 Clean up this object be releasing all helpers.
 
HRESULT QueryObject (const IID &iid, void **iface)
 Callback from TUnknown's implementation of QueryInterface.
 
- Protected Member Functions inherited from ocf::TUnknown
 TUnknown ()
 
virtual ~TUnknown ()
 
IUnknown & ThisUnknown ()
 
virtual HRESULT QueryObject (const GUID &iid, void **pif)
 QueryObject used when TUnknown is in constructor/destructor.
 

Protected Attributes

owl::uint32 Options
 
bool Registered
 
TOcAppHostHost
 
TOcAppFrameHostFrameHost
 
TOcApp ** OcAppPtr
 
- Protected Attributes inherited from ocf::TUnknown
IUnknown * Outer
 

Friends

class _ICLASS TOcDocument
 
class _ICLASS TOcPart
 
class _ICLASS TOcRemView
 
class _ICLASS TOcView
 
class _ICLASS TOcClassMgr
 

Detailed Description

OCF Application class.

Definition at line 142 of file ocapp.h.

Constructor & Destructor Documentation

◆ TOcApp() [1/2]

ocf::TOcApp::TOcApp ( TOcRegistrar & registrar,
owl::uint32 options,
TOcAppHost * host,
TOcAppFrameHost * frameHost )

New constructor for TOcApp using host interfaces.

Definition at line 61 of file ocapp.cpp.

References ocf::TOcAppHost::AttachHost(), Host, PRECONDITION, RegisterClasses(), and TRACEX.

◆ TOcApp() [2/2]

ocf::TOcApp::TOcApp ( TOcRegistrar & registrar,
owl::uint32 options,
TOcApp *& retOcApp )

Compatibility constructor & SetupWindow for TOcApp.

Definition at line 29 of file ocapp.cpp.

References OcAppPtr, RegisterClasses(), and TRACEX.

◆ ~TOcApp()

Member Function Documentation

◆ AddRef()

owl::ulong _IFUNC ocf::TOcApp::AddRef ( )
inline

Definition at line 215 of file ocapp.h.

◆ AddUserFormatName()

void ocf::TOcApp::AddUserFormatName ( LPCTSTR name,
LPCTSTR resultName,
LPCTSTR id = 0 )

Add a user defined clipboard format name.

Definition at line 294 of file ocapp.cpp.

References ocf::TOcNameList::Add().

◆ AppHelpMode()

TOcHelp ocf::TOcApp::AppHelpMode ( TOcHelp newMode)
inline

Definition at line 193 of file ocapp.h.

◆ BOleComponentCreate()

HRESULT ocf::TOcApp::BOleComponentCreate ( IUnknown ** retIface,
IUnknown * outer,
owl::uint32 idClass )

Create a BOle helper for one of our OC objects in this app.

Definition at line 213 of file ocapp.cpp.

References ocf::IBClassMgr::ComponentCreate().

◆ Browse()

bool ocf::TOcApp::Browse ( TOcInitInfo & initInfo)

Definition at line 356 of file ocapp.cpp.

References ocf::HRIsOK().

◆ BrowseClipboard()

bool ocf::TOcApp::BrowseClipboard ( TOcInitInfo & initInfo)

Definition at line 368 of file ocapp.cpp.

References ocf::HRIsOK().

◆ BrowseControls()

bool ocf::TOcApp::BrowseControls ( TOcInitInfo & initInfo)

Definition at line 362 of file ocapp.cpp.

References ocf::HRIsOK().

◆ CanClose()

bool ocf::TOcApp::CanClose ( )

Definition at line 344 of file ocapp.cpp.

References ocf::HRIsOK().

◆ Convert()

bool ocf::TOcApp::Convert ( TOcPart * ocPart,
bool b )

Open the Convert dialog, and perform the conversion if OK.

return true if conversion was perfromed successfully.

Definition at line 448 of file ocapp.cpp.

References ocf::HRIsOK(), ocf::HRSucceeded(), and PRECONDITION.

◆ Copy() [1/2]

bool ocf::TOcApp::Copy ( TOcDataProvider * ocData)

Copy a selection in server document.

Definition at line 400 of file ocapp.cpp.

References ocf::HRIsOK(), and PRECONDITION.

◆ Copy() [2/2]

bool ocf::TOcApp::Copy ( TOcPart * ocPart)

Copy Selected embedded object.

Definition at line 383 of file ocapp.cpp.

References ocf::HRIsOK().

◆ Drag() [1/2]

bool ocf::TOcApp::Drag ( TOcDataProvider * ocData,
TOcDropAction inAction,
TOcDropAction & outAction )

Drag a selection.

Definition at line 416 of file ocapp.cpp.

References ocf::HRSucceeded(), and PRECONDITION.

◆ Drag() [2/2]

bool ocf::TOcApp::Drag ( TOcPart * ocData,
TOcDropAction inAction,
TOcDropAction & outAction )

Drag an embedded object.

Definition at line 427 of file ocapp.cpp.

References ocf::HRSucceeded().

◆ EnableEditMenu()

uint ocf::TOcApp::EnableEditMenu ( TOcMenuEnable enable,
IBDataConsumer * ocview )

Definition at line 350 of file ocapp.cpp.

◆ EvActivate()

void ocf::TOcApp::EvActivate ( bool active)

Let BOle know that the main window has [de]activated.

Definition at line 326 of file ocapp.cpp.

◆ EvResize()

void ocf::TOcApp::EvResize ( )

Let BOle know that the main window has resized.

In-place servers may need to adjust their toolbars

Definition at line 316 of file ocapp.cpp.

◆ EvSetFocus()

bool ocf::TOcApp::EvSetFocus ( bool set)
inline

Definition at line 187 of file ocapp.h.

References ocf::HRSucceeded().

◆ GetName()

owl::tstring ocf::TOcApp::GetName ( ) const
inline

Definition at line 163 of file ocapp.h.

References ocf::Name.

◆ GetNameList()

TOcNameList & ocf::TOcApp::GetNameList ( )
inline

Definition at line 180 of file ocapp.h.

◆ GetRegistrar()

TOcRegistrar & ocf::TOcApp::GetRegistrar ( )
inline

Definition at line 162 of file ocapp.h.

References Registrar.

◆ IsOptionSet()

bool ocf::TOcApp::IsOptionSet ( owl::uint32 option) const
inline

Definition at line 302 of file ocapp.h.

References Options, and owl::ToBool().

◆ ModalDialog()

bool ocf::TOcApp::ModalDialog ( bool enable)
inline

Definition at line 191 of file ocapp.h.

References ocf::HRSucceeded().

◆ Paste()

bool ocf::TOcApp::Paste ( TOcInitInfo & initInfo)

Definition at line 374 of file ocapp.cpp.

References ocf::HRIsOK().

◆ QueryInterface()

HRESULT _IFUNC ocf::TOcApp::QueryInterface ( const GUID & iid,
void ** iface )
inline

Definition at line 217 of file ocapp.h.

◆ QueryObject()

HRESULT ocf::TOcApp::QueryObject ( const IID & iid,
void ** iface )
protected

Callback from TUnknown's implementation of QueryInterface.

Definition at line 191 of file ocapp.cpp.

◆ RegisterClass()

bool ocf::TOcApp::RegisterClass ( const owl::tstring & progid,
BCID classId,
bool multiUse )

Definition at line 333 of file ocapp.cpp.

References ocf::HRSucceeded(), OleStr, and owl::ToBool().

◆ RegisterClasses()

◆ Release()

owl::ulong _IFUNC ocf::TOcApp::Release ( )
inline

Definition at line 216 of file ocapp.h.

◆ ReleaseObject()

void ocf::TOcApp::ReleaseObject ( )
virtual

Should only be called by the owner/creator of this object.

Definition at line 173 of file ocapp.cpp.

References ocf::amServedApp, FrameHost, Host, IsOptionSet(), Release(), ocf::TOcAppHost::ReleaseOcObject(), and ocf::TOcAppFrameHost::ReleaseOcObject().

◆ SetOption()

void ocf::TOcApp::SetOption ( owl::uint32 bit,
bool state )
inline

Definition at line 308 of file ocapp.h.

References Options.

◆ SetupWindow() [1/2]

void ocf::TOcApp::SetupWindow ( HWND frameWnd)

◆ SetupWindow() [2/2]

void ocf::TOcApp::SetupWindow ( TOcAppFrameHost * frameHost)

Definition at line 86 of file ocapp.cpp.

References FrameHost.

◆ TranslateAccel()

bool ocf::TOcApp::TranslateAccel ( MSG * msg)
inline

Definition at line 189 of file ocapp.h.

References ocf::HRSucceeded().

◆ UnregisterClass()

bool ocf::TOcApp::UnregisterClass ( const owl::tstring & progid)

Definition at line 304 of file ocapp.cpp.

References ocf::HRSucceeded(), and OleStr.

◆ UnregisterClasses()

void ocf::TOcApp::UnregisterClasses ( )

Unregister doc class factories based on their 'progid' and their templates.

Definition at line 272 of file ocapp.cpp.

References ocf::amDebug, ocf::TRegistrar::GetAppDescriptor(), GetRegistrar(), ocf::TAppDescriptor::GetRegLinkHead(), IsOptionSet(), Registered, ocf::TXObjComp::Throw(), UnregisterClass(), and ocf::TXObjComp::xDocFactoryFail.

Friends And Related Symbol Documentation

◆ TOcClassMgr

friend class _ICLASS TOcClassMgr
friend

Definition at line 292 of file ocapp.h.

◆ TOcDocument

Definition at line 288 of file ocapp.h.

◆ TOcPart

Definition at line 289 of file ocapp.h.

◆ TOcRemView

Definition at line 290 of file ocapp.h.

◆ TOcView

Definition at line 291 of file ocapp.h.

Member Data Documentation

◆ FrameHost

TOcAppFrameHost* ocf::TOcApp::FrameHost
protected

Definition at line 226 of file ocapp.h.

◆ Host

TOcAppHost* ocf::TOcApp::Host
protected

Definition at line 225 of file ocapp.h.

◆ OcAppPtr

TOcApp** ocf::TOcApp::OcAppPtr
protected

Definition at line 229 of file ocapp.h.

◆ Options

owl::uint32 ocf::TOcApp::Options
protected

Definition at line 222 of file ocapp.h.

◆ Registered

bool ocf::TOcApp::Registered
protected

Definition at line 223 of file ocapp.h.


The documentation for this class was generated from the following files: