#include <Pt/Forms/CheckBoxStyler.h>
Binds a check box widget to the currently active renderer. More...
Inherits Styler.
Public Member Functions | |
| CheckBoxStyler () | |
| Constructs an unbound check box style controller. | |
| const Gfx::Brush & | background () const |
| Returns the effective check box background brush. | |
| void | setBackground (const Gfx::Brush &brush) |
| Sets the widget-local check box background brush to brush. | |
| const Gfx::Pen & | contour () const |
| Returns the effective check box contour pen. | |
| void | setContour (const Gfx::Pen &pen) |
| Sets the widget-local check box contour pen to pen. | |
| const Gfx::Color & | textColor () const |
| Returns the effective check box text color. | |
| void | setTextColor (const Gfx::Color &color) |
| Sets the widget-local check box text color to color. | |
| Gfx::Font | font () const |
| Returns the effective check box font. | |
| void | setFont (const Gfx::Font &font) |
| Sets the widget-local check box font to font. | |
| void | setFontSize (std::size_t size) |
| Sets the widget-local check box font size to size. | |
| void | setFontWeight (Gfx::Font::Weight weight) |
| Sets the widget-local check box font weight to weight. | |
| void | setFontSlant (Gfx::Font::Slant slant) |
| Sets the widget-local check box font slant to slant. | |
| void | setRenderer (CheckBoxRenderer *renderer=0) |
| Assigns a specific check box renderer. | |
| const Painter * | textPainter (PaintSurface &surface) |
| Returns the current text painter or 0 when no renderer is bound. | |
| Gfx::SizeF | measureIndicator (PaintSurface &surface) |
| Returns the natural size of the check indicator on surface. | |
| Gfx::SizeF | measureContent (PaintSurface &surface, const Gfx::SizeF &indicatorSize, const Gfx::SizeF &textSize) |
| Returns the combined content size for the indicator and text. | |
| Gfx::SizeF | measureFrame (PaintSurface &surface, const Gfx::SizeF &contentSize) |
| Returns the outer size including the frame for contentSize. | |
| Gfx::RectF | layoutFrame (PaintSurface &surface, const Gfx::RectF &frameRect) |
| Returns the content rectangle within frameRect. | |
| void | layoutContent (PaintSurface &surface, const Gfx::RectF &contentRect, const Gfx::SizeF &indicatorSize, const Gfx::SizeF &textSize, Gfx::RectF &indicatorRect, Gfx::RectF &textRect) |
| Partitions contentRect into indicator and text rectangles. | |
| Gfx::RectF | layoutMnemonic (PaintSurface &surface, const String &text, const Gfx::PointF &textPos, const Gfx::FontMetrics &fontMetrics, String::size_type mnemonicIndex) |
| Returns the mnemonic underline rectangle. | |
| void | renderChrome (PaintContext &context, const Gfx::RectF &rect, const Gfx::RectF &boxRect, const CheckBoxState &state) |
| Draws check indicator chrome. | |
| void | renderText (PaintContext &context, const Gfx::RectF &textRect, const String &text, const Gfx::PointF &pos, const CheckBoxState &state) |
| Draws text clipped to textRect. | |
| void | renderMnemonic (PaintContext &context, const Gfx::RectF &rect, const Gfx::RectF &mnemonic, const CheckBoxState &state) |
| Draws the mnemonic underline. | |
| StyleOptions & | options () |
| Returns the effective check box options. | |
| const StyleOptions & | options () const |
| Returns the effective check 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. | |
Keeps the active renderer binding for the shared style renderer, a private override clone, or an explicitly assigned custom renderer.