Fixed warnings/errors and changed Thaw
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36012 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
d9f42a9e5a
commit
0bab774ba3
@ -231,7 +231,7 @@ public:
|
||||
virtual void Freeze();
|
||||
|
||||
/// Call Thaw to refresh
|
||||
virtual void Thaw(bool refresh = true);
|
||||
virtual void Thaw();
|
||||
|
||||
/// Call Thaw to refresh
|
||||
virtual bool IsFrozen() const { return m_freezeCount > 0; }
|
||||
@ -584,7 +584,7 @@ public:
|
||||
virtual void SetupScrollbars(bool atTop = false);
|
||||
|
||||
/// Keyboard navigation
|
||||
virtual bool Navigate(int keyCode, int flags);
|
||||
virtual bool KeyboardNavigate(int keyCode, int flags);
|
||||
|
||||
/// Paint the background
|
||||
virtual void PaintBackground(wxDC& dc);
|
||||
|
@ -187,11 +187,11 @@ void wxRichTextCtrl::Freeze()
|
||||
}
|
||||
|
||||
/// Call Thaw to refresh
|
||||
void wxRichTextCtrl::Thaw(bool refresh)
|
||||
void wxRichTextCtrl::Thaw()
|
||||
{
|
||||
m_freezeCount --;
|
||||
|
||||
if (m_freezeCount == 0 && refresh)
|
||||
if (m_freezeCount == 0)
|
||||
{
|
||||
SetupScrollbars();
|
||||
Refresh(false);
|
||||
@ -435,7 +435,7 @@ void wxRichTextCtrl::OnChar(wxKeyEvent& event)
|
||||
event.GetKeyCode() == WXK_NEXT ||
|
||||
event.GetKeyCode() == WXK_END)
|
||||
{
|
||||
Navigate(event.GetKeyCode(), flags);
|
||||
KeyboardNavigate(event.GetKeyCode(), flags);
|
||||
}
|
||||
else if (event.GetKeyCode() == WXK_RETURN)
|
||||
{
|
||||
@ -584,10 +584,9 @@ Adding Shift does the above but starts/extends selection.
|
||||
|
||||
*/
|
||||
|
||||
bool wxRichTextCtrl::Navigate(int keyCode, int flags)
|
||||
bool wxRichTextCtrl::KeyboardNavigate(int keyCode, int flags)
|
||||
{
|
||||
bool success = false;
|
||||
Freeze();
|
||||
|
||||
if (keyCode == WXK_RIGHT)
|
||||
{
|
||||
@ -646,8 +645,6 @@ bool wxRichTextCtrl::Navigate(int keyCode, int flags)
|
||||
SetDefaultStyleToCursorStyle();
|
||||
}
|
||||
|
||||
Thaw(false);
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
|
@ -272,8 +272,16 @@ inline static void OutputString(wxOutputStream& stream, const wxString& str,
|
||||
{
|
||||
if (str.empty()) return;
|
||||
#if wxUSE_UNICODE
|
||||
const wxWX2MBbuf buf(str.mb_str(convFile ? *convFile : wxConvUTF8));
|
||||
stream.Write((const char*)buf, strlen((const char*)buf));
|
||||
if (convFile)
|
||||
{
|
||||
const wxWX2MBbuf buf(str.mb_str(*convFile));
|
||||
stream.Write((const char*)buf, strlen((const char*)buf));
|
||||
}
|
||||
else
|
||||
{
|
||||
const wxWX2MBbuf buf(str.mb_str(wxConvUTF8));
|
||||
stream.Write((const char*)buf, strlen((const char*)buf));
|
||||
}
|
||||
#else
|
||||
if ( convFile == NULL )
|
||||
stream.Write(str.mb_str(), str.Len());
|
||||
|
Loading…
Reference in New Issue
Block a user