TabViewStyler Class Reference

#include <Pt/Forms/TabViewStyler.h>

Binds tab view renderers and local style options.

Inherits Styler.

Public Member Functions

 TabViewStyler ()
 Constructs an unbound tab view 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::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.
 
const Gfx::ColoraccentColor () const
 Returns the effective accent color.
 
void setAccentColor (const Gfx::Color &color)
 Sets the widget-local accent 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 measureTab (PaintSurface &surface, const Pt::String &text) const
 Measures text as a tab label.
 
Gfx::RectF layoutTab (PaintSurface &surface, const Gfx::RectF &tabRect) const
 Returns the tab-label rectangle within tabRect.
 
const PaintertextPainter (PaintSurface &surface) const
 Returns a tab-label painter for surface, or 0 when unavailable.
 
void renderBackground (PaintContext &context, const Gfx::RectF &contentRect, const TabViewState &state) const
 Renders the tab view background for state.
 
void renderChrome (PaintContext &context, const Gfx::RectF &contentRect, const Gfx::RectF &activeTabRect, const TabViewState &state) const
 Renders the tab view frame for state.
 
void renderTab (PaintContext &context, const Gfx::RectF &tabRect, const Pt::String &text, const Gfx::PointF &textPos, const TabViewItemState &state) const
 Renders a tab item for state.
 
void setRenderer (TabViewRenderer *renderer=0)
 Assigns a specific tab view renderer.
 
StyleOptionsoptions ()
 Returns the effective tab view options.
 
const StyleOptionsoptions () const
 Returns the effective tab view 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 the local tab view options to global.
 
virtual RendereronStyleRenderer (const Style &style)
 Resolves the shared tab view renderer from style.
 
virtual RendereronCreateRenderer (const Style &style)
 Creates a tab view renderer clone from style.
 
void init (Renderer *renderer)
 Initializes with a specific renderer.