PanelRenderer Class Referenceabstract

#include <Pt/Forms/PanelStyler.h>

Renders the visual appearance of a panel-like widget. More...

Inherits Renderer.

Inherited by PlatinumPanelRenderer.

Public Member Functions

PanelRenderercreate () const
 Creates a new default-constructed instance that the caller owns.
 
Gfx::SizeF measureFrame (PaintSurface &surface, const Gfx::SizeF &contentSize)
 Returns the outer size including the frame for the given content size.
 
Gfx::RectF layoutFrame (PaintSurface &surface, const Gfx::RectF &frameRect)
 Returns the inner content rectangle within the outer frame rect.
 
const PaintertextPainter (PaintSurface &surface)
 Returns a painter with the current font and text color applied.
 
void renderBackground (PaintContext &context, const Gfx::RectF &rect, const PanelState &state)
 Paints the panel background within the widget rect.
 
void renderFrame (PaintContext &context, const Gfx::RectF &rect, const PanelState &state)
 Paints the frame border within the outer frame rect.
 
void renderText (PaintContext &context, const Gfx::RectF &rect, const String &text, const Gfx::PointF &pos, const PanelState &state)
 Draws text at pos, clipped to the widget rect.
 
void renderIcon (PaintContext &context, const Gfx::RectF &rect, const Pixmap &picture, const Gfx::PointF &pos, const PanelState &state)
 Draws picture at pos, clipped to the widget rect.
 
void reset (const StyleOptions &options)
 Resets with new style options.
 

Protected Member Functions

virtual PanelRendereronCreate () const =0
 Hook that allocates a new renderer of the same concrete type.
 
virtual void onReset (const StyleOptions &options)=0
 

Detailed Description

Provides rendering primitives for panel backgrounds, frames, text, and icons. Subclasses override the protected virtuals.

Member Function Documentation

◆ onReset()

virtual void onReset ( const StyleOptions options)
protectedpure virtual