00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #pragma once
00024
00025 #include <Inventor/SbEventArg.h>
00026 #include <Inventor/SbEventHandler.h>
00027
00053 class SoProgressIndicator
00054 {
00055
00056 public:
00060 SoProgressIndicator() {};
00061
00062 virtual ~SoProgressIndicator() {};
00063
00068 struct TaskEventArg : public SbEventArg
00069 {
00070 TaskEventArg(SoNode* src, const SbString& eventName, unsigned int numTasks, unsigned int numTasksDone, unsigned int numSubTasks );
00071 ~TaskEventArg();
00072
00074 SoNode* getSource() const;
00075
00077 const SbString& getEventName() const;
00078
00079
00080 unsigned int getNumTasks() const;
00081
00082
00083 unsigned int getNumTasksDone() const;
00084
00085
00086 unsigned int getNumSubTasks() const;
00087
00088 private:
00089 unsigned int m_numTasksDone;
00090
00091 private:
00092 SoNode* m_src;
00093 SbString* m_eventName;
00094 unsigned int m_numTasks;
00095 unsigned int m_numSubTasks;
00096 };
00097
00102 struct SubTaskEventArg : public SbEventArg
00103 {
00104 SubTaskEventArg(SoNode* src, const SbString& eventName, unsigned int numSubTasks, unsigned int numSubTasksDone, unsigned int numSteps);
00105
00106 ~SubTaskEventArg();
00107
00109 SoNode* getSource() const;
00110
00112 const SbString& getEventName() const;
00113
00114
00115 unsigned int getNumSubTasks() const;
00116
00117
00118 unsigned int getNumSubTasksDone() const;
00119
00120
00121 unsigned int getNumSteps() const;
00122
00123 private:
00124 unsigned int m_numSubTasksDone;
00125
00126 private:
00127 SoNode* m_src;
00128 SbString* m_eventName;
00129 unsigned int m_numSubTasks;
00130 unsigned int m_numSteps;
00131 };
00132
00137 struct StepEventArg : public SbEventArg
00138 {
00139 StepEventArg(SoNode* src, const SbString& eventName, unsigned int numSteps, unsigned int numStepsDone);
00140
00141 ~StepEventArg();
00142
00144 SoNode* getSource() const;
00145
00147 const SbString& getEventName() const;
00148
00149
00150 unsigned int getNumSteps() const;
00151
00152
00153 unsigned int getNumStepsDone() const;
00154
00155 private:
00156 unsigned int m_numStepsDone;
00157
00158 private:
00159 SoNode* m_src;
00160 SbString* m_eventName;
00161 unsigned int m_numSteps;
00162 };
00163
00167 SbEventHandler<TaskEventArg&> onBeginTask;
00168
00172 SbEventHandler<TaskEventArg&> onEndTask;
00173
00177 SbEventHandler<SubTaskEventArg&> onBeginSubTask;
00178
00182 SbEventHandler<SubTaskEventArg&> onEndSubTask;
00183
00188 SbEventHandler<StepEventArg&> onEndStep;
00189 };
00190
00191