Added ForceDelayedLayout
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67566 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -203,11 +203,11 @@ public:
|
|||||||
virtual void GetSelection(long* from, long* to) const;
|
virtual void GetSelection(long* from, long* to) const;
|
||||||
|
|
||||||
virtual wxString GetStringSelection() const;
|
virtual wxString GetStringSelection() const;
|
||||||
|
|
||||||
const wxRichTextSelection& GetSelection() const { return m_selection; }
|
const wxRichTextSelection& GetSelection() const { return m_selection; }
|
||||||
wxRichTextSelection& GetSelection() { return m_selection; }
|
wxRichTextSelection& GetSelection() { return m_selection; }
|
||||||
void SetSelection(const wxRichTextSelection& sel) { m_selection = sel; }
|
void SetSelection(const wxRichTextSelection& sel) { m_selection = sel; }
|
||||||
|
|
||||||
|
|
||||||
/// Get filename
|
/// Get filename
|
||||||
wxString GetFilename() const { return m_filename; }
|
wxString GetFilename() const { return m_filename; }
|
||||||
@@ -221,6 +221,18 @@ public:
|
|||||||
/// Get the threshold in character positions for doing layout optimization during sizing
|
/// Get the threshold in character positions for doing layout optimization during sizing
|
||||||
long GetDelayedLayoutThreshold() const { return m_delayedLayoutThreshold; }
|
long GetDelayedLayoutThreshold() const { return m_delayedLayoutThreshold; }
|
||||||
|
|
||||||
|
bool GetFullLayoutRequired() const { return m_fullLayoutRequired; }
|
||||||
|
void SetFullLayoutRequired(bool b) { m_fullLayoutRequired = b; }
|
||||||
|
|
||||||
|
wxLongLong GetFullLayoutTime() const { return m_fullLayoutTime; }
|
||||||
|
void SetFullLayoutTime(wxLongLong t) { m_fullLayoutTime = t; }
|
||||||
|
|
||||||
|
long GetFullLayoutSavedPosition() const { return m_fullLayoutSavedPosition; }
|
||||||
|
void SetFullLayoutSavedPosition(long p) { m_fullLayoutSavedPosition = p; }
|
||||||
|
|
||||||
|
// Force any pending layout due to large buffer
|
||||||
|
void ForceDelayedLayout();
|
||||||
|
|
||||||
/// Set text cursor
|
/// Set text cursor
|
||||||
void SetTextCursor(const wxCursor& cursor ) { m_textCursor = cursor; }
|
void SetTextCursor(const wxCursor& cursor ) { m_textCursor = cursor; }
|
||||||
|
|
||||||
@@ -269,7 +281,7 @@ public:
|
|||||||
const wxRichTextContextMenuPropertiesInfo& GetContextMenuPropertiesInfo() const { return m_contextMenuPropertiesInfo; }
|
const wxRichTextContextMenuPropertiesInfo& GetContextMenuPropertiesInfo() const { return m_contextMenuPropertiesInfo; }
|
||||||
|
|
||||||
/// The wxRichTextObject object that currently has the editing focus
|
/// The wxRichTextObject object that currently has the editing focus
|
||||||
wxRichTextParagraphLayoutBox* GetFocusObject() const { return m_focusObject; }
|
wxRichTextParagraphLayoutBox* GetFocusObject() const { return m_focusObject; }
|
||||||
bool SetFocusObject(wxRichTextParagraphLayoutBox* obj, bool setCaretPosition = true);
|
bool SetFocusObject(wxRichTextParagraphLayoutBox* obj, bool setCaretPosition = true);
|
||||||
|
|
||||||
// Operations
|
// Operations
|
||||||
@@ -990,7 +1002,7 @@ private:
|
|||||||
|
|
||||||
/// Selection range in character positions. -2, -2 means no selection.
|
/// Selection range in character positions. -2, -2 means no selection.
|
||||||
wxRichTextSelection m_selection;
|
wxRichTextSelection m_selection;
|
||||||
|
|
||||||
wxRichTextCtrlSelectionState m_selectionState;
|
wxRichTextCtrlSelectionState m_selectionState;
|
||||||
|
|
||||||
/// Anchor so we know how to extend the selection
|
/// Anchor so we know how to extend the selection
|
||||||
@@ -1026,7 +1038,7 @@ private:
|
|||||||
wxCursor m_urlCursor;
|
wxCursor m_urlCursor;
|
||||||
|
|
||||||
static wxArrayString sm_availableFontNames;
|
static wxArrayString sm_availableFontNames;
|
||||||
|
|
||||||
wxRichTextContextMenuPropertiesInfo m_contextMenuPropertiesInfo;
|
wxRichTextContextMenuPropertiesInfo m_contextMenuPropertiesInfo;
|
||||||
|
|
||||||
/// The object that currently has the editing focus
|
/// The object that currently has the editing focus
|
||||||
|
@@ -2204,6 +2204,19 @@ void wxRichTextCtrl::OnSize(wxSizeEvent& event)
|
|||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Force any pending layout due to large buffer
|
||||||
|
void wxRichTextCtrl::ForceDelayedLayout()
|
||||||
|
{
|
||||||
|
if (m_fullLayoutRequired)
|
||||||
|
{
|
||||||
|
m_fullLayoutRequired = false;
|
||||||
|
m_fullLayoutTime = 0;
|
||||||
|
GetBuffer().Invalidate(wxRICHTEXT_ALL);
|
||||||
|
ShowPosition(m_fullLayoutSavedPosition);
|
||||||
|
Refresh(false);
|
||||||
|
Update();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Idle-time processing
|
/// Idle-time processing
|
||||||
void wxRichTextCtrl::OnIdle(wxIdleEvent& event)
|
void wxRichTextCtrl::OnIdle(wxIdleEvent& event)
|
||||||
|
Reference in New Issue
Block a user