LineEditStyler Class Reference

#include <Pt/Forms/LineEditStyler.h>

Binds line edit renderers and widget-local style options.

Inherits Styler.

Public Member Functions

 LineEditStyler ()
 Constructs an unbound line edit styler.
 
const Gfx::Brushbackground () const
 Returns the effective text background brush.
 
void setBackground (const Gfx::Brush &brush)
 Sets the widget-local text 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.
 
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, or returns an empty size.
 
Gfx::RectF layoutFrame (PaintSurface &surface, const Gfx::RectF &rect) const
 Returns the frame content rectangle, or an empty rectangle when unavailable.
 
const PaintertextPainter (PaintSurface &surface) const
 Returns the prepared text painter, or 0 when no renderer is bound.
 
void renderChrome (PaintContext &context, const Gfx::RectF &rect, const Gfx::RectF &textRect, const String &text, const Gfx::PointF &textPos, const Gfx::RectF &cursor, const Gfx::RectF &selection, const LineEditState &state) const
 Renders line edit chrome when a renderer is bound.
 
void setRenderer (LineEditRenderer *renderer=0)
 Assigns a specific line edit renderer or restores style fallback.
 
StyleOptionsoptions ()
 Returns the bound effective line edit options.
 
const StyleOptionsoptions () const
 Returns the bound effective line edit 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.