#include <Pt/Forms/SpinBoxStyler.h>
Binds spin box renderers and widget-local style options.
Inherits Styler.
Public Member Functions | |
| SpinBoxStyler () | |
| Constructs an unbound spin box styler. | |
| const Gfx::Brush & | background () const |
| Returns the effective spin box text background brush. | |
| void | setBackground (const Gfx::Brush &brush) |
| Sets the widget-local spin box text background brush. | |
| const Gfx::Brush & | foreground () const |
| Returns the effective foreground brush. | |
| void | setForeground (const Gfx::Brush &brush) |
| Sets the widget-local foreground brush. | |
| const Gfx::Pen & | contour () const |
| Returns the effective contour pen. | |
| void | setContour (const Gfx::Pen &pen) |
| Sets the widget-local contour pen. | |
| const Gfx::Color & | textColor () const |
| Returns the effective text color. | |
| void | setTextColor (const Gfx::Color &color) |
| Sets the widget-local text color. | |
| Gfx::Font | font () const |
| Returns the effective font. | |
| void | setFont (const Gfx::Font &font) |
| Sets the widget-local font. | |
| void | setFontSize (std::size_t size) |
| Sets the widget-local font size. | |
| void | setFontWeight (Gfx::Font::Weight weight) |
| Sets the widget-local font weight. | |
| void | setFontSlant (Gfx::Font::Slant slant) |
| Sets the widget-local font slant. | |
| Gfx::SizeF | measureFrame (PaintSurface &surface, const Gfx::SizeF &contentSize) const |
| Measures the frame enclosing contentSize. | |
| void | layoutChrome (PaintSurface &surface, const Gfx::RectF &rect, Gfx::RectF &entryRect, Gfx::RectF &upButtonRect, Gfx::RectF &downButtonRect, Gfx::RectF &textRect) const |
| Lays out spin box chrome and clears the output rectangles when unavailable. | |
| const Painter * | textPainter (PaintSurface &surface) const |
| Returns the prepared text painter for surface, or 0 when unavailable. | |
| void | renderChrome (PaintContext &context, const Gfx::RectF &rect, const Gfx::RectF &entryRect, const Gfx::RectF &upButtonRect, const Gfx::RectF &downButtonRect, const SpinBoxState &state) const |
| Renders spin box chrome within the supplied rectangles. | |
| void | renderText (PaintContext &context, const Gfx::RectF &textRect, const String &text, const Gfx::PointF &textPos, const Gfx::RectF &cursor, const SpinBoxState &state) const |
| Renders spin box text and cursor data within textRect. | |
| void | setRenderer (SpinBoxRenderer *renderer=0) |
| Assigns a specific spin box renderer. | |
| StyleOptions & | options () |
| Returns the bound effective spin box options. | |
| const StyleOptions & | options () const |
| Returns the bound effective spin box 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 StyleOptions & | onBindOptions (const StyleOptions &global) |
| Returns the specific style options. | |
| virtual Renderer * | onStyleRenderer (const Style &style) |
| Resolves the shared style renderer for the current style. | |
| virtual Renderer * | onCreateRenderer (const Style &style) |
| Creates an independant style renderer. | |
| void | init (Renderer *renderer) |
| Initializes with a specific renderer. | |