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...

List of all members.

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


Member Function Documentation

void hoops_panel::HNPanel::Init (  )  [inline]

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

override void hoops_panel::HNPanel::OnPaint ( PaintEventArgs  e  )  [inline, protected]

Instructs HOOPS to redraw the scene

Parameters:
sender A reference to an object which is the root of the type hierarchy
e Provides data for the System.Windows.Forms.Control.paint event

override void hoops_panel::HNPanel::OnResize ( EventArgs  eventargs  )  [inline, protected]

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

Parameters:
sender A reference to an object which is the root of the type hierarchy
e Provides data for the event

override void hoops_panel::HNPanel::OnMouseDown ( MouseEventArgs  e  )  [inline, protected]

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

Parameters:
sender A reference to an object which is the root of the type hierarchy
e Provides data for the System.Windows.Forms.Control.MouseDown event

override void hoops_panel::HNPanel::OnMouseDoubleClick ( MouseEventArgs  e  )  [inline, protected]

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

Parameters:
sender A reference to an object which is the root of the type hierarchy
e Provides data for the System.Windows.Forms.Control.MouseDoubleClick event

override void hoops_panel::HNPanel::OnMouseUp ( MouseEventArgs  e  )  [inline, protected]

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

Parameters:
sender A reference to an object which is the root of the type hierarchy
e Provides data for the System.Windows.Forms.Control.MouseUp event

override void hoops_panel::HNPanel::OnMouseMove ( MouseEventArgs  e  )  [inline, protected]

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

Parameters:
sender A reference to an object which is the root of the type hierarchy
e Provides data for the System.Windows.Forms.Control.MouseMove event

virtual void hoops_panel::HNPanel::OnLeftButtonDown ( MouseEventArgs  e  )  [inline, protected, virtual]

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:
e Provides data for the System.Windows.Forms.Control.MouseDown event

virtual void hoops_panel::HNPanel::OnLeftButtonUp ( MouseEventArgs  e  )  [inline, protected, virtual]

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:
e Provides data for the System.Windows.Forms.Control.MouseUp event

virtual void hoops_panel::HNPanel::OnLeftButtonDoubleClick ( MouseEventArgs  e  )  [inline, protected, virtual]

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:
e Provides data for the System.Windows.Forms.Control.MouseDoubleClick event

virtual void hoops_panel::HNPanel::OnRightButtonDown ( MouseEventArgs  e  )  [inline, protected, virtual]

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:
e Provides data for the System.Windows.Forms.Control.MouseDown event

virtual void hoops_panel::HNPanel::OnRightButtonUp ( MouseEventArgs  e  )  [inline, protected, virtual]

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:
e Provides data for the System.Windows.Forms.Control.MouseUp event

virtual void hoops_panel::HNPanel::OnRightButtonDoubleClick ( MouseEventArgs  e  )  [inline, protected, virtual]

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:
e Provides data for the System.Windows.Forms.Control.MouseDoubleClick event

virtual void hoops_panel::HNPanel::OnMidButtonDown ( MouseEventArgs  e  )  [inline, protected, virtual]

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:
e Provides data for the System.Windows.Forms.Control.MouseDown event

virtual void hoops_panel::HNPanel::OnMidButtonUp ( MouseEventArgs  e  )  [inline, protected, virtual]

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:
e Provides data for the System.Windows.Forms.Control.MouseUp event

virtual void hoops_panel::HNPanel::OnMidButtonDoubleClick ( MouseEventArgs  e  )  [inline, protected, virtual]

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:
e Provides data for the System.Windows.Forms.Control.MouseDoubleClick event

uint hoops_panel::HNPanel::MapFlags_Mouse ( MouseEventArgs  e  )  [inline, protected]

Maps the GUI-specific state flags to HOOPS/MVO abstracted flags

Parameters:
e Provides data for the System.Windows.Forms.Control.MouseUp, MouseDown, MouseMove event

uint hoops_panel::HNPanel::MapModifierKeys ( uint  flags  )  [inline, protected]

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

Parameters:
flags Provides 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

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:
e Provides data for System.Windows.Forms.Control.KeyUp event

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:
e Provides data for System.Windows.Forms.Control.KeyDown event

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:
e Provides data for System.Windows.Forms.Control.KeyPress event

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:
e Provides data for System.Windows.Forms.Control.MouseWheel

virtual void hoops_panel::HNPanel::SetCurrentOperator ( HBaseOperator  new_operator  )  [inline, virtual]

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

Parameters:
new_operator A reference to an HBaseOperator object to be used as the new operator

new void hoops_panel::HNPanel::LostFocus (  )  [inline]

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


Member Data Documentation

A reference to the HBaseModel object associated with the panel

A reference to the HBaseView object associated with the panel

A reference to the HSelectionSet object associated with the panel

Used to create window-handle for the panel

Represents the current HBaseOperator object associated with the Panel

Flag to keep track of the last key that was pressed

Array to associate KeyDown key values with KeyPress characters


The documentation for this class was generated from the following file:
  • HNPanel.cs