Version: 3.1.0
wxFontData Class Reference

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

Additional Inherited Members

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

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.