add virtual DoGetTextExtent() to allow calling the overloaded wxWindowBase::GetTextExtent() on wxWindow objects without any ugly casts/scope resolution operators
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60984 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1069,12 +1069,14 @@ public:
|
||||
|
||||
// get the width/height/... of the text using current or specified
|
||||
// font
|
||||
virtual void GetTextExtent(const wxString& string,
|
||||
int *x, int *y,
|
||||
int *descent = NULL,
|
||||
int *externalLeading = NULL,
|
||||
const wxFont *theFont = (const wxFont *) NULL)
|
||||
const = 0;
|
||||
void GetTextExtent(const wxString& string,
|
||||
int *x, int *y,
|
||||
int *descent = NULL,
|
||||
int *externalLeading = NULL,
|
||||
const wxFont *font = NULL) const
|
||||
{
|
||||
DoGetTextExtent(string, x, y, descent, externalLeading, font);
|
||||
}
|
||||
|
||||
wxSize GetTextExtent(const wxString& string) const
|
||||
{
|
||||
@@ -1602,6 +1604,13 @@ protected:
|
||||
// overloaded Something()s in terms of DoSomething() which will be the
|
||||
// only one to be virtual.
|
||||
|
||||
// text extent
|
||||
virtual void DoGetTextExtent(const wxString& string,
|
||||
int *x, int *y,
|
||||
int *descent = NULL,
|
||||
int *externalLeading = NULL,
|
||||
const wxFont *font = NULL) const = 0;
|
||||
|
||||
// coordinates translation
|
||||
virtual void DoClientToScreen( int *x, int *y ) const = 0;
|
||||
virtual void DoScreenToClient( int *x, int *y ) const = 0;
|
||||
|
Reference in New Issue
Block a user