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
00052 class SoProgressIndicator
00053 {
00054
00055 public:
00059 SoProgressIndicator() {};
00060
00061 virtual ~SoProgressIndicator() {};
00062
00067 struct TaskEventArg : public SbEventArg
00068 {
00069 TaskEventArg(SoNode* src, const SbString& eventName, unsigned int numTasks, unsigned int numTasksDone, unsigned int numSubTasks );
00070 ~TaskEventArg();
00071
00073 SoNode* getSource() const;
00074
00076 const SbString& getEventName() const;
00077
00078
00079 unsigned int getNumTasks() const;
00080
00081
00082 unsigned int getNumTasksDone() const;
00083
00084
00085 unsigned int getNumSubTasks() const;
00086
00087 private:
00088 unsigned int m_numTasksDone;
00089
00090 private:
00091 SoNode* m_src;
00092 SbString* m_eventName;
00093 unsigned int m_numTasks;
00094 unsigned int m_numSubTasks;
00095 };
00096
00101 struct SubTaskEventArg : public SbEventArg
00102 {
00103 SubTaskEventArg(SoNode* src, const SbString& eventName, unsigned int numSubTasks, unsigned int numSubTasksDone, unsigned int numSteps);
00104
00105 ~SubTaskEventArg();
00106
00108 SoNode* getSource() const;
00109
00111 const SbString& getEventName() const;
00112
00113
00114 unsigned int getNumSubTasks() const;
00115
00116
00117 unsigned int getNumSubTasksDone() const;
00118
00119
00120 unsigned int getNumSteps() const;
00121
00122 private:
00123 unsigned int m_numSubTasksDone;
00124
00125 private:
00126 SoNode* m_src;
00127 SbString* m_eventName;
00128 unsigned int m_numSubTasks;
00129 unsigned int m_numSteps;
00130 };
00131
00136 struct StepEventArg : public SbEventArg
00137 {
00138 StepEventArg(SoNode* src, const SbString& eventName, unsigned int numSteps, unsigned int numStepsDone);
00139
00140 ~StepEventArg();
00141
00143 SoNode* getSource() const;
00144
00146 const SbString& getEventName() const;
00147
00148
00149 unsigned int getNumSteps() const;
00150
00151
00152 unsigned int getNumStepsDone() const;
00153
00154 private:
00155 unsigned int m_numStepsDone;
00156
00157 private:
00158 SoNode* m_src;
00159 SbString* m_eventName;
00160 unsigned int m_numSteps;
00161 };
00162
00166 SbEventHandler<TaskEventArg&> onBeginTask;
00167
00171 SbEventHandler<TaskEventArg&> onEndTask;
00172
00176 SbEventHandler<SubTaskEventArg&> onBeginSubTask;
00177
00181 SbEventHandler<SubTaskEventArg&> onEndSubTask;
00182
00187 SbEventHandler<StepEventArg&> onEndStep;
00188 };
00189
00190