CTask Class Reference


Detailed Description
CTask: See Task.cpp for the implementation of this class.Helpers | |
| These functions are used to retrieve information relative to the current task | |
| virtual unsigned | GetTaskResID () const |
| Return the resource identifier for the title of the task. | |
| virtual unsigned | GetHelpResID () |
| Return the resource identifier for the help message associated with the current step of the task. | |
| virtual DWORD | GetMask () |
| Return a mask used to filter the objects that the user will be able to designate on the main view. | |
| virtual UINT | GetTaskCursor () |
| virtual CString | GetContextualHelp () |
| Called by the task framework to get the contextual help associated with this task. | |
Display Functions | |
| These functions are used to render the current task into the main view | |
| virtual void | CalculFeedBack () |
| Called by the task framework to calculate the visual feedback along the various steps of the task. | |
| virtual void | DrawFeedBack (CDC *) |
| Called by the main view to draw the visual feedback associated with the current step of the task. | |
| virtual void | InvalidateParent (BOOL bForce=FALSE) |
Event Functions | |
| These functions are used to intercept and deal with user and system-generated events | |
| virtual BOOL | OnUpdateTasksOption (CCmdUI *pCmdUI) |
| virtual BOOL | OnDoTasksOption (UINT nID) |
| virtual void | DoContextMenu (UINT, CPoint &) |
| virtual void | DoLaunchView (UINT nID) |
| virtual void | OnMouseL (UINT, CPoint) |
| virtual void | OnMouseR (UINT, CPoint) |
| virtual void | OnMouseMove (UINT, CPoint) |
| virtual void | OnMouseLUp (UINT, CPoint) |
| virtual void | OnMouseLDC (UINT, CPoint) |
| virtual void | OnTimer (UINT) |
Object Handling Functions | |
| These functions are used by the task to deal with its outcome | |
| virtual BOOL | PrepareAddedObject (CObject3D *) |
| virtual void | CreateObject3D () |
| Called by the task to create and initialise the resulting object, if any, and insert it in the universe. | |
| virtual void | CancelTask () |
| Called, when the task is ended, to perform any internal cleaning. | |
| virtual BOOL | ShowErrorMsg (UINT sTextID, UINT sTextSubID=-1, UINT flag=MB_OK|MB_ICONERROR) |
Target Selection Functions | |
| These functions are used by the task to retrieve and select its target objects | |
| virtual int | FindObject (CPoint theLoc, DWORD mask, BOOL bShowLabel=TRUE, BOOL bSub=TRUE) |
| virtual CObject3D * | GetObject () |
Public Member Functions | |
| CTask (CView *pParent, UINT nID) | |
| Generic constructor for the task. | |
| virtual | ~CTask () |
| Generic destructor for the task. | |
| CCalques3DDoc * | GetDocument () |
| Return a pointer to the main document. | |
Public Attributes | |
| CViewUniv * | m_pParent |
| Pointer to the View (Universe or Tracing) associated with the task. | |
| UINT | m_nTaskID |
| ID of the task. | |
| int | m_nStep |
| Zero-based index of the current step in the task. | |
| BOOL | m_bIsRepereFixed |
| TRUE if the referential cannot be rotated, FALSE otherwise. | |
Protected Attributes | |
| CxObject3DSet | m_cObjectFound |
| List of geometrical objects found at the last mouse-click. | |
| CObject3D * | m_pObject |
| Last selected object from the list. | |
| BOOL | m_bPersistent |
| TRUE if the task is persistent, FALSE otherwise. | |
Constructor & Destructor Documentation
Generic constructor for the task.
- Parameters:
-
pParent A pointer to the main Universe view nID The identifier of the task (as in the command ID)
| ~CTask | ( | ) | [virtual] |
Generic destructor for the task.
Member Function Documentation
| CCalques3DDoc * GetDocument | ( | ) |
Return a pointer to the main document.
| unsigned GetTaskResID | ( | ) | const [virtual] |
Return the resource identifier for the title of the task.
Both GetHelpResID() and GetTaskResID() are used to populate the Status Bar with a message describing the current stage of the task.
Reimplemented in CPoint3DTask, CDroite3DTask, CSegment3DTask, CMoveObjectTask, CDeleteObjectTask, CPlan3DTask, CCercle3DTask, CInter3DTask, CPointSur3DTask, CMilieu3DTask, CCenterTask, CParallele3DTask, CPerpendic3DTask, CCube3DTask, CSphere3DTask, CCylindreTask, CConeTask, CExtractCalcTask, CSymetricTask, CTranslatTask, CProjectionTask, CLabelTask, CMeasureTask, CCopyShapeTask, CLocus3DTask, CGreffe3DTask, CRedefine3DTask, CVerify3DTask, CPolygonTask, CAnimation3DTask, and CCenterOn3DTask.
| unsigned GetHelpResID | ( | ) | [virtual] |
Return the resource identifier for the help message associated with the current step of the task.
Both GetHelpResID() and GetTaskResID() are used to populate the Status Bar with a message describing the current stage of the task.
Reimplemented in CPoint3DTask, CDroite3DTask, CMoveObjectTask, CDeleteObjectTask, CPlan3DTask, CInter3DTask, CPointSur3DTask, CMilieu3DTask, CCenterTask, CParallele3DTask, CPerpendic3DTask, CCube3DTask, CSphere3DTask, CExtractCalcTask, CSymetricTask, CProjectionTask, CLabelTask, CMeasureTask, CCopyShapeTask, CLocus3DTask, CGreffe3DTask, CRedefine3DTask, CVerify3DTask, CPolygonTask, CAnimation3DTask, and CCenterOn3DTask.
| DWORD GetMask | ( | ) | [virtual] |
Return a mask used to filter the objects that the user will be able to designate on the main view.
The filter is a bitwise combination of objects identifiers (see TObject3DClass and others). See CObject3D::MaskObject and CObject3D::isA for description of the filter mechanism.
Reimplemented in CDroite3DTask, CMoveObjectTask, CDeleteObjectTask, CPlan3DTask, CInter3DTask, CPointSur3DTask, CMilieu3DTask, CCenterTask, CParallele3DTask, CPerpendic3DTask, CCube3DTask, CSphere3DTask, CExtractCalcTask, CSymetricTask, CProjectionTask, CLabelTask, CMeasureTask, CCopyShapeTask, CLocus3DTask, CGreffe3DTask, CRedefine3DTask, CVerify3DTask, CPolygonTask, CAnimation3DTask, and CCenterOn3DTask.
| CString GetContextualHelp | ( | ) | [virtual] |
Called by the task framework to get the contextual help associated with this task.
- Returns:
- A String containing thye description of the current task
| void CalculFeedBack | ( | ) | [virtual] |
Called by the task framework to calculate the visual feedback along the various steps of the task.
- Deprecated:
- Object are temporarily constructed and used to provide feeback
| void DrawFeedBack | ( | CDC * | ) | [virtual] |
Called by the main view to draw the visual feedback associated with the current step of the task.
Reimplemented in CPoint3DTask, CDroite3DTask, CSegment3DTask, CPlan3DTask, CPointSur3DTask, CMilieu3DTask, CParallele3DTask, CPerpendic3DTask, CCube3DTask, CCylindreTask, CConeTask, CSymetricTask, CTranslatTask, CLocus3DTask, CGreffe3DTask, CRedefine3DTask, CPolygonTask, and CAnimation3DTask.
| void CreateObject3D | ( | ) | [virtual] |
Called by the task to create and initialise the resulting object, if any, and insert it in the universe.
Reimplemented in CPoint3DTask, CDroite3DTask, CSegment3DTask, CMoveObjectTask, CPlan3DTask, CCercle3DTask, CInter3DTask, CPointSur3DTask, CMilieu3DTask, CCenterTask, CParallele3DTask, CPerpendic3DTask, CCube3DTask, CSphere3DTask, CCylindreTask, CConeTask, CExtractCalcTask, CSymetricTask, CTranslatTask, CProjectionTask, CLabelTask, CMeasureTask, CLocus3DTask, CGreffe3DTask, CRedefine3DTask, CVerify3DTask, CPolygonTask, CAnimation3DTask, and CCenterOn3DTask.
| void CancelTask | ( | ) | [virtual] |
Member Data Documentation
| UINT m_nTaskID |
ID of the task.
| int m_nStep |
Zero-based index of the current step in the task.
| BOOL m_bIsRepereFixed |
TRUE if the referential cannot be rotated, FALSE otherwise.
CxObject3DSet m_cObjectFound [protected] |
List of geometrical objects found at the last mouse-click.
BOOL m_bPersistent [protected] |
TRUE if the task is persistent, FALSE otherwise.



