Sourceforge.net - The VCF's Project Host
   The VCF Website Home   |   Online Discussion Forums   |   Sourceforge.net Project Page   

VCF::ProgressControl Class Reference

The ProgressControl is a class that displays a vertical or horizontal progress bar showing the position of within a given range of a task. More...

#include <vcf/ApplicationKit/ProgressControl.h>

Inheritance diagram for VCF::ProgressControl:

VCF::CustomControl VCF::Control VCF::UIComponent VCF::AbstractView VCF::Component VCF::View VCF::ObjectWithCallbacks VCF::Object List of all members.

Public Types

enum  ProgressAlignment { paVertical = 0, paHorizontal }

Public Member Functions

 ProgressControl ()
virtual ~ProgressControl ()
virtual void setName (const String &name)
 sets the name of the component.
ProgressAlignment getDisplayAlignment ()
void setDisplayAlignment (const ProgressAlignment &val)
double getMinValue ()
void setMinValue (const double &val)
double getMaxValue ()
void setMaxValue (const double &val)
double getPosition ()
void setPosition (const double &val)
bool getDisplayProgressText ()
void setDisplayProgressText (const bool &val)
bool getUseProgressFormatString ()
void setUseProgressFormatString (const bool &val)
String getProgressFormatString ()
void setProgressFormatString (const String &val)
virtual double getPreferredWidth ()
 returns the preferred width for this control.
virtual double getPreferredHeight ()
 returns the preferred height for this control.
virtual void paint (GraphicsContext *ctx)
 Paints the control.
void stepIt ()
double getStepItIncrement ()
void setStepItIncrement (const double &val)
ColorgetProgressBarColor ()
void setProgressBarColor (Color *val)
ColorgetProgressTextColor ()
void setProgressTextColor (Color *val)
virtual bool generatePropertyValue (const String &fullPropertyName, Property *property, VariantData *value, String &strValue)

Protected Attributes

ProgressAlignment displayAlignment_
double minVal_
double maxVal_
double position_
bool displayProgressText_
bool useProgressFormatString_
String progressFormatString_
double stepItIncrement_
ColorprogressBarColor_
ColorprogressTextColor_

Detailed Description

The ProgressControl is a class that displays a vertical or horizontal progress bar showing the position of within a given range of a task.


Member Enumeration Documentation

enum VCF::ProgressControl::ProgressAlignment
 

Enumerator:
paVertical 
paHorizontal 


Constructor & Destructor Documentation

VCF::ProgressControl::ProgressControl  ) 
 

virtual VCF::ProgressControl::~ProgressControl  )  [virtual]
 


Member Function Documentation

virtual bool VCF::ProgressControl::generatePropertyValue const String fullPropertyName,
Property property,
VariantData value,
String strValue
[virtual]
 

Reimplemented from VCF::Control.

ProgressAlignment VCF::ProgressControl::getDisplayAlignment  )  [inline]
 

bool VCF::ProgressControl::getDisplayProgressText  )  [inline]
 

double VCF::ProgressControl::getMaxValue  )  [inline]
 

double VCF::ProgressControl::getMinValue  )  [inline]
 

double VCF::ProgressControl::getPosition  )  [inline]
 

virtual double VCF::ProgressControl::getPreferredHeight  )  [virtual]
 

returns the preferred height for this control.

This is used when determing the height of the control when it is first created. Override it to provide a different value that is more acceptable for your control's initial display size.

Reimplemented from VCF::Control.

virtual double VCF::ProgressControl::getPreferredWidth  )  [virtual]
 

returns the preferred width for this control.

This is used when determing the width of the control when it is first created. Override it to provide a different value that is more acceptable for your control's initial display size.

Reimplemented from VCF::Control.

Color* VCF::ProgressControl::getProgressBarColor  )  [inline]
 

String VCF::ProgressControl::getProgressFormatString  )  [inline]
 

Color* VCF::ProgressControl::getProgressTextColor  )  [inline]
 

double VCF::ProgressControl::getStepItIncrement  )  [inline]
 

bool VCF::ProgressControl::getUseProgressFormatString  )  [inline]
 

virtual void VCF::ProgressControl::paint GraphicsContext ctx  )  [virtual]
 

Paints the control.

Called by the underlying windowing system whenever the control needs to be painted. Note that in some cases the GraphicsContext passed in to this method may not be the same pointer as the GraphicsContext that the control holds itself. During the paint() method you should only use the context value for all your drawing and not the one returned in getContext(). The value returned by getContext() should be used for drawing that takes place outside of the paint() method.

If the control allows paint notification, then the framework will fire an event to the BeforeControlPainted delegate prior to calling the control's paint() method. After the paint() method has returned, if the control allows paint notification, the framework will fire an event to the AfterControlPainted delegate. This allows outside observers to take part in the paint cycle, but beware that this does come at a bit of a cost, so use this feature sparingly.

Note: This should NEVER be called by programmers using the VCF, it will be called for you during the course of your applications native event loop, and is only here for providing custom drawing routines for controls. In other words: you implement it, you never call it yourself.

See also:
getAllowPaintNotification

Reimplemented from VCF::CustomControl.

void VCF::ProgressControl::setDisplayAlignment const ProgressAlignment val  ) 
 

void VCF::ProgressControl::setDisplayProgressText const bool &  val  ) 
 

void VCF::ProgressControl::setMaxValue const double &  val  ) 
 

void VCF::ProgressControl::setMinValue const double &  val  ) 
 

virtual void VCF::ProgressControl::setName const String name  )  [virtual]
 

sets the name of the component.

For naming conventions/rules please see getName().

Reimplemented from VCF::Component.

void VCF::ProgressControl::setPosition const double &  val  ) 
 

void VCF::ProgressControl::setProgressBarColor Color val  ) 
 

void VCF::ProgressControl::setProgressFormatString const String val  ) 
 

void VCF::ProgressControl::setProgressTextColor Color val  ) 
 

void VCF::ProgressControl::setStepItIncrement const double &  val  ) 
 

void VCF::ProgressControl::setUseProgressFormatString const bool &  val  ) 
 

void VCF::ProgressControl::stepIt  ) 
 


Member Data Documentation

ProgressAlignment VCF::ProgressControl::displayAlignment_ [protected]
 

bool VCF::ProgressControl::displayProgressText_ [protected]
 

double VCF::ProgressControl::maxVal_ [protected]
 

double VCF::ProgressControl::minVal_ [protected]
 

double VCF::ProgressControl::position_ [protected]
 

Color* VCF::ProgressControl::progressBarColor_ [protected]
 

String VCF::ProgressControl::progressFormatString_ [protected]
 

Color* VCF::ProgressControl::progressTextColor_ [protected]
 

double VCF::ProgressControl::stepItIncrement_ [protected]
 

bool VCF::ProgressControl::useProgressFormatString_ [protected]
 


The documentation for this class was generated from the following file:
   Comments or Suggestions?    License Information