#include <Pt/Forms/ListBoxStyler.h>
Binds list item renderers and their local style options.
Inherits Styler.
Public Member Functions | |
| ListItemStyler () | |
| Constructs an unbound list item styler. | |
| void | setBackground (const Gfx::Brush &brush) |
| Sets the widget-local list item background brush to brush. | |
| const Gfx::Color & | textColor () const |
| Returns the effective list item text color. | |
| void | setTextColor (const Gfx::Color &color) |
| Sets the widget-local list item text color to color. | |
| Gfx::Font | font () const |
| Returns the effective list item font. | |
| void | setFont (const Gfx::Font &font) |
| Sets the widget-local list item font to font. | |
| void | setFontSize (std::size_t size) |
| Sets the widget-local list item font size to size. | |
| void | setFontWeight (Gfx::Font::Weight weight) |
| Sets the widget-local list item font weight to weight. | |
| void | setFontSlant (Gfx::Font::Slant slant) |
| Sets the widget-local list item font slant to slant. | |
| Gfx::SizeF | measureContent (PaintSurface &surface, const Gfx::SizeF &iconSize, const Gfx::SizeF &textSize) const |
| Measures content containing iconSize and textSize. | |
| Gfx::SizeF | measureFrame (PaintSurface &surface, const Gfx::SizeF &contentSize) const |
| Measures the frame enclosing contentSize. | |
| const Painter * | textPainter (PaintSurface &surface) const |
| Returns the text painter for surface, or 0 when unavailable. | |
| Gfx::RectF | layoutFrame (PaintSurface &surface, const Gfx::RectF &frameRect) const |
| Returns the frame content rectangle within frameRect. | |
| void | layoutContent (PaintSurface &surface, const Gfx::RectF &contentRect, const Gfx::SizeF &iconSize, const Gfx::SizeF &textSize, Gfx::RectF &iconRect, Gfx::RectF &textRect) const |
| Lays out icon and text rectangles within contentRect. | |
| void | renderBackground (PaintContext &context, const Gfx::RectF &rect, const ListItemState &state) const |
| Renders the list item background within rect for state. | |
| void | renderHighlight (PaintContext &context, const Gfx::RectF &rect, const ListItemState &state) const |
| Renders the list item highlight background within rect for state. | |
| void | renderText (PaintContext &context, const Gfx::RectF &textRect, const String &text, const Gfx::PointF &pos, const ListItemState &state) const |
| Renders text at pos within textRect for state. | |
| void | renderIcon (PaintContext &context, const Gfx::RectF &iconRect, const Pixmap &picture, const Gfx::PointF &pos, const ListItemState &state) const |
| Renders picture at pos within iconRect for state. | |
| void | setRenderer (ListItemRenderer *renderer=0) |
| Assigns a specific list item renderer. | |
| StyleOptions & | options () |
| Returns the bound effective list item options. | |
| const StyleOptions & | options () const |
| Returns the bound effective list item 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. | |