Added PaintAboveContent function for drawing on top of text (#12176)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64735 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2010-06-25 14:05:07 +00:00
parent 658e62e493
commit 35bdbae572
3 changed files with 7 additions and 0 deletions

View File

@@ -509,6 +509,7 @@ All (GUI):
- wxRTC: corrected centring and right-justification spacing. - wxRTC: corrected centring and right-justification spacing.
- wxRTC: fixed style selection reset after editing a style. - wxRTC: fixed style selection reset after editing a style.
- wxRTC: can now edit line spacing in .1 increments from 1 to 2. - wxRTC: can now edit line spacing in .1 increments from 1 to 2.
- wxRTC: added PaintAboveContent function for drawing on top of text.
- Added wxBORDER_THEME to XRC. - Added wxBORDER_THEME to XRC.
- wxGraphicsContext is now enabled by default if supported by the platform. - wxGraphicsContext is now enabled by default if supported by the platform.
- Fix building with using system libpng 1.4 (Volker Grabsch). - Fix building with using system libpng 1.4 (Volker Grabsch).

View File

@@ -687,6 +687,9 @@ public:
/// Paint the background /// Paint the background
virtual void PaintBackground(wxDC& dc); virtual void PaintBackground(wxDC& dc);
/// Other user defined painting after everything else (i.e. all text) is painted
virtual void PaintAboveContent(wxDC& dc) {}
#if wxRICHTEXT_BUFFERED_PAINTING #if wxRICHTEXT_BUFFERED_PAINTING
/// Recreate buffer bitmap if necessary /// Recreate buffer bitmap if necessary
virtual bool RecreateBuffer(const wxSize& size = wxDefaultSize); virtual bool RecreateBuffer(const wxSize& size = wxDefaultSize);

View File

@@ -409,6 +409,9 @@ void wxRichTextCtrl::OnPaint(wxPaintEvent& WXUNUSED(event))
dc.DestroyClippingRegion(); dc.DestroyClippingRegion();
// Other user defined painting after everything else (i.e. all text) is painted
PaintAboveContent(dc);
#if wxRICHTEXT_USE_OWN_CARET #if wxRICHTEXT_USE_OWN_CARET
if (GetCaret()->IsVisible()) if (GetCaret()->IsVisible())
{ {