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 |
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
|
inline |
Constructor which attaches paint, panel-resize and MouseEvents with corresponding EventHandlers
References hoops_panel.HNPanel.m_keyPairs, and hoops_panel.HNPanel.winid.
|
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.
|
inline |
Called when focus leaves the Panel. Resets the HBaseView object's key state.
References hoops_panel.HNPanel.m_pHView.
|
inlineprotected |
Maps the GUI-specific state flags to HOOPS/MVO abstracted flags
e | Provides data for the System.Windows.Forms.Control.MouseUp, MouseDown, MouseMove event |
References hoops_panel.HNPanel.MapModifierKeys().
Referenced by hoops_panel.HNPanel.OnLeftButtonDoubleClick(), hoops_panel.HNPanel.OnLeftButtonDown(), hoops_panel.HNPanel.OnLeftButtonUp(), hoops_panel.HNPanel.OnMidButtonDoubleClick(), hoops_panel.HNPanel.OnMidButtonDown(), hoops_panel.HNPanel.OnMidButtonUp(), hoops_panel.HNPanel.OnMouseMove(), hoops_panel.HNPanel.OnMouseWheel(), hoops_panel.HNPanel.OnRightButtonDoubleClick(), hoops_panel.HNPanel.OnRightButtonDown(), and hoops_panel.HNPanel.OnRightButtonUp().
|
inlineprotected |
Returns appropriate flag depending on whether shift, control or alt key is pressed
flags | Provides information about which key is pressed or released |
Referenced by hoops_panel.HNPanel.MapFlags_Mouse(), hoops_panel.HNPanel.OnKeyDown(), hoops_panel.HNPanel.OnKeyPress(), and hoops_panel.HNPanel.OnKeyUp().
|
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
e | Provides data for System.Windows.Forms.Control.KeyDown event |
References hoops_panel.HNPanel.m_lastKeyPressed, hoops_panel.HNPanel.m_pHView, and hoops_panel.HNPanel.MapModifierKeys().
|
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
e | Provides 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().
|
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
e | Provides data for System.Windows.Forms.Control.KeyUp event |
References hoops_panel.HNPanel.m_keyPairs, hoops_panel.HNPanel.m_pHView, and hoops_panel.HNPanel.MapModifierKeys().
|
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
e | Provides 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().
|
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
e | Provides 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().
|
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
e | Provides 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().
|
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
e | Provides 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().
|
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
e | Provides 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().
|
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
e | Provides 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().
|
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.Control.MouseDoubleClick event |
References hoops_panel.HNPanel.OnLeftButtonDoubleClick(), hoops_panel.HNPanel.OnMidButtonDoubleClick(), and hoops_panel.HNPanel.OnRightButtonDoubleClick().
|
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.Control.MouseDown event |
References hoops_panel.HNPanel.OnLeftButtonDown(), hoops_panel.HNPanel.OnMidButtonDown(), and hoops_panel.HNPanel.OnRightButtonDown().
|
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.Control.MouseMove event |
References hoops_panel.HNPanel.m_pHView, and hoops_panel.HNPanel.MapFlags_Mouse().
|
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.Control.MouseUp event |
References hoops_panel.HNPanel.OnLeftButtonUp(), hoops_panel.HNPanel.OnMidButtonUp(), and hoops_panel.HNPanel.OnRightButtonUp().
|
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
e | Provides data for System.Windows.Forms.Control.MouseWheel |
References hoops_panel.HNPanel.m_pHView, and hoops_panel.HNPanel.MapFlags_Mouse().
|
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.Control.paint event |
References HCS.Control_Update_By_Key(), and hoops_panel.HNPanel.m_pHView.
|
inlineprotected |
Ensures that view in the Panel is redraw whenever it is resized
sender | A reference to an object which is the root of the type hierarchy |
e | Provides data for the event |
References HCS.Control_Update_By_Key(), and hoops_panel.HNPanel.m_pHView.
|
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
e | Provides 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().
|
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
e | Provides 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().
|
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
e | Provides 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().
|
inlinevirtual |
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_panel.HNPanel.m_pHOperator.
|
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().
|
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
|
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
HBaseView hoops_panel.HNPanel.m_pHView |
A reference to the HBaseView object associated with the panel
Referenced by hoops_panel.HNPanel.Init(), hoops_panel.HNPanel.LostFocus(), hoops_panel.HNPanel.OnKeyDown(), hoops_panel.HNPanel.OnKeyPress(), hoops_panel.HNPanel.OnKeyUp(), hoops_panel.HNPanel.OnLeftButtonDoubleClick(), hoops_panel.HNPanel.OnLeftButtonDown(), hoops_panel.HNPanel.OnLeftButtonUp(), hoops_panel.HNPanel.OnMidButtonDoubleClick(), hoops_panel.HNPanel.OnMidButtonDown(), hoops_panel.HNPanel.OnMidButtonUp(), hoops_panel.HNPanel.OnMouseMove(), hoops_panel.HNPanel.OnMouseWheel(), hoops_panel.HNPanel.OnPaint(), hoops_panel.HNPanel.OnResize(), hoops_panel.HNPanel.OnRightButtonDoubleClick(), hoops_panel.HNPanel.OnRightButtonDown(), and hoops_panel.HNPanel.OnRightButtonUp().
IntPtr hoops_panel.HNPanel.winid |
Used to create window-handle for the panel
Referenced by hoops_panel.HNPanel.HNPanel().