@remarks If the desired font does not exist, the closest match will be
chosen. Under Windows, only scalable TrueType fonts are used.
*/
- wxFont(int pointSize, wxFontFamily family, int style,
+ wxFont(int pointSize, wxFontFamily family, wxFontStyle style,
wxFontWeight weight,
- const bool underline = false,
- const wxString& faceName = "",
+ bool underline = false,
+ const wxString& faceName = wxEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
/**
chosen. Under Windows, only scalable TrueType fonts are used.
*/
wxFont(const wxSize& pixelSize, wxFontFamily family,
- int style, wxFontWeight weight,
- const bool underline = false,
- const wxString& faceName = "",
+ wxFontStyle style, wxFontWeight weight,
+ bool underline = false,
+ const wxString& faceName = wxEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
//@}
/**
Destructor.
- See @ref overview_refcountdestruct "reference-counted object destruction"
+ See @ref overview_refcount_destruct "reference-counted object destruction"
for more info.
@remarks Although all remaining fonts are deleted when the application
pointer to the font object is stored in an application
data structure, and there is a risk of double deletion.
*/
- ~wxFont();
+ virtual ~wxFont();
/**
Returns the current application's default encoding.
@see SetFaceName()
*/
- wxString GetFaceName() const;
+ virtual wxString GetFaceName() const;
/**
Gets the font family. See SetFamily() for a list of valid
@see SetFamily()
*/
- wxFontFamily GetFamily() const;
+ virtual wxFontFamily GetFamily() const;
/**
Returns the platform-dependent string completely describing this font.
@see GetNativeFontInfoDesc()
*/
- wxString GetNativeFontInfoUserDesc();
+ wxString GetNativeFontInfoUserDesc() const;
/**
Gets the point size.
@see SetPointSize()
*/
- int GetPointSize() const;
+ virtual int GetPointSize() const;
/**
Gets the font style. See wxFontStyle for a list of valid styles.
@see SetStyle()
*/
- wxFontStyle GetStyle() const;
+ virtual wxFontStyle GetStyle() const;
/**
Returns @true if the font is underlined, @false otherwise.
@see SetUnderlined()
*/
- bool GetUnderlined() const;
+ virtual bool GetUnderlined() const;
/**
Gets the font weight. See wxFontWeight for a list of valid weight identifiers.
@see SetWeight()
*/
- wxFontWeight GetWeight() const;
+ virtual wxFontWeight GetWeight() const;
/**
Returns @true if the font is a fixed width (or monospaced) font,
@false if it is a proportional one or font is invalid.
*/
- bool IsFixedWidth() const;
+ virtual bool IsFixedWidth() const;
/**
Returns @true if this object is a valid font, @false otherwise.
*/
- bool IsOk() const;
+ virtual bool IsOk() const;
//@{
/**
- These functions take the same parameters as @ref ctor() wxFont
- constructor and return a new font object allocated on the heap.
+ These functions take the same parameters as
+ @ref wxFont::wxFont "wxFont constructors" and return a new font
+ object allocated on the heap.
Using @c New() is currently the only way to directly create a font with
the given size in pixels on platforms other than wxMSW.
*/
- static wxFont* New(int pointSize, wxFontFamily family, int style,
+ static wxFont* New(int pointSize, wxFontFamily family, wxFontStyle style,
wxFontWeight weight,
- const bool underline = false,
- const wxString& faceName = "",
+ bool underline = false,
+ const wxString& faceName = wxEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
static wxFont* New(int pointSize, wxFontFamily family,
int flags = wxFONTFLAG_DEFAULT,
- const wxString& faceName = "",
+ const wxString& faceName = wxEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
static wxFont* New(const wxSize& pixelSize,
wxFontFamily family,
- int style,
+ wxFontStyle style,
wxFontWeight weight,
- const bool underline = false,
- const wxString& faceName = "",
+ bool underline = false,
+ const wxString& faceName = wxEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
static wxFont* New(const wxSize& pixelSize,
wxFontFamily family,
int flags = wxFONTFLAG_DEFAULT,
- const wxString& faceName = "",
+ const wxString& faceName = wxEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
//@}
@see GetFaceName(), SetFamily()
*/
- bool SetFaceName(const wxString& faceName);
+ virtual bool SetFaceName(const wxString& faceName);
/**
Sets the font family.
@see GetFamily(), SetFaceName()
*/
- void SetFamily(wxFontFamily family);
+ virtual void SetFamily(wxFontFamily family);
/**
Creates the font corresponding to the given native font description string
@see GetPointSize()
*/
- void SetPointSize(int pointSize);
+ virtual void SetPointSize(int pointSize);
/**
Sets the font style.
@see GetStyle()
*/
- void SetStyle(wxFontStyle style);
+ virtual void SetStyle(wxFontStyle style);
/**
Sets underlining.
@see GetUnderlined()
*/
- void SetUnderlined(const bool underlined);
+ virtual void SetUnderlined(bool underlined);
/**
Sets the font weight.
@see GetWeight()
*/
- void SetWeight(wxFontWeight weight);
+ virtual void SetWeight(wxFontWeight weight);
/**
Inequality operator.
- See @ref overview_refcountequality "reference-counted object comparison" for
+ See @ref overview_refcount_equality "reference-counted object comparison" for
more info.
*/
- bool operator !=(const wxFont& font);
+ bool operator!=(const wxFont& font) const;
/**
Equality operator.
- See @ref overview_refcountequality "reference-counted object comparison" for
+ See @ref overview_refcount_equality "reference-counted object comparison" for
more info.
*/
- bool operator ==(const wxFont& font);
+ bool operator==(const wxFont& font) const;
/**
Assignment operator, using @ref overview_refcount "reference counting".
Finds a font of the given specification, or creates one and adds it to the
list. See the @ref wxFont "wxFont constructor" for details of the arguments.
*/
- wxFont* FindOrCreateFont(int point_size, int family, int style,
- int weight,
- bool underline = false,
- const wxString& facename = NULL,
+ wxFont* FindOrCreateFont(int point_size, wxFontFamily family, wxFontStyle style,
+ wxFontWeight weight, bool underline = false,
+ const wxString& facename = wxEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
};
// Global functions/macros
// ============================================================================
-/** @ingroup group_funcmacro_misc */
+/** @addtogroup group_funcmacro_misc */
//@{
/**