X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8e54aaedb5329a49ffd9c5d50071f9c8cdd5c59e..553aa032f2aac24b2b06bd8e38535118950976c1:/src/stc/ScintillaWX.cpp diff --git a/src/stc/ScintillaWX.cpp b/src/stc/ScintillaWX.cpp index eaa1600208..f1ebd65117 100644 --- a/src/stc/ScintillaWX.cpp +++ b/src/stc/ScintillaWX.cpp @@ -85,7 +85,7 @@ public: bool AcceptsFocus() const { return FALSE; } - void OnPaint(wxPaintEvent& evt) { + void OnPaint(wxPaintEvent& WXUNUSED(evt)) { wxPaintDC dc(this); Surface* surfaceWindow = Surface::Allocate(); surfaceWindow->Init(&dc, m_ct->wDraw.GetID()); @@ -146,6 +146,7 @@ ScintillaWX::ScintillaWX(wxStyledTextCtrl* win) { ScintillaWX::~ScintillaWX() { + Finalise(); } //---------------------------------------------------------------------- @@ -159,6 +160,7 @@ void ScintillaWX::Initialise() { dropTarget->SetScintilla(this); stc->SetDropTarget(dropTarget); #endif + vs.extraFontFlag = true; } @@ -204,9 +206,11 @@ bool ScintillaWX::SetIdle(bool on) { if (idler.state != on) { // connect or disconnect the EVT_IDLE handler if (on) - stc->Connect(-1, wxEVT_IDLE, (wxObjectEventFunction)&wxStyledTextCtrl::OnIdle); + stc->Connect(-1, wxEVT_IDLE, + (wxObjectEventFunction) (wxEventFunction) (wxIdleEventFunction) &wxStyledTextCtrl::OnIdle); else - stc->Disconnect(-1, wxEVT_IDLE, (wxObjectEventFunction)&wxStyledTextCtrl::OnIdle); + stc->Disconnect(-1, wxEVT_IDLE, + (wxObjectEventFunction) (wxEventFunction) (wxIdleEventFunction) &wxStyledTextCtrl::OnIdle); idler.state = on; } return idler.state; @@ -904,5 +908,15 @@ void ScintillaWX::ClipChildren(wxDC& WXUNUSED(dc), PRectangle WXUNUSED(rect)) { } #endif + +void ScintillaWX::SetUseAntiAliasing(bool useAA) { + vs.extraFontFlag = useAA; + InvalidateStyleRedraw(); +} + +bool ScintillaWX::GetUseAntiAliasing() { + return vs.extraFontFlag; +} + //---------------------------------------------------------------------- //----------------------------------------------------------------------