Alphabetical Class Index   Namespace List  

hoops_panel.HNPanel Class Reference

The HNPanel class provides a HOOPS/MVO-specific implementation of the Winforms Panel class. More...

Public Member Functions

 HNPanel ()
 
void Init ()
 
new void OnKeyUp (KeyEventArgs e)
 
new void OnKeyDown (KeyEventArgs e)
 
new void OnKeyPress (KeyPressEventArgs e)
 
new void OnMouseWheel (MouseEventArgs e)
 
virtual void SetCurrentOperator (HBaseOperator new_operator)
 
new void LostFocus ()
 

Public Attributes

HBaseModel m_pHModel
 
HBaseView m_pHView
 
HSelectionSet m_pHSelection
 
IntPtr winid
 

Protected Member Functions

override void OnPaint (PaintEventArgs e)
 
override void OnPaintBackground (PaintEventArgs e)
 
override void OnResize (EventArgs eventargs)
 
override void OnMouseDown (MouseEventArgs e)
 
override void OnMouseDoubleClick (MouseEventArgs e)
 
override void OnMouseUp (MouseEventArgs e)
 
override void OnMouseMove (MouseEventArgs e)
 
virtual void OnLeftButtonDown (MouseEventArgs e)
 
virtual void OnLeftButtonUp (MouseEventArgs e)
 
virtual void OnLeftButtonDoubleClick (MouseEventArgs e)
 
virtual void OnRightButtonDown (MouseEventArgs e)
 
virtual void OnRightButtonUp (MouseEventArgs e)
 
virtual void OnRightButtonDoubleClick (MouseEventArgs e)
 
virtual void OnMidButtonDown (MouseEventArgs e)
 
virtual void OnMidButtonUp (MouseEventArgs e)
 
virtual void OnMidButtonDoubleClick (MouseEventArgs e)
 
uint MapFlags_Mouse (MouseEventArgs e)
 
uint MapModifierKeys (uint flags)
 
override void Dispose (bool disposing)
 

Protected Attributes

HBaseOperator m_pHOperator
 
int m_lastKeyPressed
 
int[] m_keyPairs
 

Detailed Description

The HNPanel class provides a HOOPS/MVO-specific implementation of the Winforms Panel class.

HNPanel creates and manages the connection of a HOOPS/3dGS driver instance to a Panel object, which includes redrawing the scene during exposes/resizes. It also encapsulates passing of mouse/keyboard events through to corresponding MVO operator methods.

This is the base class from which a custom HNPanel class should be derived, and should be used when the application is using both HOOPS/MVO and HOOPS/3dGS

Constructor & Destructor Documentation

hoops_panel.HNPanel.HNPanel ( )
inline

Constructor which attaches paint, panel-resize and MouseEvents with corresponding EventHandlers

References hoops_panel.HNPanel.m_keyPairs, and hoops_panel.HNPanel.winid.

Member Function Documentation

void hoops_panel.HNPanel.Init ( )
inline

The default implementation initializes the HBaseView object and the view key.

References HCS.Close_Segment(), HCS.Open_Segment_By_Key(), HCS.Set_Driver_Options(), and hoops_panel.HNPanel.m_pHView.

new void hoops_panel.HNPanel.LostFocus ( )
inline

Called when focus leaves the Panel. Resets the HBaseView object's key state.

References hoops_panel.HNPanel.m_pHView.

uint hoops_panel.HNPanel.MapModifierKeys ( uint  flags)
inlineprotected

Returns appropriate flag depending on whether shift, control or alt key is pressed

Parameters
flagsProvides information about which key is pressed or released
Returns
uint value which contains the information about which mouse button is pressed or released and which modifier key is pressed

Referenced by hoops_panel.HNPanel.MapFlags_Mouse(), hoops_panel.HNPanel.OnKeyDown(), hoops_panel.HNPanel.OnKeyPress(), and hoops_panel.HNPanel.OnKeyUp().

