Class Hierarchy   File List   Compound Members  

CHoopsControl Class Reference

The CHoopsControl class encapsulates the connection of HOOPS/3dGS to a COleControl object. More...

#include <CHoopsControl.h>

List of all members.

Public Methods

HCtrlViewGetHoopsView ( void )
bool LoadFromUrl (CString const & urlname)
bool FullyQualifyUrl (CString & urlname)
void Copy (void)
void Print (CString csDocumentName)
bool GetFastPrint (void)
void SetFastPrint (bool fastprint)
bool GetMetaPrint (void)
void SetMetaPrint (bool metaprint)
int GetMetafileType (void)
void SetMetafileType (int emf_or_wmf)
bool GetFirstUpdate ()
void SetFirstUpdate (bool firstupdate)
bool GetClipboardTruecolor (void)
void SetClipboardTruecolor (bool truecolor)
void SetEmbedded (BOOL bVal)
BOOL IsEmbedded (void)
virtual void OnDraw (CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid)
virtual BOOL Create (LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL)

Public Attributes

bool m_bBlockStreamingUpdate

Protected Methods

virtual BOOL PreCreateWindow (CREATESTRUCT& cs)
afx_msg void OnKeyDown (UINT nChar, UINT nRepCnt, UINT nFlags)
afx_msg void OnKeyUp (UINT nChar, UINT nRepCnt, UINT nFlags)
afx_msg void OnLButtonDblClk (UINT nFlags, CPoint point)
afx_msg void OnLButtonDown (UINT nFlags, CPoint point)
afx_msg void OnLButtonUp (UINT nFlags, CPoint point)
afx_msg void OnMouseMove (UINT nFlags, CPoint point)
afx_msg void OnRButtonDblClk (UINT nFlags, CPoint point)
afx_msg void OnRButtonDown (UINT nFlags, CPoint point)
afx_msg void OnRButtonUp (UINT nFlags, CPoint point)

Protected Attributes

HBaseModel* m_pHoopsModel
HCtrlViewm_pHoopsView
bool m_bRequiresFitting
bool m_bFastPrint
bool m_bMetaPrint
bool m_bClipboardTruecolor
int m_MetafileType
CHoopsDataLoader* m_pDataLoader


Detailed Description

The CHoopsControl class encapsulates the connection of HOOPS/3dGS to a COleControl object.

CHoopsControl creates and manages the connection of a HOOPS/3dGS driver instance to a COleControl object, which includes properly updating ths window during in place activation/de-activation. It also encapsulates the logic necessary for asynchronous streaming of HOOPS Stream Files (.hsf) from an URL by utilizing the CDataPathProperty object, as well as the HOOPS/Stream Toolkit (via the HStreamFileToolkit object).

Support is provided for printing, copying to cliboard, and embedding .hsf or .hmf file data inside MSOffice documents,

This is the base class from which all custom HOOPS-based ActiveX controls should be derived.


Member Function Documentation

void CHoopsControl::Copy ( void )

Copies the scene to the clipboard.

BOOL CHoopsControl::Create ( LPCTSTR lpszClassName,
LPCTSTR lpszWindowName,
DWORD dwStyle,
const RECT & rect,
CWnd * pParentWnd,
UINT nID,
CCreateContext * pContext = NULL ) [virtual]

We overload the Create method to modify the CWnd window style; necessary for OpenGL support

bool CHoopsControl::FullyQualifyUrl ( CString & urlname )

FullyQualifyUrl constructs a fully-qualified URL name from several different types of strings.

Parameters:
urlname   A URL in one of the followiing forms:
  1. A fully qualified URL: http://www.techsoft.com/gasket.hmf
  2. A filename in the same location as the html page: gasket.hmf
  3. A relative path from the location of the html page: ../hmf/gasket.hmf
  4. A virtual path from the root of the web server: /hmf/gasket.hmf
Passed by reference.
Returns:
A Boolean value indicating success or failure.

bool CHoopsControl::GetClipboardTruecolor ( void ) [inline]

Returns:
A Boolean indicating whether copying to clipboard uses mapped or true color. The default is true.

bool CHoopsControl::GetFastPrint ( void ) [inline]

Returns:
A Boolean indicating whether native GDI printing or a fast bitmap blit will be used for printing. The default is true.

bool CHoopsControl::GetFirstUpdate ( ) [inline]

Returns:
A Boolean indicating whether the first update has occurred.

HCtrlView * CHoopsControl::GetHoopsView ( void ) [inline]

Returns:
A pointer to the HOOPS/MVO HCtrlView object associated with the CHoopsControl object

bool CHoopsControl::GetMetaPrint ( void ) [inline]

Returns:
A Boolean indicating whether a HOOPS metafile (hmf) will be written during printing (see Print). The default is false.

int CHoopsControl::GetMetafileType ( void ) [inline]

Returns:
An integer indicating whether an emf or wmf will be for clipboard rendering. The default is EMF.

BOOL CHoopsControl::IsEmbedded ( void )

Returns:
A Boolean indicating whether the HSF file is embedded inside the container document

bool CHoopsControl::LoadFromUrl ( CString const & urlname )

LoadFromUrl loads a file that has a fully-qualified URL as its name into the HOOPS/MVO Model object, m_pHoopsModel.

Parameters:
urlname   A fully-qualified URL addrress (may be returned from the FullyQualifyUrl function).
Returns:
A Boolean value indicating success or failure.

void CHoopsControl::OnDraw ( CDC * pdc,
const CRect & rcBounds,
const CRect & rcInvalid ) [virtual]

