A 3D Dynamic Geometry Software

Calques 3D C++



CTask Class Reference

Inheritance diagram for CTask:

Inheritance graph
Collaboration diagram for CTask:

Collaboration graph

List of all members.


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 CObject3DGetObject ()

Public Member Functions

 CTask (CView *pParent, UINT nID)
 Generic constructor for the task.
virtual ~CTask ()
 Generic destructor for the task.
CCalques3DDocGetDocument ()
 Return a pointer to the main document.

Public Attributes

CViewUnivm_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.
CObject3Dm_pObject
 Last selected object from the list.
BOOL m_bPersistent
 TRUE if the task is persistent, FALSE otherwise.

Constructor & Destructor Documentation

CTask ( CView pParent,
UINT  nID 
)

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

void CancelTask (  )  [virtual]

Called, when the task is ended, to perform any internal cleaning.

Reimplemented in CMeasureTask.


Member Data Documentation

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.

TRUE if the referential cannot be rotated, FALSE otherwise.

List of geometrical objects found at the last mouse-click.

CObject3D* m_pObject [protected]

Last selected object from the list.

BOOL m_bPersistent [protected]

TRUE if the task is persistent, FALSE otherwise.