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 |
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
|
inline |
Constructor which attaches paint, panel-resize and MouseEvents with corresponding EventHandlers
References hoops_base.HPanel.m_keyPairs, hoops_base.HPanel.PanelMouseDoubleClick(), hoops_base.HPanel.PanelMouseDown(), hoops_base.HPanel.PanelMouseMove(), hoops_base.HPanel.PanelMouseUp(), hoops_base.HPanel.PanelMouseWheel(), and hoops_base.HPanel.PanelPaint().
|
inlinevirtual |
Disposes HOOPS/MVO components and then Disposes panel
References hoops_base.HPanel.m_pHOperator.
|
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.
|
inline |
Called when focus leaves the Panel. Resets the HBaseView object's key state.
References hoops_base.HPanel.m_pHView.
|
inlineprotected |
Maps the GUI-specific state flags to HOOPS/MVO abstracted flags
e | Provides data for the System.Windows.Forms.userControl.MouseUp, MouseDown, MouseMove event |
References hoops_base.HPanel.MapModifierKeys().
Referenced by hoops_base.HPanel.OnLeftButtonDoubleClick(), hoops_base.HPanel.OnLeftButtonDown(), hoops_base.HPanel.OnLeftButtonUp(), hoops_base.HPanel.OnMidButtonDoubleClick(), hoops_base.HPanel.OnMidButtonDown(), hoops_base.HPanel.OnMidButtonUp(), hoops_base.HPanel.OnRightButtonDoubleClick(), hoops_base.HPanel.OnRightButtonDown(), hoops_base.HPanel.OnRightButtonUp(), hoops_base.HPanel.PanelMouseMove(), and hoops_base.HPanel.PanelMouseWheel().
|
inlineprotected |
Returns appropriate flag depending on whether shift, control or alt key is pressed
flags | Provides information about which mouse button is pressed or released |
Referenced by hoops_base.HPanel.MapFlags_Mouse(), hoops_base.HPanel.OnKeyPress(), and hoops_base.HPanel.OnKeyUp().
|
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
e | Provides data for System.Windows.Forms.UserControl.KeyDown event |
References hoops_base.HPanel.m_lastKeyPressed, and hoops_base.HPanel.m_pHView.
|
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
e | Provides 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().
|
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
e | Provides data for System.Windows.Forms.UserControl.KeyUp event |
References hoops_base.HPanel.m_keyPairs, hoops_base.HPanel.m_pHView, and hoops_base.HPanel.MapModifierKeys().
|
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
e | Provides 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().
|
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
e | Provides 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().
|
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
e | Provides 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().
|
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
e | Provides 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().
|
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
e | Provides 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().
|
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
e | Provides 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().
|
inlineprotected |
We do not want to paint a background, as HOOPS will do all the drawing
e | Provides data for paint event |
|
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
e | Provides 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().
|
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
e | Provides 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().
|
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
e | Provides 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().
|
inlineprotected |
Passes control to the method depending on which Mouse Button is double clicked
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 |
References hoops_base.HPanel.OnLeftButtonDoubleClick(), hoops_base.HPanel.OnMidButtonDoubleClick(), and hoops_base.HPanel.OnRightButtonDoubleClick().
Referenced by hoops_base.HPanel.HPanel().
|
inlineprotected |
Passes control to the method depending on which Mouse Button is pressed
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 |
References hoops_base.HPanel.OnLeftButtonDown(), hoops_base.HPanel.OnMidButtonDown(), and hoops_base.HPanel.OnRightButtonDown().
Referenced by hoops_base.HPanel.HPanel().
|
inlineprotected |
Responds to MouseMove events and passes particular co-ordinates to hoops
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 |
References hoops_base.HPanel.m_pHView, and hoops_base.HPanel.MapFlags_Mouse().
Referenced by hoops_base.HPanel.HPanel().
|
inlineprotected |
Passes control to the method depending on which Mouse Button is Released
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 |
References hoops_base.HPanel.OnLeftButtonUp(), hoops_base.HPanel.OnMidButtonUp(), and hoops_base.HPanel.OnRightButtonUp().
Referenced by hoops_base.HPanel.HPanel().
|
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
e | Provides 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().
|
inlineprotected |
Instructs HOOPS to redraw the scene
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 |
References HCS.Control_Update_By_Key(), and hoops_base.HPanel.m_pHView.
Referenced by hoops_base.HPanel.HPanel().
|
inline |
Deletes the current operator associated with the HBaseView object (if any) and resets the HBaseView's current operator to the new one
new_operator | A reference to an HBaseOperator object to be used as the new operator |
References hoops_base.HPanel.m_pHOperator.
|
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().
|
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
|
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
HBaseView hoops_base.HPanel.m_pHView |
A reference to the HBaseView object associated with the panel
Referenced by hoops_base.HPanel.Init(), hoops_base.HPanel.LostFocus(), hoops_base.HPanel.OnKeyDown(), hoops_base.HPanel.OnKeyPress(), hoops_base.HPanel.OnKeyUp(), hoops_base.HPanel.OnLeftButtonDoubleClick(), hoops_base.HPanel.OnLeftButtonDown(), hoops_base.HPanel.OnLeftButtonUp(), hoops_base.HPanel.OnMidButtonDoubleClick(), hoops_base.HPanel.OnMidButtonDown(), hoops_base.HPanel.OnMidButtonUp(), hoops_base.HPanel.OnRightButtonDoubleClick(), hoops_base.HPanel.OnRightButtonDown(), hoops_base.HPanel.OnRightButtonUp(), hoops_base.HPanel.PanelMouseMove(), hoops_base.HPanel.PanelMouseWheel(), and hoops_base.HPanel.PanelPaint().
IntPtr hoops_base.HPanel.winid |
Used to create window-handle for the panel