Alphabetical Class Index   Namespace List  

hoops_base.HPanel Class Reference

The HPanel class provides a HOOPS/MVO-specific implementation of the UserControl class from Winforms. More...

Public Member Functions

 HPanel ()
 
void Init ()
 
void SetCurrentOperator (HBaseOperator new_operator)
 
virtual void DisposePanel ()
 
new void OnKeyUp (System.Windows.Forms.KeyEventArgs e)
 
new void OnKeyDown (System.Windows.Forms.KeyEventArgs e)
 
new void OnKeyPress (KeyPressEventArgs e)
 
new void LostFocus ()
 

Public Attributes

HBaseModel m_pHModel
 
HBaseView m_pHView
 
HSelectionSet m_pHSelection
 
IntPtr winid
 

Protected Member Functions

override void OnPaintBackground (PaintEventArgs e)
 
void PanelPaint (object sender, PaintEventArgs e)
 
void PanelMouseDown (object sender, System.Windows.Forms.MouseEventArgs e)
 
void OnLeftButtonDown (System.Windows.Forms.MouseEventArgs e)
 
void OnLeftButtonUp (System.Windows.Forms.MouseEventArgs e)
 
void OnLeftButtonDoubleClick (System.Windows.Forms.MouseEventArgs e)
 
void OnRightButtonDown (System.Windows.Forms.MouseEventArgs e)
 
void OnRightButtonUp (System.Windows.Forms.MouseEventArgs e)
 
void OnRightButtonDoubleClick (System.Windows.Forms.MouseEventArgs e)
 
void OnMidButtonDown (System.Windows.Forms.MouseEventArgs e)
 
void OnMidButtonUp (System.Windows.Forms.MouseEventArgs e)
 
void OnMidButtonDoubleClick (System.Windows.Forms.MouseEventArgs e)
 
void PanelMouseDoubleClick (object sender, System.Windows.Forms.MouseEventArgs e)
 
void PanelMouseUp (object sender, System.Windows.Forms.MouseEventArgs e)
 
void PanelMouseMove (object sender, System.Windows.Forms.MouseEventArgs e)
 
void PanelMouseWheel (object sender, System.Windows.Forms.MouseEventArgs e)
 
void PanelKeyDown (object sender, System.Windows.Forms.KeyEventArgs e)
 
void PanelKeyUp (object sender, System.Windows.Forms.KeyEventArgs e)
 
void PanelKeyPress (object sender, System.Windows.Forms.KeyPressEventArgs e)
 
uint MapFlags_Mouse (System.Windows.Forms.MouseEventArgs e)
 
uint MapModifierKeys (uint flags)
 

Protected Attributes

object m_pHOperator
 
int m_lastKeyPressed
 
int[] m_keyPairs
 

Detailed Description

The HPanel class provides a HOOPS/MVO-specific implementation of the UserControl class from Winforms.

HPanel 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 mouseevents through to corresponding MVO operator methods.

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

Constructor & Destructor Documentation

hoops_base.HPanel.HPanel ( )
inline

Member Function Documentation

virtual void hoops_base.HPanel.DisposePanel ( )
inlinevirtual

Disposes HOOPS/MVO components and then Disposes panel

References hoops_base.HPanel.m_pHOperator.

void hoops_base.HPanel.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_base.HPanel.m_pHView.

new void hoops_base.HPanel.LostFocus ( )
inline

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

References hoops_base.HPanel.m_pHView.

uint hoops_base.HPanel.MapFlags_Mouse ( System.Windows.Forms.MouseEventArgs  e)
inlineprotected
uint hoops_base.HPanel.MapModifierKeys ( uint  flags)
inlineprotected

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

Parameters
flagsProvides information about which mouse button 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_base.HPanel.MapFlags_Mouse(), hoops_base.HPanel.OnKeyPress(), and hoops_base.HPanel.OnKeyUp().

new void hoops_base.HPanel.OnKeyDown ( System.Windows.Forms.KeyEventArgs  e)
inline

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.UserControl.KeyDown event

References hoops_base.HPanel.m_lastKeyPressed, and hoops_base.HPanel.m_pHView.

new void hoops_base.HPanel.OnKeyPress ( KeyPressEventArgs  e)
inline

It dispatches the OnKeyPress 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.UserControl.KeyPress event

References hoops_base.HPanel.m_keyPairs, hoops_base.HPanel.m_lastKeyPressed, hoops_base.HPanel.m_pHView, and hoops_base.HPanel.MapModifierKeys().

new void hoops_base.HPanel.OnKeyUp ( System.Windows.Forms.KeyEventArgs  e)
inline

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.UserControl.KeyUp event

References hoops_base.HPanel.m_keyPairs, hoops_base.HPanel.m_pHView, and hoops_base.HPanel.MapModifierKeys().

void hoops_base.HPanel.OnLeftButtonDoubleClick ( System.Windows.Forms.MouseEventArgs  e)
inlineprotected

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.UserControl.MouseDoubleClick event

References hoops_base.HPanel.m_pHView, and hoops_base.HPanel.MapFlags_Mouse().

Referenced by hoops_base.HPanel.PanelMouseDoubleClick().

void hoops_base.HPanel.OnLeftButtonDown ( System.Windows.Forms.MouseEventArgs  e)
inlineprotected

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.UserControl.MouseDown event

References hoops_base.HPanel.m_pHView, and hoops_base.HPanel.MapFlags_Mouse().

Referenced by hoops_base.HPanel.PanelMouseDown().

void hoops_base.HPanel.OnLeftButtonUp ( System.Windows.Forms.MouseEventArgs  e)
inlineprotected

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.UserControl.MouseUp event

