InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IProgressBarManager.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Matt Joss
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // Copyright 1997-2010 Adobe Systems Incorporated. All rights reserved.
16 //
17 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
18 // with the terms of the Adobe license agreement accompanying it. If you have received
19 // this file from a source other than Adobe, then your use, modification, or
20 // distribution of it requires the prior written permission of Adobe.
21 //
22 //========================================================================================
23 
24 #ifndef __IProgressBarManager__
25 #define __IProgressBarManager__
26 
27 class PMString;
29 
30 #include "ShuksanID.h"
31 
32 enum ProgressBarStyle { eFixedRange = 0, eBarberPole, eDocWindow };
33 #define kProgressTraceID "ProgressBarTrace"
34 
40 {
41  public:
42  enum { kDefaultIID = IID_IPROGRESSBARMANAGER };
45  {
46  kTaskProgress = 0x01,
47  kRangeProgress = 0x02,
48  kFoldupProgress = 0x04
49  };
50 
64  virtual int32 RegisterTaskSet(int32 nType,
65  const PMString& progressDialogTitle,
66  int32 taskStart,
67  int32 taskEnd,
68  bool8 showImmediate = kFalse,
69  bool8 showCancel = kTrue,
70  IProgressBarControlData* customProgress = nil,
71  bool32 useTwoBars = kFalse) = 0;
76  virtual void UnregisterTaskSet(int32 nBarID = -1) = 0;
77 
85  virtual void DoTask(const PMString& displayText, int32 advanceNtasks = 1, int32 nBarID = -1) = 0;
86 
94  virtual void SetPosition( int32 newPosition, bool16 fParent = kFalse, int32 nBarID = -1 ) = 0;
101  virtual int32 GetPosition( bool16 fParent = kFalse, int32 nBarID = -1 ) = 0;
102 
109  virtual void SetTaskText( const PMString& newText, bool16 forceRedraw = kTrue, int32 nBarID = -1) = 0;
110 
116  virtual bool16 WasCancelled(bool8 setGlobalErrorState = kTrue) = 0;
117 
122  virtual void Abort() = 0;
123 
127  virtual int32 GetNumTaskSets() = 0;
136  virtual void GetTaskSetInfo(int32 taskSetIndex, int32* outTaskStart, int32* outTaskEnd = nil, int32* outCurrentTask = nil, PMString* outCurrentSubTaskName = nil) = 0;
137 
141  virtual void Cancel() = 0;
142 
148  virtual void DisableChildProgressBars(bool16 disable) = 0;
149 
155  virtual bool16 SuppressProgressBarDisplay(bool16 suppressDisplay) = 0;
156 
160  virtual bool16 IsDisplaySuppressed() = 0;
161 
166  virtual bool16 IsRegisterDisabled() = 0;
167 
174  virtual void SetTaskStatus(const PMString& statusText, bool16 forceRedraw = kTrue, int32 nBarID = -1) = 0;
175 
182  virtual void SetTaskTitle(const PMString& strTitle, bool16 forceRedraw, int32 nBarID = -1) = 0;
183 
186  virtual bool SkipCheckingForCancel(bool skip) = 0;
191  virtual void RegisterCloseNotifier(std::function<void()> callback) =0;
192  //Internal Use only -- notifies on destruction of a notifier
193  virtual void ClearCloseNotifier() =0;
194 };
195 
196 #endif