Version: 3.1.1

#include <wx/fontdata.h>

+ Inheritance diagram for wxFontData:

Detailed Description

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

Library:  wxCore
Category:  Common Dialogs, Data Structures
See also
wxFontDialog Overview, wxFont, wxFontDialog

Public Member Functions

 wxFontData ()
 Constructor. More...
 
void EnableEffects (bool enable)
 Enables or disables "effects" under Windows or generic only. More...
 
bool GetAllowSymbols () const
 Under Windows, returns a flag determining whether symbol fonts can be selected. More...
 
wxFont GetChosenFont () const
 Gets the font chosen by the user if the user pressed OK (wxFontDialog::ShowModal() returned wxID_OK). More...
 
const wxColourGetColour () const
 Gets the colour associated with the font dialog. More...
 
bool GetEnableEffects () const
 Determines whether "effects" are enabled under Windows. More...
 
wxFont GetInitialFont () const
 Gets the font that will be initially used by the font dialog. More...
 
bool GetShowHelp () const
 Returns true if the Help button will be shown (Windows only). More...
 
void SetAllowSymbols (bool allowSymbols)
 Under Windows, determines whether symbol fonts can be selected. More...
 
void SetChosenFont (const wxFont &font)
 Sets the font that will be returned to the user (for internal use only). More...
 
void SetColour (const wxColour &colour)
 Sets the colour that will be used for the font foreground colour. More...
 
void SetInitialFont (const wxFont &font)
 Sets the font that will be initially used by the font dialog. More...
 
void SetRange (int min, int max)
 Sets the valid range for the font point size (Windows only). More...
 
void SetShowHelp (bool showHelp)
 Determines whether the Help button will be displayed in the font dialog (Windows only). More...
 
wxFontDataoperator= (const wxFontData &data)
 Assignment operator for the font data. More...
 
- Public Member Functions inherited from wxObject
 wxObject ()
 Default ctor; initializes to NULL the internal reference data. More...
 
 wxObject (const wxObject &other)
 Copy ctor. More...
 
virtual ~wxObject ()
 Destructor. More...
 
virtual wxClassInfoGetClassInfo () const
 This virtual function is redefined for every class that requires run-time type information, when using the wxDECLARE_CLASS macro (or similar). More...
 
wxObjectRefDataGetRefData () const
 Returns the wxObject::m_refData pointer, i.e. the data referenced by this object. More...
 
bool IsKindOf (const wxClassInfo *info) const
 Determines whether this class is a subclass of (or the same class as) the given class. More...
 
bool IsSameAs (const wxObject &obj) const
 Returns true if this object has the same data pointer as obj. More...
 
void Ref (const wxObject &clone)
 Makes this object refer to the data in clone. More...
 
void SetRefData (wxObjectRefData *data)
 Sets the wxObject::m_refData pointer. More...
 
void UnRef ()
 Decrements the reference count in the associated data, and if it is zero, deletes the data. More...
 
void UnShare ()
 This is the same of AllocExclusive() but this method is public. More...
 
void operator delete (void *buf)
 The delete operator is defined for debugging versions of the library only, when the identifier WXDEBUG is defined. More...
 
void * operator new (size_t size, const wxString &filename=NULL, int lineNum=0)
 The new operator is defined for debugging versions of the library only, when the identifier WXDEBUG is defined. More...
 

Additional Inherited Members

- Protected Member Functions inherited from wxObject
void AllocExclusive ()
 Ensure that this object's data is not shared with any other object. More...
 
virtual wxObjectRefDataCreateRefData () const
 Creates a new instance of the wxObjectRefData-derived class specific to this object and returns it. More...
 
virtual wxObjectRefDataCloneRefData (const wxObjectRefData *data) const
 Creates a new instance of the wxObjectRefData-derived class specific to this object and initializes it copying data. More...
 
- Protected Attributes inherited from wxObject
wxObjectRefDatam_refData
 Pointer to an object which is the object's reference-counted data. More...
 

Constructor & Destructor Documentation

wxFontData::wxFontData ( )

Constructor.

Initializes fontColour to black, showHelp to false, allowSymbols to true, enableEffects to true, minSize to 0 and maxSize to 0.

Member Function Documentation

void wxFontData::EnableEffects ( bool  enable)

Enables or disables "effects" under Windows or generic only.

This refers to the controls for manipulating colour, strikeout and underline properties.

The default value is true.

bool wxFontData::GetAllowSymbols ( ) const

Under Windows, returns a flag determining whether symbol fonts can be selected.

Has no effect on other platforms.

The default value is true.

wxFont wxFontData::GetChosenFont ( ) const

Gets the font chosen by the user if the user pressed OK (wxFontDialog::ShowModal() returned wxID_OK).

const wxColour& wxFontData::GetColour ( ) const

Gets the colour associated with the font dialog.

The default value is black.

bool wxFontData::GetEnableEffects ( ) const

Determines whether "effects" are enabled under Windows.

This refers to the controls for manipulating colour, strikeout and underline properties.

The default value is true.

wxFont wxFontData::GetInitialFont ( ) const

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

This should have previously been set by the application.

bool wxFontData::GetShowHelp ( ) const

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

The default value is false.

wxFontData& wxFontData::operator= ( const wxFontData data)

Assignment operator for the font data.

void wxFontData::SetAllowSymbols ( bool  allowSymbols)

Under Windows, determines whether symbol fonts can be selected.

Has no effect on other platforms.

The default value is true.

void wxFontData::SetChosenFont ( const wxFont font)

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

void wxFontData::SetColour ( const wxColour colour)

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

The default colour is black.

void wxFontData::SetInitialFont ( const wxFont font)

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

void wxFontData::SetRange ( int  min,
int  max 
)

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

The default is 0, 0 (unrestricted range).

void wxFontData::SetShowHelp ( bool  showHelp)

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

The default value is false.