Open CASCADE Technology  7.2.0
Public Member Functions | Static Public Member Functions

Draw_ProgressIndicator Class Reference

Implements ProgressIndicator (interface provided by Message) for DRAW, with possibility to output to TCL window and/or trace file. More...

#include <Draw_ProgressIndicator.hxx>

Inheritance diagram for Draw_ProgressIndicator:
Inheritance graph
[legend]

Public Member Functions

 Draw_ProgressIndicator (const Draw_Interpretor &di, Standard_Real theUpdateThreshold=1.)
 Creates a progress indicator and remembers pointer to Draw_Interpretor. More...
 
 ~Draw_ProgressIndicator ()
 Destructor; calls Reset() More...
 
void SetTextMode (const Standard_Boolean theTextMode)
 Sets text output mode (on/off) More...
 
Standard_Boolean GetTextMode () const
 Gets text output mode (on/off) More...
 
void SetGraphMode (const Standard_Boolean theGraphMode)
 Sets graphical output mode (on/off) More...
 
Standard_Boolean GetGraphMode () const
 Gets graphical output mode (on/off) More...
 
virtual void Reset () override
 Clears/erases opened TCL windows if any and sets myBreak to False. More...
 
virtual Standard_Boolean Show (const Standard_Boolean force=Standard_True) override
 Defines method Show of Progress Indicator. More...
 
virtual Standard_Boolean UserBreak () override
 Redefines method UserBreak of Progress Indicator. More...
 
- Public Member Functions inherited from Message_ProgressIndicator
void SetName (const Standard_CString name)
 
void SetName (const Handle< TCollection_HAsciiString > &name)
 Set (optional) name for scale. More...
 
void SetRange (const Standard_Real min, const Standard_Real max)
 Set range for current scale. More...
 
void SetStep (const Standard_Real step)
 Set step for current scale. More...
 
void SetInfinite (const Standard_Boolean isInf=Standard_True)
 Set or drop infinite mode for the current scale. More...
 
void SetScale (const Standard_CString name, const Standard_Real min, const Standard_Real max, const Standard_Real step, const Standard_Boolean isInf=Standard_False)
 
void SetScale (const Standard_Real min, const Standard_Real max, const Standard_Real step, const Standard_Boolean isInf=Standard_False)
 Set all parameters for current scale. More...
 
void GetScale (Standard_Real &min, Standard_Real &max, Standard_Real &step, Standard_Boolean &isInf) const
 Returns all parameters for current scale. More...
 
void SetValue (const Standard_Real val)
 
Standard_Real GetValue () const
 Set and get progress value at current scale If the value to be set is more than currently set one, or out of range for the current scale, it is limited by that range. More...
 
void Increment ()
 
void Increment (const Standard_Real step)
 Increment the progress value by the default of specified step. More...
 
Standard_Boolean NewScope (const Standard_CString name=0)
 
Standard_Boolean NewScope (const Handle< TCollection_HAsciiString > &name)
 
Standard_Boolean NewScope (const Standard_Real span, const Standard_CString name=0)
 
Standard_Boolean NewScope (const Standard_Real span, const Handle< TCollection_HAsciiString > &name)
 Creates new scope on a part of a current scale from current position with span either equal to default step, or specified The scale for the new scope will have specified name and ranged from 0 to 100 with step 1 Returns False if something is wrong in arguments or in current position of progress indicator; scope is opened anyway. More...
 
Standard_Boolean EndScope ()
 Close the current scope and thus return to previous scale Updates position to be at the end of the closing scope Returns False if no scope is opened. More...
 
Standard_Boolean NextScope (const Standard_CString name=0)
 
Standard_Boolean NextScope (const Standard_Real span, const Standard_CString name=0)
 Optimized version of { return EndScope() && NewScope(); }. More...
 
Standard_Real GetPosition () const
 Returns total progress position on the basic scale ranged from 0. to 1. More...
 
Standard_Integer GetNbScopes () const
 Returns current number of opened scopes This number is always >=1 as top-level scale is always present. More...
 
const Message_ProgressScaleGetScope (const Standard_Integer index) const
 Returns data for scale of index-th scope The first scope is current one, the last is the top-level one. More...
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor. More...
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing. More...
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter. More...
 
virtual ~Standard_Transient ()
 Destructor must be virtual. More...
 
virtual void Delete () const
 Memory deallocator for transient classes. More...
 
