X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/92dda0f7a31fdfeed083cd285b2900e6e9a83a0b..553aa032f2aac24b2b06bd8e38535118950976c1:/src/stc/ScintillaWX.cpp?ds=sidebyside diff --git a/src/stc/ScintillaWX.cpp b/src/stc/ScintillaWX.cpp index a324274b7c..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()); @@ -160,6 +160,7 @@ void ScintillaWX::Initialise() { dropTarget->SetScintilla(this); stc->SetDropTarget(dropTarget); #endif + vs.extraFontFlag = true; } @@ -205,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; @@ -905,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; +} + //---------------------------------------------------------------------- //----------------------------------------------------------------------