References hoops_base.HPanel.m_pHView, and hoops_base.HPanel.MapFlags_Mouse().

Referenced by hoops_base.HPanel.PanelMouseUp().

void hoops_base.HPanel.OnMidButtonDoubleClick ( System.Windows.Forms.MouseEventArgs  e)
inlineprotected

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.UserControl.MouseDoubleClick event

References hoops_base.HPanel.m_pHView, and hoops_base.HPanel.MapFlags_Mouse().

Referenced by hoops_base.HPanel.PanelMouseDoubleClick().

void hoops_base.HPanel.OnMidButtonDown ( System.Windows.Forms.MouseEventArgs  e)
inlineprotected

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.UserControl.MouseDown event

References hoops_base.HPanel.m_pHView, and hoops_base.HPanel.MapFlags_Mouse().

Referenced by hoops_base.HPanel.PanelMouseDown().

void hoops_base.HPanel.OnMidButtonUp ( System.Windows.Forms.MouseEventArgs  e)
inlineprotected

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.UserControl.MouseUp event

References hoops_base.HPanel.m_pHView, and hoops_base.HPanel.MapFlags_Mouse().

Referenced by hoops_base.HPanel.PanelMouseUp().

override void hoops_base.HPanel.OnPaintBackground ( PaintEventArgs  e)
inlineprotected

We do not want to paint a background, as HOOPS will do all the drawing

Parameters
eProvides data for paint event
void hoops_base.HPanel.OnRightButtonDoubleClick ( System.Windows.Forms.MouseEventArgs  e)
inlineprotected

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.UserControl.MouseDoubleClick event

References hoops_base.HPanel.m_pHView, and hoops_base.HPanel.MapFlags_Mouse().

Referenced by hoops_base.HPanel.PanelMouseDoubleClick().

void hoops_base.HPanel.OnRightButtonDown ( System.Windows.Forms.MouseEventArgs  e)
inlineprotected

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.UserControl.MouseDown event

References hoops_base.HPanel.m_pHView, and hoops_base.HPanel.MapFlags_Mouse().

Referenced by hoops_base.HPanel.PanelMouseDown().

void hoops_base.HPanel.OnRightButtonUp ( System.Windows.Forms.MouseEventArgs  e)
inlineprotected

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.UserControl.MouseUp event

References hoops_base.HPanel.m_pHView, and hoops_base.HPanel.MapFlags_Mouse().

Referenced by hoops_base.HPanel.PanelMouseUp().

void hoops_base.HPanel.PanelMouseDoubleClick ( object  sender,
System.Windows.Forms.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.UserControl.MouseDoubleClick event

References hoops_base.HPanel.OnLeftButtonDoubleClick(), hoops_base.HPanel.OnMidButtonDoubleClick(), and hoops_base.HPanel.OnRightButtonDoubleClick().

Referenced by hoops_base.HPanel.HPanel().

void hoops_base.HPanel.PanelMouseDown ( object  sender,
System.Windows.Forms.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.UserControl.MouseDown event

References hoops_base.HPanel.OnLeftButtonDown(), hoops_base.HPanel.OnMidButtonDown(), and hoops_base.HPanel.OnRightButtonDown().

Referenced by hoops_base.HPanel.HPanel().

void hoops_base.HPanel.PanelMouseMove ( object  sender,
System.Windows.Forms.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.UserControl.MouseMove event

References hoops_base.HPanel.m_pHView, and hoops_base.HPanel.MapFlags_Mouse().

Referenced by hoops_base.HPanel.HPanel().

void hoops_base.HPanel.PanelMouseUp ( object  sender,
System.Windows.Forms.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.userControl.MouseUp event

References hoops_base.HPanel.OnLeftButtonUp(), hoops_base.HPanel.OnMidButtonUp(), and hoops_base.HPanel.OnRightButtonUp().

Referenced by hoops_base.HPanel.HPanel().

void hoops_base.HPanel.PanelMouseWheel ( object  sender,
System.Windows.Forms.MouseEventArgs  e 
)
inlineprotected

This method is called from HForm 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.UserControl.MouseWheel

References hoops_base.HPanel.m_pHView, and hoops_base.HPanel.MapFlags_Mouse().

Referenced by hoops_base.HPanel.HPanel().

void hoops_base.HPanel.PanelPaint ( object  sender,
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.UserControl.paint event

References HCS.Control_Update_By_Key(), and hoops_base.HPanel.m_pHView.

Referenced by hoops_base.HPanel.HPanel().

void hoops_base.HPanel.SetCurrentOperator ( HBaseOperator  new_operator)
inline

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_base.HPanel.m_pHOperator.

Member Data Documentation

int [] hoops_base.HPanel.m_keyPairs
protected

Array to associate KeyDown key values with KeyPress characters

Referenced by hoops_base.HPanel.HPanel(), hoops_base.HPanel.OnKeyPress(), and hoops_base.HPanel.OnKeyUp().

int hoops_base.HPanel.m_lastKeyPressed
protected

Flag to keep track of the last key that was pressed

Referenced by hoops_base.HPanel.OnKeyDown(), and hoops_base.HPanel.OnKeyPress().

HBaseModel hoops_base.HPanel.m_pHModel

A reference to the HBaseModel object associated with the panel

object hoops_base.HPanel.m_pHOperator
protected

Represents the current HBaseOperator object associated with the Panel

Referenced by hoops_base.HPanel.DisposePanel(), and hoops_base.HPanel.SetCurrentOperator().

HSelectionSet hoops_base.HPanel.m_pHSelection

A reference to the HSelectionSet object associated with the panel

IntPtr hoops_base.HPanel.winid

Used to create window-handle for the panel


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