virtual const opencascade::handle< Standard_Type > & DynamicType () const
 Returns a type descriptor about this object. More...
 
Standard_Boolean IsInstance (const opencascade::handle< Standard_Type > &theType) const
 Returns a true value if this is an instance of Type. More...
 
Standard_Boolean IsInstance (const Standard_CString theTypeName) const
 Returns a true value if this is an instance of TypeName. More...
 
Standard_Boolean IsKind (const opencascade::handle< Standard_Type > &theType) const
 Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
Standard_Boolean IsKind (const Standard_CString theTypeName) const
 Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
Standard_TransientThis () const
 Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero. More...
 
Standard_Integer GetRefCount () const
 Get the reference counter of this object. More...
 
void IncrementRefCounter () const
 Increments the reference counter of this object. More...
 
Standard_Integer DecrementRefCounter () const
 Decrements the reference counter of this object; returns the decremented value. More...
 

Static Public Member Functions

static Standard_BooleanDefaultTextMode ()
 
static Standard_BooleanDefaultGraphMode ()
 Get/Set default values for output modes. More...
 
static Standard_AddressStopIndicator ()
 Internal method for implementation of UserBreak mechanism; note that it uses static variable and thus not thread-safe! More...
 
- Static Public Member Functions inherited from Standard_Transient
static const char * get_type_name ()
 Returns a type descriptor about this object. More...
 
static const opencascade::handle< Standard_Type > & get_type_descriptor ()
 Returns type descriptor of Standard_Transient class. More...
 

Additional Inherited Members

- Public Types inherited from Standard_Transient
typedef void base_type
 Returns a type descriptor about this object. More...
 
- Protected Member Functions inherited from Message_ProgressIndicator
 Message_ProgressIndicator ()
 Constructor, just calls own Reset() (not yet redefined) More...
 

Detailed Description

Implements ProgressIndicator (interface provided by Message) for DRAW, with possibility to output to TCL window and/or trace file.

Constructor & Destructor Documentation

◆ Draw_ProgressIndicator()

Draw_ProgressIndicator::Draw_ProgressIndicator ( const Draw_Interpretor di,
Standard_Real  theUpdateThreshold = 1. 
)

Creates a progress indicator and remembers pointer to Draw_Interpretor.

Parameters
theUpdateThresholddefines minimal progress (in percents) between updates of the indicator (non-forced updates of the progress bar will be disabled until that progress is reached since last update).

◆ ~Draw_ProgressIndicator()

Draw_ProgressIndicator::~Draw_ProgressIndicator ( )

Destructor; calls Reset()

Member Function Documentation

◆ DefaultGraphMode()

static Standard_Boolean& Draw_ProgressIndicator::DefaultGraphMode ( )
static

Get/Set default values for output modes.

◆ DefaultTextMode()

static Standard_Boolean& Draw_ProgressIndicator::DefaultTextMode ( )
static

◆ GetGraphMode()

Standard_Boolean Draw_ProgressIndicator::GetGraphMode ( ) const

Gets graphical output mode (on/off)

◆ GetTextMode()

Standard_Boolean Draw_ProgressIndicator::GetTextMode ( ) const

Gets text output mode (on/off)

◆ Reset()

virtual void Draw_ProgressIndicator::Reset ( )
overridevirtual

Clears/erases opened TCL windows if any and sets myBreak to False.

Reimplemented from Message_ProgressIndicator.

◆ SetGraphMode()

void Draw_ProgressIndicator::SetGraphMode ( const Standard_Boolean  theGraphMode)

Sets graphical output mode (on/off)

◆ SetTextMode()

void Draw_ProgressIndicator::SetTextMode ( const Standard_Boolean  theTextMode)

Sets text output mode (on/off)

◆ Show()

virtual Standard_Boolean Draw_ProgressIndicator::Show ( const Standard_Boolean  force = Standard_True)
overridevirtual

Defines method Show of Progress Indicator.

Implements Message_ProgressIndicator.

◆ StopIndicator()

static Standard_Address& Draw_ProgressIndicator::StopIndicator ( )
static

Internal method for implementation of UserBreak mechanism; note that it uses static variable and thus not thread-safe!

◆ UserBreak()

virtual Standard_Boolean Draw_ProgressIndicator::UserBreak ( )
overridevirtual

Redefines method UserBreak of Progress Indicator.

Reimplemented from Message_ProgressIndicator.


The documentation for this class was generated from the following file: