git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35987
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
/// Layout the buffer: which we must do before certain operations, such as
/// setting the caret position.
/// Layout the buffer: which we must do before certain operations, such as
/// setting the caret position.
- virtual bool Layout(bool onlyVisibleRect = false);
+ virtual bool LayoutContent(bool onlyVisibleRect = false);
/// Move the caret to the given character position
virtual bool MoveCaret(long pos, bool showAtLineStart = false);
/// Move the caret to the given character position
virtual bool MoveCaret(long pos, bool showAtLineStart = false);
+#if wxRICHTEXT_DERIVES_FROM_TEXTCTRLBASE
+ WX_FORWARD_TO_SCROLL_HELPER()
+#endif
+
/// Set font, and also default attributes
virtual bool SetFont(const wxFont& font);
/// Set font, and also default attributes
virtual bool SetFont(const wxFont& font);
m_ctrl->SetCaretPosition(caretPosition);
if (!m_ctrl->IsFrozen())
{
m_ctrl->SetCaretPosition(caretPosition);
if (!m_ctrl->IsFrozen())
{
+ m_ctrl->LayoutContent();
m_ctrl->PositionCaret();
m_ctrl->Refresh();
m_ctrl->PositionCaret();
m_ctrl->Refresh();
m_fullLayoutRequired = true;
m_fullLayoutTime = wxGetLocalTimeMillis();
m_fullLayoutSavedPosition = GetFirstVisiblePosition();
m_fullLayoutRequired = true;
m_fullLayoutTime = wxGetLocalTimeMillis();
m_fullLayoutSavedPosition = GetFirstVisiblePosition();
- Layout(true /* onlyVisibleRect */);
+ LayoutContent(true /* onlyVisibleRect */);
}
else
GetBuffer().Invalidate(wxRICHTEXT_ALL);
}
else
GetBuffer().Invalidate(wxRICHTEXT_ALL);
DiscardEdits();
SetInsertionPoint(0);
DiscardEdits();
SetInsertionPoint(0);
PositionCaret();
SetupScrollbars(true);
Refresh();
PositionCaret();
SetupScrollbars(true);
Refresh();
GetBuffer().CopyToClipboard(range);
DeleteSelectedContent();
GetBuffer().CopyToClipboard(range);
DeleteSelectedContent();
from, // New caret position
this);
from, // New caret position
this);
if (!IsFrozen())
Refresh();
}
if (!IsFrozen())
Refresh();
}
bool wxRichTextCtrl::MoveCaret(long pos, bool showAtLineStart)
{
if (GetBuffer().GetDirty())
bool wxRichTextCtrl::MoveCaret(long pos, bool showAtLineStart)
{
if (GetBuffer().GetDirty())
if (pos <= GetBuffer().GetRange().GetEnd())
{
if (pos <= GetBuffer().GetRange().GetEnd())
{
/// Layout the buffer: which we must do before certain operations, such as
/// setting the caret position.
/// Layout the buffer: which we must do before certain operations, such as
/// setting the caret position.
-bool wxRichTextCtrl::Layout(bool onlyVisibleRect)
+bool wxRichTextCtrl::LayoutContent(bool onlyVisibleRect)
{
if (GetBuffer().GetDirty() || onlyVisibleRect)
{
{
if (GetBuffer().GetDirty() || onlyVisibleRect)
{