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

List of all members.

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]

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


Member Function Documentation

void hoops_base::HPanel::Init (  )  [inline]

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

override void hoops_base::HPanel::OnPaintBackground ( PaintEventArgs  e  )  [inline, protected]

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

Parameters:
e Provides data for paint event

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

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

void hoops_base::HPanel::OnLeftButtonDown ( System.Windows.Forms.MouseEventArgs  e  )  [inline, protected]

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

void hoops_base::HPanel::OnLeftButtonUp ( System.Windows.Forms.MouseEventArgs  e  )  [inline, protected]

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

void hoops_base::HPanel::OnLeftButtonDoubleClick ( System.Windows.Forms.MouseEventArgs  e  )  [inline, protected]

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

void hoops_base::HPanel::OnRightButtonDown ( System.Windows.Forms.MouseEventArgs  e  )  [inline, protected]

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

void hoops_base::HPanel::OnRightButtonUp ( System.Windows.Forms.MouseEventArgs  e  )  [inline, protected]

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

void hoops_base::HPanel::OnRightButtonDoubleClick ( System.Windows.Forms.MouseEventArgs  e  )  [inline, protected]

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

void hoops_base::HPanel::OnMidButtonDown ( System.Windows.Forms.MouseEventArgs  e  )  [inline, protected]

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

void hoops_base::HPanel::OnMidButtonUp ( System.Windows.Forms.MouseEventArgs  e  )  [inline, protected]

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

void hoops_base::HPanel::OnMidButtonDoubleClick ( System.Windows.Forms.MouseEventArgs  e  )  [inline, protected]

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

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

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

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

void hoops_base::HPanel::PanelMouseWheel ( object  sender,
System.Windows.Forms.MouseEventArgs  e 
) [inline, protected]

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

uint hoops_base::HPanel::MapFlags_Mouse ( System.Windows.Forms.MouseEventArgs  e  )  [inline, protected]

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

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

uint hoops_base::HPanel::MapModifierKeys ( uint  flags  )  [inline, protected]

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

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

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_operator A reference to an HBaseOperator object to be used as the new operator

virtual void hoops_base::HPanel::DisposePanel (  )  [inline, virtual]

Disposes HOOPS/MVO components and then Disposes panel

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

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

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

new void hoops_base::HPanel::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

int [] hoops_base::HPanel::m_keyPairs [protected]

Array to associate KeyDown key values with KeyPress characters


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