Added further API for intercepting deletion and content insertion
Added simple implementation of locked objects to sample git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70465 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -3524,6 +3524,14 @@ bool wxRichTextParagraphLayoutBox::HasParagraphAttributes(const wxRichTextRange&
|
||||
return foundCount == matchingCount && foundCount != 0;
|
||||
}
|
||||
|
||||
void wxRichTextParagraphLayoutBox::PrepareContent(wxRichTextParagraphLayoutBox& container)
|
||||
{
|
||||
wxRichTextBuffer* buffer = GetBuffer();
|
||||
if (buffer && buffer->GetRichTextCtrl())
|
||||
buffer->GetRichTextCtrl()->PrepareContent(container);
|
||||
}
|
||||
|
||||
|
||||
/// Set character or paragraph properties
|
||||
bool wxRichTextParagraphLayoutBox::SetProperties(const wxRichTextRange& range, const wxRichTextProperties& properties, int flags)
|
||||
{
|
||||
@@ -3697,6 +3705,8 @@ void wxRichTextParagraphLayoutBox::Reset()
|
||||
|
||||
AddParagraph(wxEmptyString);
|
||||
|
||||
PrepareContent(*this);
|
||||
|
||||
InvalidateHierarchy(wxRICHTEXT_ALL);
|
||||
}
|
||||
|
||||
@@ -7201,6 +7211,9 @@ bool wxRichTextBuffer::EndBatchUndo()
|
||||
/// Submit immediately, or delay according to whether collapsing is on
|
||||
bool wxRichTextBuffer::SubmitAction(wxRichTextAction* action)
|
||||
{
|
||||
if (action && !action->GetNewParagraphs().IsEmpty())
|
||||
PrepareContent(action->GetNewParagraphs());
|
||||
|
||||
if (BatchingUndo() && m_batchedCommand && !SuppressingUndo())
|
||||
{
|
||||
wxRichTextCommand* cmd = new wxRichTextCommand(action->GetName());
|
||||
|
Reference in New Issue
Block a user