new void hoops_panel.HNPanel.OnKeyDown ( KeyEventArgs  e)
inline

This method is called from HNForm OnKeyDown method

It dispatches the OnKeyDown event to HOOPS/MVO, which will in turn dispatch it to the current HBaseOperator object The state flags are mapped to HOOPS/MVO abstracted flags

Parameters
eProvides data for System.Windows.Forms.Control.KeyDown event

References hoops_panel.HNPanel.m_lastKeyPressed, hoops_panel.HNPanel.m_pHView, and hoops_panel.HNPanel.MapModifierKeys().

new void hoops_panel.HNPanel.OnKeyPress ( KeyPressEventArgs  e)
inline

This method is called from HNForm OnKeyPress method

It dispatches the OnKeyDown event to HOOPS/MVO, which will in turn dispatch it to the current HBaseOperator object The state flags are mapped to HOOPS/MVO abstracted flags

Parameters
eProvides data for System.Windows.Forms.Control.KeyPress event

References hoops_panel.HNPanel.m_keyPairs, hoops_panel.HNPanel.m_lastKeyPressed, hoops_panel.HNPanel.m_pHView, and hoops_panel.HNPanel.MapModifierKeys().

new void hoops_panel.HNPanel.OnKeyUp ( KeyEventArgs  e)
inline

This method is called from HNForm OnKeyUp method

It dispatches the OnKeyUp event to HOOPS/MVO, which will in turn dispatch it to the current HBaseOperator object The state flags are mapped to HOOPS/MVO abstracted flags

Parameters
eProvides data for System.Windows.Forms.Control.KeyUp event

References hoops_panel.HNPanel.m_keyPairs, hoops_panel.HNPanel.m_pHView, and hoops_panel.HNPanel.MapModifierKeys().

virtual void hoops_panel.HNPanel.OnLeftButtonDoubleClick ( MouseEventArgs  e)
inlineprotectedvirtual

Dispatches the OnLeftButtonDoubleClick event to HOOPS/MVO, which will in turn dispatch it to the current HBaseOperator object The state flags are mapped to HOOPS/MVO abstracted flags

Parameters
eProvides data for the System.Windows.Forms.Control.MouseDoubleClick event

References hoops_panel.HNPanel.m_pHView, and hoops_panel.HNPanel.MapFlags_Mouse().

Referenced by hoops_panel.HNPanel.OnMouseDoubleClick().

virtual void hoops_panel.HNPanel.OnLeftButtonDown ( MouseEventArgs  e)
inlineprotectedvirtual

Dispatches the OnLeftButtonDown event to HOOPS/MVO, which will in turn dispatch it to the current HBaseOperator object The state flags are mapped to HOOPS/MVO abstracted flags

Parameters
eProvides data for the System.Windows.Forms.Control.MouseDown event

References hoops_panel.HNPanel.m_pHView, and hoops_panel.HNPanel.MapFlags_Mouse().

Referenced by hoops_panel.HNPanel.OnMouseDown().

virtual void hoops_panel.HNPanel.OnLeftButtonUp ( MouseEventArgs  e)
inlineprotectedvirtual

Dispatches the OnLeftButtonUp event to HOOPS/MVO, which will in turn dispatch it to the current HBaseOperator object The state flags are mapped to HOOPS/MVO abstracted flags

Parameters
eProvides data for the System.Windows.Forms.Control.MouseUp event

References hoops_panel.HNPanel.m_pHView, and hoops_panel.HNPanel.MapFlags_Mouse().

Referenced by hoops_panel.HNPanel.OnMouseUp().

virtual void hoops_panel.HNPanel.OnMidButtonDoubleClick ( MouseEventArgs  e)
inlineprotectedvirtual

Dispatches the OnMidButtonDoubleClick event to HOOPS/MVO, which will in turn dispatch it to the current HBaseOperator object The state flags are mapped to HOOPS/MVO abstracted flags

