ProgressBarStyler Class Reference

#include <Pt/Forms/ProgressBarStyler.h>

Progress bar styler.

Inherits Styler.

Public Member Functions

 ProgressBarStyler ()
 Constructs an unbound progress bar styler.
 
const Gfx::Brushbackground () const
 Returns the effective background brush.
 
void setBackground (const Gfx::Brush &brush)
 Sets the widget-local background brush to brush.
 
const Gfx::Brushforeground () const
 Returns the effective foreground brush.
 
void setForeground (const Gfx::Brush &brush)
 Sets the widget-local foreground brush to brush.
 
const Gfx::Pencontour () const
 Returns the effective contour pen.
 
void setContour (const Gfx::Pen &pen)
 Sets the widget-local contour pen to pen.
 
const Gfx::ColortextColor () const
 Returns the effective text color.
 
void setTextColor (const Gfx::Color &color)
 Sets the widget-local text color to color.
 
Gfx::Font font () const
 Returns the effective font.
 
void setFont (const Gfx::Font &font)
 Sets the widget-local font to font.
 
void setFontSize (std::size_t size)
 Sets the widget-local font size to size.
 
void setFontWeight (Gfx::Font::Weight weight)
 Sets the widget-local font weight to weight.
 
void setFontSlant (Gfx::Font::Slant slant)
 Sets the widget-local font slant to slant.
 
Gfx::SizeF measureFrame (PaintSurface &surface, const Gfx::SizeF &contentSize) const
 Measures the frame enclosing contentSize.
 
Gfx::SizeF measureBar (PaintSurface &surface) const
 Measures the bar's natural size.
 
void layoutChrome (PaintSurface &surface, const Gfx::RectF &rect, const Gfx::SizeF &barSize, const Gfx::SizeF &textSize, Gfx::RectF &barRect, Gfx::RectF &textRect) const
 Lays out the bar and text rectangles.
 
void layoutBar (PaintSurface &surface, const Gfx::RectF &barRect, float progressRatio, Gfx::RectF &trackRect, Gfx::RectF &chunkRect) const
 Lays out the track and chunk rectangles.
 
const PaintertextPainter (PaintSurface &surface) const
 Returns the text painter for surface, or 0 when unavailable.
 
void renderChrome (PaintContext &context, const Gfx::RectF &rect, const Gfx::RectF &trackRect, const Gfx::RectF &chunkRect, const Gfx::RectF &textRect, const String &text, const Gfx::PointF &textPos, const ProgressBarState &state) const
 Renders the chrome within rect.
 
void renderBar (PaintContext &context, const Gfx::RectF &trackRect, const Gfx::RectF &chunkRect, const ProgressBarState &state) const
 Renders the bar.
 
void renderTrack (PaintContext &context, const Gfx::RectF &trackRect, const ProgressBarState &state) const
 Renders the track.
 
void renderChunk (PaintContext &context, const Gfx::RectF &chunkRect, const ProgressBarState &state) const
 Renders the chunk.
 
void renderText (PaintContext &context, const Gfx::RectF &textRect, const Gfx::RectF &chunkRect, const String &text, const Gfx::PointF &textPos, const ProgressBarState &state) const
 Renders the text.
 
void setRenderer (ProgressBarRenderer *renderer=0)
 Assigns a specific progress bar renderer.
 
StyleOptionsoptions ()
 Returns the bound effective progress bar options. More...
 
const StyleOptionsoptions () const
 Returns the bound effective progress bar options.
 
bool bind (const Style &style, const StyleOptions &styleOptions)
 Binds or rebinds to a style and global style options.
 
bool isBound () const
 Returns true if bound.
 

Protected Member Functions

virtual StyleOptionsonBindOptions (const StyleOptions &styleOptions)
 Returns the specific style options.
 
virtual RendereronStyleRenderer (const Style &style)
 Resolves the shared style renderer for the current style.
 
virtual RendereronCreateRenderer (const Style &style)
 Creates an independant style renderer.
 
void init (Renderer *renderer)
 Initializes with a specific renderer.
 

Member Function Documentation

◆ options()

StyleOptions& options ( )

Use StyleOptions::findLocal() to query an explicit widget-local token.