From c94c3a77b81090a6e0bb338872876686681b1d05 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 1 Nov 2012 17:15:22 +0000 Subject: [PATCH] Allow creating wxTextMeasure without specifying the font. Use the default window/DC font by default as this is the most common case. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72846 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/generic/private/textmeasure.h | 4 ++-- include/wx/gtk/private/textmeasure.h | 4 ++-- include/wx/msw/private/textmeasure.h | 5 +++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/wx/generic/private/textmeasure.h b/include/wx/generic/private/textmeasure.h index 5d44f35350..c3ab30da70 100644 --- a/include/wx/generic/private/textmeasure.h +++ b/include/wx/generic/private/textmeasure.h @@ -18,9 +18,9 @@ class wxTextMeasure : public wxTextMeasureBase { public: - wxTextMeasure(const wxDC *dc, const wxFont *font) + wxEXPLICIT wxTextMeasure(const wxDC *dc, const wxFont *font = NULL) : wxTextMeasureBase(dc, font) {} - wxTextMeasure(const wxWindow *win, const wxFont *font) + wxEXPLICIT wxTextMeasure(const wxWindow *win, const wxFont *font = NULL) : wxTextMeasureBase(win, font) {} protected: diff --git a/include/wx/gtk/private/textmeasure.h b/include/wx/gtk/private/textmeasure.h index 5027be7b35..d32466f287 100644 --- a/include/wx/gtk/private/textmeasure.h +++ b/include/wx/gtk/private/textmeasure.h @@ -20,13 +20,13 @@ class WXDLLIMPEXP_FWD_CORE wxWindowDCImpl; class wxTextMeasure : public wxTextMeasureBase { public: - wxTextMeasure(const wxDC *dc, const wxFont *font) + wxEXPLICIT wxTextMeasure(const wxDC *dc, const wxFont *font = NULL) : wxTextMeasureBase(dc, font) { Init(); } - wxTextMeasure(const wxWindow *win, const wxFont *font) + wxEXPLICIT wxTextMeasure(const wxWindow *win, const wxFont *font = NULL) : wxTextMeasureBase(win, font) { Init(); diff --git a/include/wx/msw/private/textmeasure.h b/include/wx/msw/private/textmeasure.h index a52deb59a1..e317510ffe 100644 --- a/include/wx/msw/private/textmeasure.h +++ b/include/wx/msw/private/textmeasure.h @@ -20,12 +20,13 @@ class wxTextMeasure : public wxTextMeasureBase { public: - wxTextMeasure(const wxDC *dc, const wxFont *font) + wxEXPLICIT wxTextMeasure(const wxDC *dc, const wxFont *font = NULL) : wxTextMeasureBase(dc, font) { Init(); } - wxTextMeasure(const wxWindow *win, const wxFont *font) + + wxEXPLICIT wxTextMeasure(const wxWindow *win, const wxFont *font = NULL) : wxTextMeasureBase(win, font) { Init(); -- 2.45.2