Parameters
eProvides data for the System.Windows.Forms.Control.MouseDoubleClick event

References hoops_panel.HNPanel.m_pHView, and hoops_panel.HNPanel.MapFlags_Mouse().

Referenced by hoops_panel.HNPanel.OnMouseDoubleClick().

virtual void hoops_panel.HNPanel.OnMidButtonDown ( MouseEventArgs  e)
inlineprotectedvirtual

Dispatches the OnMidButtonDown event to HOOPS/MVO, which will in turn dispatch it to the current HBaseOperator object The state flags are mapped to HOOPS/MVO abstracted flags

Parameters
eProvides data for the System.Windows.Forms.Control.MouseDown event

References hoops_panel.HNPanel.m_pHView, and hoops_panel.HNPanel.MapFlags_Mouse().

Referenced by hoops_panel.HNPanel.OnMouseDown().

virtual void hoops_panel.HNPanel.OnMidButtonUp ( MouseEventArgs  e)
inlineprotectedvirtual

Dispatches the OnMidButtonUp event to HOOPS/MVO, which will in turn dispatch it to the current HBaseOperator object The state flags are mapped to HOOPS/MVO abstracted flags

Parameters
eProvides data for the System.Windows.Forms.Control.MouseUp event

References hoops_panel.HNPanel.m_pHView, and hoops_panel.HNPanel.MapFlags_Mouse().

Referenced by hoops_panel.HNPanel.OnMouseUp().

override void hoops_panel.HNPanel.OnMouseDoubleClick ( MouseEventArgs  e)
inlineprotected

Passes control to the method depending on which Mouse Button is double clicked

Parameters
senderA reference to an object which is the root of the type hierarchy
eProvides data for the System.Windows.Forms.Control.MouseDoubleClick event

References hoops_panel.HNPanel.OnLeftButtonDoubleClick(), hoops_panel.HNPanel.OnMidButtonDoubleClick(), and hoops_panel.HNPanel.OnRightButtonDoubleClick().

override void hoops_panel.HNPanel.OnMouseDown ( MouseEventArgs  e)
inlineprotected

Passes control to the method depending on which Mouse Button is pressed

Parameters
senderA reference to an object which is the root of the type hierarchy
eProvides data for the System.Windows.Forms.Control.MouseDown event

References hoops_panel.HNPanel.OnLeftButtonDown(), hoops_panel.HNPanel.OnMidButtonDown(), and hoops_panel.HNPanel.OnRightButtonDown().

override void hoops_panel.HNPanel.OnMouseMove ( MouseEventArgs  e)
inlineprotected

Responds to MouseMove events and passes particular co-ordinates to hoops

Parameters
senderA reference to an object which is the root of the type hierarchy
eProvides data for the System.Windows.Forms.Control.MouseMove event

References hoops_panel.HNPanel.m_pHView, and hoops_panel.HNPanel.MapFlags_Mouse().

override void hoops_panel.HNPanel.OnMouseUp ( MouseEventArgs  e)
inlineprotected

Passes control to the method depending on which Mouse Button is Released

Parameters
senderA reference to an object which is the root of the type hierarchy
eProvides data for the System.Windows.Forms.Control.MouseUp event

References hoops_panel.HNPanel.OnLeftButtonUp(), hoops_panel.HNPanel.OnMidButtonUp(), and hoops_panel.HNPanel.OnRightButtonUp().

new void hoops_panel.HNPanel.OnMouseWheel ( MouseEventArgs  e)
inline

This method is called from HNForm OnMouseWheel method

It dispatches the OnMouseWheel event to HOOPS/MVO, which will in turn dispatch it to the current HBaseOperator object The state flags are mapped to HOOPS/MVO abstracted flags

Parameters
eProvides data for System.Windows.Forms.Control.MouseWheel

References hoops_panel.HNPanel.m_pHView, and hoops_panel.HNPanel.MapFlags_Mouse().

override void hoops_panel.HNPanel.OnPaint ( PaintEventArgs  e)
inlineprotected

