Ensure that the correct rectangle is clipped and refreshed for the CallTip
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27721 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -67,6 +67,8 @@ void wxSTCDropTarget::OnLeave() {
|
|||||||
#define param2 -1 // wxWindow's 2nd param is ID
|
#define param2 -1 // wxWindow's 2nd param is ID
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <wx/dcbuffer.h>
|
||||||
|
|
||||||
class wxSTCCallTip : public wxSTCCallTipBase {
|
class wxSTCCallTip : public wxSTCCallTipBase {
|
||||||
public:
|
public:
|
||||||
wxSTCCallTip(wxWindow* parent, CallTip* ct, ScintillaWX* swx)
|
wxSTCCallTip(wxWindow* parent, CallTip* ct, ScintillaWX* swx)
|
||||||
@@ -76,12 +78,17 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
~wxSTCCallTip() {
|
~wxSTCCallTip() {
|
||||||
|
#if wxUSE_POPUPWIN && wxSTC_USE_POPUP && defined(__WXGTK__)
|
||||||
|
wxRect rect = GetRect();
|
||||||
|
GetParent()->ScreenToClient(&rect.x, &rect.y);
|
||||||
|
GetParent()->Refresh(false, &rect);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AcceptsFocus() const { return FALSE; }
|
bool AcceptsFocus() const { return FALSE; }
|
||||||
|
|
||||||
void OnPaint(wxPaintEvent& WXUNUSED(evt)) {
|
void OnPaint(wxPaintEvent& WXUNUSED(evt)) {
|
||||||
wxPaintDC dc(this);
|
wxBufferedPaintDC dc(this);
|
||||||
Surface* surfaceWindow = Surface::Allocate();
|
Surface* surfaceWindow = Surface::Allocate();
|
||||||
surfaceWindow->Init(&dc, m_ct->wDraw.GetID());
|
surfaceWindow->Init(&dc, m_ct->wDraw.GetID());
|
||||||
m_ct->PaintCT(surfaceWindow);
|
m_ct->PaintCT(surfaceWindow);
|
||||||
@@ -885,7 +892,11 @@ void ScintillaWX::ClipChildren(wxDC& dc, PRectangle rect) {
|
|||||||
rgn.Subtract(childRect);
|
rgn.Subtract(childRect);
|
||||||
}
|
}
|
||||||
if (ct.inCallTipMode) {
|
if (ct.inCallTipMode) {
|
||||||
wxRect childRect = ((wxWindow*)ct.wCallTip.GetID())->GetRect();
|
wxWindow* tip = (wxWindow*)ct.wCallTip.GetID();
|
||||||
|
wxRect childRect = tip->GetRect();
|
||||||
|
#if wxUSE_POPUPWIN && wxSTC_USE_POPUP
|
||||||
|
tip->GetParent()->ScreenToClient(&childRect.x, &childRect.y);
|
||||||
|
#endif
|
||||||
rgn.Subtract(childRect);
|
rgn.Subtract(childRect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -67,6 +67,8 @@ void wxSTCDropTarget::OnLeave() {
|
|||||||
#define param2 -1 // wxWindow's 2nd param is ID
|
#define param2 -1 // wxWindow's 2nd param is ID
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <wx/dcbuffer.h>
|
||||||
|
|
||||||
class wxSTCCallTip : public wxSTCCallTipBase {
|
class wxSTCCallTip : public wxSTCCallTipBase {
|
||||||
public:
|
public:
|
||||||
wxSTCCallTip(wxWindow* parent, CallTip* ct, ScintillaWX* swx)
|
wxSTCCallTip(wxWindow* parent, CallTip* ct, ScintillaWX* swx)
|
||||||
@@ -76,12 +78,17 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
~wxSTCCallTip() {
|
~wxSTCCallTip() {
|
||||||
|
#if wxUSE_POPUPWIN && wxSTC_USE_POPUP && defined(__WXGTK__)
|
||||||
|
wxRect rect = GetRect();
|
||||||
|
GetParent()->ScreenToClient(&rect.x, &rect.y);
|
||||||
|
GetParent()->Refresh(false, &rect);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AcceptsFocus() const { return FALSE; }
|
bool AcceptsFocus() const { return FALSE; }
|
||||||
|
|
||||||
void OnPaint(wxPaintEvent& WXUNUSED(evt)) {
|
void OnPaint(wxPaintEvent& WXUNUSED(evt)) {
|
||||||
wxPaintDC dc(this);
|
wxBufferedPaintDC dc(this);
|
||||||
Surface* surfaceWindow = Surface::Allocate();
|
Surface* surfaceWindow = Surface::Allocate();
|
||||||
surfaceWindow->Init(&dc, m_ct->wDraw.GetID());
|
surfaceWindow->Init(&dc, m_ct->wDraw.GetID());
|
||||||
m_ct->PaintCT(surfaceWindow);
|
m_ct->PaintCT(surfaceWindow);
|
||||||
@@ -885,7 +892,11 @@ void ScintillaWX::ClipChildren(wxDC& dc, PRectangle rect) {
|
|||||||
rgn.Subtract(childRect);
|
rgn.Subtract(childRect);
|
||||||
}
|
}
|
||||||
if (ct.inCallTipMode) {
|
if (ct.inCallTipMode) {
|
||||||
wxRect childRect = ((wxWindow*)ct.wCallTip.GetID())->GetRect();
|
wxWindow* tip = (wxWindow*)ct.wCallTip.GetID();
|
||||||
|
wxRect childRect = tip->GetRect();
|
||||||
|
#if wxUSE_POPUPWIN && wxSTC_USE_POPUP
|
||||||
|
tip->GetParent()->ScreenToClient(&childRect.x, &childRect.y);
|
||||||
|
#endif
|
||||||
rgn.Subtract(childRect);
|
rgn.Subtract(childRect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user