Overloaded COleControl method. Instructs HOOPS to traverse the scene-graph and update the display

void CHoopsControl::OnKeyDown ( UINT nChar,
UINT nRepCnt,
UINT nFlags ) [protected]

Calls the OnKeyDown method of the view's current HOOPS/MVO HBaseOperator object. The GUI specific flags are mapped to HOOPS/MVO abstracted flags use the CHoopsControl::MapFlags method

void CHoopsControl::OnKeyUp ( UINT nChar,
UINT nRepCnt,
UINT nFlags ) [protected]

Calls the OnKeyUp method of the view's current HOOPS/MVO HBaseOperator object. The GUI specific flags are mapped to HOOPS/MVO abstracted flags use the CHoopsControl::MapFlags method

void CHoopsControl::OnLButtonDblClk ( UINT nFlags,
CPoint point ) [protected]

Calls the OnLButtonDblClk method of the view's current HOOPS/MVO HBaseOperator object. The GUI specific flags are mapped to HOOPS/MVO abstracted flags use the CHoopsControl::MapFlags method

void CHoopsControl::OnLButtonDown ( UINT nFlags,
CPoint point ) [protected]

Calls the OnLButtonDown method of the view's current HOOPS/MVO HBaseOperator object. The GUI specific flags are mapped to HOOPS/MVO abstracted flags use the CHoopsControl::MapFlags method

void CHoopsControl::OnLButtonUp ( UINT nFlags,
CPoint point ) [protected]

Calls the OnLButtonUp method of the view's current HOOPS/MVO HBaseOperator object. The GUI specific flags are mapped to HOOPS/MVO abstracted flags use the CHoopsControl::MapFlags method

void CHoopsControl::OnMouseMove ( UINT nFlags,
CPoint point ) [protected]

Calls the OnMouseMove method of the view's current HOOPS/MVO HBaseOperator object. The GUI specific flags are mapped to HOOPS/MVO abstracted flags use the CHoopsControl::MapFlags method

void CHoopsControl::OnRButtonDblClk ( UINT nFlags,
CPoint point ) [protected]

Calls the OnRButtonDblClk method of the view's current HOOPS/MVO HBaseOperator object. The GUI specific flags are mapped to HOOPS/MVO abstracted flags use the CHoopsControl::MapFlags method

void CHoopsControl::OnRButtonDown ( UINT nFlags,
CPoint point ) [protected]

Calls the OnRButtonDown method of the view's current HOOPS/MVO HBaseOperator object. The GUI specific flags are mapped to HOOPS/MVO abstracted flags use the CHoopsControl::MapFlags method

void CHoopsControl::OnRButtonUp ( UINT nFlags,
CPoint point ) [protected]

Calls the OnRButtonUp method of the view's current HOOPS/MVO HBaseOperator object. The GUI specific flags are mapped to HOOPS/MVO abstracted flags use the CHoopsControl::MapFlags method

BOOL CHoopsControl::PreCreateWindow ( CREATESTRUCT & cs ) [protected, virtual]

We overload the PreCreateWindow method to modify the CWnd window class; necessary for OpenGL support

void CHoopsControl::Print ( CString csDocumentName )

Prints the scene.

void CHoopsControl::SetClipboardTruecolor ( bool truecolor ) [inline]

Sets whether copying to clipboard uses mapped or true color. The default is true.

void CHoopsControl::SetEmbedded ( BOOL bVal )

Sets whether the HSF file is embedded inside the container document

void CHoopsControl::SetFastPrint ( bool fastprint ) [inline]

Sets whether native GDI printing or a fast bitmap blit will be used for printing. The default is true.

void CHoopsControl::SetFirstUpdate ( bool firstupdate ) [inline]

Sets whether the first view update has occurred.

void CHoopsControl::SetMetaPrint ( bool metaprint ) [inline]

Sets whether a HOOPS metafile (hmf) will be written during printing (see Print). The default is false.

void CHoopsControl::SetMetafileType ( int emf_or_wmf ) [inline]

Sets whether an emf or wmf will be used for clipboard rendering. The default is EMF.


Member Data Documentation

int CHoopsControl::m_MetafileType [protected]

Type of metafile generated when m_bMetaPrint==true, 0=WMF amd 1=EMF.

bool CHoopsControl::m_bBlockStreamingUpdate

If true, incremental view updates are suppressed while the user interacts with the scene (during a camera rotation operation, for example). Even though updates of geometry may be supressed, data streaming continues via the background thread. Default is false.

bool CHoopsControl::m_bClipboardTruecolor [protected]

If true, the scene will render to the clipboard in truecolor mode. The default is true.

bool CHoopsControl::m_bFastPrint [protected]

If true, the scene is rendered to an offscreen bitmap and stretch-blitted to the printer or Windows metafile during printing or copy to clipboard. The default is true.

bool CHoopsControl::m_bMetaPrint [protected]

If true, the scene is rendered to a windows metafile and then played to the printer. The default is false.

bool CHoopsControl::m_bRequiresFitting [protected]

If true, indicates that the camera needs to be reset to view the scene extents.

CHoopsDataLoader * CHoopsControl::m_pDataLoader [protected]

Pointer to the default HOOPS/ActiveX data loader object that encapsulates reading of HOOPS Stream Files.

HBaseModel * CHoopsControl::m_pHoopsModel [protected]

Pointer to HBaseModel MVO object associated with the control.

HCtrlView * CHoopsControl::m_pHoopsView [protected]

Pointer to HCtrlView MVO object associated with the control.


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


Copyright © 2000 Tech Soft 3D