1. don't call GetPartOfWrappendLine() unnecessarily
2. optimized it (replaced by a call to HitTestLine) for the other cases git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/wxUNIVERSAL@8826 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -287,7 +287,8 @@ protected:
|
||||
// more readable flag testing methods
|
||||
bool IsSingleLine() const { return !(GetWindowStyle() & wxTE_MULTILINE); }
|
||||
bool IsPassword() const { return (GetWindowStyle() & wxTE_PASSWORD) != 0; }
|
||||
bool WrapLines() const { return !(GetWindowStyle() & wxHSCROLL); }
|
||||
bool WrapLines() const
|
||||
{ return !IsSingleLine() && !(GetWindowStyle() & wxHSCROLL); }
|
||||
|
||||
// get the extent (width) of the text
|
||||
wxCoord GetTextWidth(const wxString& text) const;
|
||||
|
Reference in New Issue
Block a user