SliderStyler Class Reference

#include <Pt/Forms/SliderStyler.h>

Slider styler.

Inherits Styler.

Public Member Functions

 SliderStyler ()
 Constructs an unbound slider 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 measureTrack (PaintSurface &surface) const
 Measures the slider track.
 
Gfx::SizeF measureHandle (PaintSurface &surface) const
 Measures the slider handle.
 
void layoutChrome (PaintSurface &surface, const Gfx::RectF &rect, const Gfx::SizeF &trackSize, const Gfx::SizeF &handleSize, Gfx::RectF &trackRect, Gfx::RectF &handleRect) const
 Lays out the slider track and handle rectangles.
 
void layoutHandle (PaintSurface &surface, const Gfx::RectF &trackRect, float fraction, Gfx::RectF &handleRect) const
 Lays out the handle for fraction along trackRect.
 
void renderChrome (PaintContext &context, const Gfx::RectF &rect, const Gfx::RectF &trackRect, const Gfx::RectF &handleRect, const SliderState &state) const
 Renders the slider chrome within rect for state.
 
void setRenderer (SliderRenderer *renderer=0)
 Assigns a specific slider renderer.
 
StyleOptionsoptions ()
 Returns the bound effective slider options.
 
const StyleOptionsoptions () const
 Returns the bound effective slider 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 &global)
 Binds local slider options to global and returns them.
 
virtual RendereronStyleRenderer (const Style &style)
 Resolves the shared slider renderer from style.
 
virtual RendereronCreateRenderer (const Style &style)
 Creates an independent slider renderer from style.
 
void init (Renderer *renderer)
 Initializes with a specific renderer.