wxDCFontChanger Class Reference
[Graphics Device Interface (GDI)]

#include <wx/dc.h>


Detailed Description

wxDCFontChanger is a small helper class for setting a font on a wxDC and unsetting it automatically in the destructor, restoring the previous one.

Since:
2.9.0

Library:  wxCore

Category:  Graphics Device Interface (GDI)

See also:
wxDC::SetFont(), wxDCTextColourChanger, wxDCPenChanger, wxDCBrushChanger, wxDCClipper

Public Member Functions

 wxDCFontChanger (wxDC &dc, const wxFont &font)
 Sets font on the given dc, storing the old one.
 ~wxDCFontChanger ()
 Restores the colour originally selected in the DC passed to the ctor.

List of all members.


Constructor & Destructor Documentation

wxDCFontChanger::wxDCFontChanger ( wxDC dc,
const wxFont font 
)

Sets font on the given dc, storing the old one.

Parameters:
dc The DC where the font must be temporary set.
font The font to set.

wxDCFontChanger::~wxDCFontChanger (  ) 

Restores the colour originally selected in the DC passed to the ctor.



wxWidgets logo

[ top ]