Instructs HOOPS to redraw the scene

Parameters
senderA reference to an object which is the root of the type hierarchy
eProvides data for the System.Windows.Forms.Control.paint event

References HCS.Control_Update_By_Key(), and hoops_panel.HNPanel.m_pHView.

override void hoops_panel.HNPanel.OnResize ( EventArgs  eventargs)
inlineprotected

Ensures that view in the Panel is redraw whenever it is resized

Parameters
senderA reference to an object which is the root of the type hierarchy
eProvides data for the event

References HCS.Control_Update_By_Key(), and hoops_panel.HNPanel.m_pHView.

virtual void hoops_panel.HNPanel.OnRightButtonDoubleClick ( MouseEventArgs  e)
inlineprotectedvirtual

Dispatches the OnRightButtonDoubleClick event to HOOPS/MVO, which will in turn dispatch it to the current HBaseOperator object The state flags are mapped to HOOPS/MVO abstracted flags

Parameters
eProvides data for the System.Windows.Forms.Control.MouseDoubleClick event

References hoops_panel.HNPanel.m_pHView, and hoops_panel.HNPanel.MapFlags_Mouse().

Referenced by hoops_panel.HNPanel.OnMouseDoubleClick().

virtual void hoops_panel.HNPanel.OnRightButtonDown ( MouseEventArgs  e)
inlineprotectedvirtual

Dispatches the OnRightButtonDown event to HOOPS/MVO, which will in turn dispatch it to the current HBaseOperator object The state flags are mapped to HOOPS/MVO abstracted flags

Parameters
eProvides data for the System.Windows.Forms.Control.MouseDown event

References hoops_panel.HNPanel.m_pHView, and hoops_panel.HNPanel.MapFlags_Mouse().

Referenced by hoops_panel.HNPanel.OnMouseDown().

virtual void hoops_panel.HNPanel.OnRightButtonUp ( MouseEventArgs  e)
inlineprotectedvirtual

Dispatches the OnRightButtonUp event to HOOPS/MVO, which will in turn dispatch it to the current HBaseOperator object The state flags are mapped to HOOPS/MVO abstracted flags

Parameters
eProvides data for the System.Windows.Forms.Control.MouseUp event

References hoops_panel.HNPanel.m_pHView, and hoops_panel.HNPanel.MapFlags_Mouse().

Referenced by hoops_panel.HNPanel.OnMouseUp().

virtual void hoops_panel.HNPanel.SetCurrentOperator ( HBaseOperator  new_operator)
inlinevirtual

Deletes the current operator associated with the HBaseView object (if any) and resets the HBaseView's current operator to the new one

Parameters
new_operatorA reference to an HBaseOperator object to be used as the new operator

References hoops_panel.HNPanel.m_pHOperator.

Member Data Documentation

int [] hoops_panel.HNPanel.m_keyPairs
protected

Array to associate KeyDown key values with KeyPress characters

Referenced by hoops_panel.HNPanel.HNPanel(), hoops_panel.HNPanel.OnKeyPress(), and hoops_panel.HNPanel.OnKeyUp().

int hoops_panel.HNPanel.m_lastKeyPressed
protected

Flag to keep track of the last key that was pressed

Referenced by hoops_panel.HNPanel.OnKeyDown(), and hoops_panel.HNPanel.OnKeyPress().

HBaseModel hoops_panel.HNPanel.m_pHModel

A reference to the HBaseModel object associated with the panel

HBaseOperator hoops_panel.HNPanel.m_pHOperator
protected

Represents the current HBaseOperator object associated with the Panel

Referenced by hoops_panel.HNPanel.SetCurrentOperator().

HSelectionSet hoops_panel.HNPanel.m_pHSelection

A reference to the HSelectionSet object associated with the panel

IntPtr hoops_panel.HNPanel.winid

Used to create window-handle for the panel

Referenced by hoops_panel.HNPanel.HNPanel().


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