X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/79275a0dae9a4f29415b4bc57dbebdbb4e203957..a7689c49fe02c0c065facf736ab28b19f5997b7c:/include/wx/private/textmeasure.h diff --git a/include/wx/private/textmeasure.h b/include/wx/private/textmeasure.h index ebd6a61214..4788c992ed 100644 --- a/include/wx/private/textmeasure.h +++ b/include/wx/private/textmeasure.h @@ -23,7 +23,8 @@ class wxTextMeasureBase { public: // The first ctor argument must be non-NULL, i.e. each object of this class - // is associated with either a valid wxDC or a valid wxWindow. + // is associated with either a valid wxDC or a valid wxWindow. The font can + // be NULL to use the current DC/window font or can be specified explicitly. wxTextMeasureBase(const wxDC *dc, const wxFont *theFont); wxTextMeasureBase(const wxWindow *win, const wxFont *theFont); @@ -123,6 +124,10 @@ protected: wxCoord *descent = NULL, wxCoord *externalLeading = NULL); + // Return a valid font: if one was given to us in the ctor, use this one, + // otherwise use the current font of the associated wxDC or wxWindow. + wxFont GetFont() const; + // Exactly one of m_dc and m_win is non-NULL for any given object of this // class.