PanelRenderer Class Referenceabstract

#include <Pt/Forms/PanelStyle.h>

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

Inherits Style::Facet.

Inherited by PlatinumPanelRenderer.

Public Member Functions

PanelRenderercreate () const
 Creates a new default-constructed instance that the caller owns.
 
void prepare (const StyleOptions &options, const PanelStyleOptions &panelOptions)
 Applies the widget-local panel style overrides to this renderer. More...
 
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 the facet to the given global style options.
 

Protected Member Functions

virtual void onReset (const StyleOptions &options)
 Resets the shared panel renderer to global defaults.
 

Detailed Description

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

Member Function Documentation

◆ prepare()

void prepare ( const StyleOptions options,
const PanelStyleOptions panelOptions 
)

This is the explicit synchronization point for the panel slice.