tsc_SurveyMenuUITask

This is a specialised type of tsc_UITask created to make creating a survey menu easier.

Using tsc_WizardMenu, SCAPI developers can already construct Survey Core menu UI but creating the logic and functionality provided when the user requests the 'Measure' button from the General Survey main menu is still difficult.

This class provides this logic and allows simple construction of UITask menus containing a mixture of surveying workflows on multiple instruments.

The class works by taking a list of the UITasks that the SCAPI developer wishes to have displayed.  They are grouped by instrument and style requirements and the necessary UI is put in place to guide the user to those choices in a manner that is consistent with General Survey.

Unlike other tsc_UITask derived classes the developer should not override Run().

Public methods

tsc_SurveyMenuUITask (x_Code scTaskId);
Constructor is called with a task ID.  DO NOT do significant work in the constructor - it will be called every time the item appears on a menu which could be often.
The constructor should be light-weight as the UITask may be constructed frequently.

virtual ~tsc_SurveyMenuUITask ();

virtual tsc_XCodeList GetUITaskItems() const = 0;
Populate the UITask RunCode items that the menu should support.

virtual void OnPreShowMenu(tsc_WizardMenu& menuAboutToBeShown, const tsc_SurveyStyle& selectedStyle);
Optionally override this handler to have an opportunity to review the tsc_WizardMenu before display.

Example Usage:

class UITaskMeasure : public tsc_SurveyMenuUITask 

{

 public:

     // Construction

     UITaskMeasure(x_Code runCode) : tsc_SurveyMenuUITask(runCode)

     { }


     // Creates the ui task

     static tsc_UITaskNative* Create(x_Code runCode)

     {

         return new UITaskMeasure(runCode);

     }


     virtual tsc_XCodeList GetUITaskItems() const

     {

         tsc_XCodeList list;          // Survey items

         list.Append(X_MenuMeasureTopo);

         list.Append(X_MenuMeasureCodes);

         list.Append(X_MenuLaserOffsets);

         list.Append(X_MeasureRounds);

         list.Append(X_MenuMeasure3DAxes);

         list.Append(X_MenuContinuousTopo);

         list.Append(X_MenuSurfaceScan);

         list.Append(X_MenuScanning); 

         list.Append(X_MenuStartBaseReceiver);

         list.Append(X_MenuStartPPInfill);

         list.Append(X_MenuStopPPInfill);

         list.Append(X_MenuMeasurePoints);

         list.Append(X_MenuSiteCalibration);

         list.Append(X_MenuInitialization);

         list.Append(X_MenuPPKInitialization);

         list.Append(X_MenuOmniSTARStatus);

         list.Append(X_MenuSwapBaseReceiver);

         list.Append(X_MenuStopGNSSBaseData);

         return list;

     }

 };