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:
Vadim Zeitlin
2000-11-26 02:05:33 +00:00
parent eafd9d4f24
commit 20b45caa12
4 changed files with 77 additions and 6 deletions

View File

@@ -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;