## wxFontData

wxFontDialog overview

This class holds a variety of information related to font dialogs.

Derived from

wxObject

Include files

<wx/cmndata.h>

See also

Overview, wxFontDialog

Members

wxFontData::wxFontData
wxFontData::~wxFontData
wxFontData::EnableEffects
wxFontData::GetAllowSymbols
wxFontData::GetColour
wxFontData::GetChosenFont
wxFontData::GetEnableEffects
wxFontData::GetInitialFont
wxFontData::GetShowHelp
wxFontData::SetAllowSymbols
wxFontData::SetChosenFont
wxFontData::SetColour
wxFontData::SetInitialFont
wxFontData::SetRange
wxFontData::SetShowHelp
wxFontData::operator =

### wxFontData::wxFontData

wxFontData()

Constructor. Initializes fontColour to black, showHelp to black, allowSymbols to TRUE, enableEffects to TRUE, minSize to 0 and maxSize to 0.

### wxFontData::~wxFontData

~wxFontData()

Destructor.

### wxFontData::EnableEffects

void EnableEffects(bool enable)

Enables or disables 'effects' under MS Windows only. This refers to the controls for manipulating colour, strikeout and underline properties.

The default value is TRUE.

### wxFontData::GetAllowSymbols

bool GetAllowSymbols()

Under MS Windows, returns a flag determining whether symbol fonts can be selected. Has no effect on other platforms.

The default value is TRUE.

### wxFontData::GetColour

wxColour& GetColour()

Gets the colour associated with the font dialog.

The default value is black.

### wxFontData::GetChosenFont

wxFont GetChosenFont()

Gets the font chosen by the user. If the user pressed OK (wxFontDialog::Show returned TRUE), this returns a new font which is now 'owned' by the application, and should be deleted if not required. If the user pressed Cancel (wxFontDialog::Show returned FALSE) or the colour dialog has not been invoked yet, this will return NULL.

### wxFontData::GetEnableEffects

bool GetEnableEffects()

Determines whether 'effects' are enabled under Windows. This refers to the controls for manipulating colour, strikeout and underline properties.

The default value is TRUE.

### wxFontData::GetInitialFont

wxFont GetInitialFont()

Gets the font that will be initially used by the font dialog. This should have previously been set by the application.

### wxFontData::GetShowHelp

bool GetShowHelp()

Returns TRUE if the Help button will be shown (Windows only).

The default value is FALSE.

### wxFontData::SetAllowSymbols

void SetAllowSymbols(bool allowSymbols)

Under MS Windows, determines whether symbol fonts can be selected. Has no effect on other platforms.

The default value is TRUE.

### wxFontData::SetChosenFont

void SetChosenFont(const wxFont& font)

Sets the font that will be returned to the user (for internal use only).

### wxFontData::SetColour

void SetColour(const wxColour& colour)

Sets the colour that will be used for the font foreground colour.

The default colour is black.

### wxFontData::SetInitialFont

void SetInitialFont(const wxFont&font)

Sets the font that will be initially used by the font dialog.

### wxFontData::SetRange

void SetRange(int min, int max)

Sets the valid range for the font point size (Windows only).

The default is 0, 0 (unrestricted range).

### wxFontData::SetShowHelp

void SetShowHelp(bool showHelp)

Determines whether the Help button will be displayed in the font dialog (Windows only).

The default value is FALSE.

### wxFontData::operator =

void operator =(const wxFontData& data)

Assignment operator for the font data.