Make it easier to not use wxPopupWindow in wxSTC, and for now, don't
use it at all for the AutoComplete window. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15356 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -63,7 +63,7 @@ void wxSTCDropTarget::OnLeave() {
|
||||
#endif
|
||||
|
||||
|
||||
#if wxUSE_POPUPWIN
|
||||
#if wxUSE_POPUPWIN && wxSTC_USE_POPUP
|
||||
#include <wx/popupwin.h>
|
||||
#define wxSTCCallTipBase wxPopupWindow
|
||||
#define param2 wxBORDER_NONE // popup's 2nd param is flags
|
||||
@@ -88,7 +88,7 @@ public:
|
||||
delete surfaceWindow;
|
||||
}
|
||||
|
||||
#if wxUSE_POPUPWIN
|
||||
#if wxUSE_POPUPWIN && wxSTC_USE_POPUP
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO) {
|
||||
@@ -98,6 +98,21 @@ public:
|
||||
GetParent()->ClientToScreen(NULL, &y);
|
||||
wxSTCCallTipBase::DoSetSize(x, y, width, height, sizeFlags);
|
||||
}
|
||||
|
||||
virtual bool Show( bool show = TRUE ) {
|
||||
bool retval = wxSTCCallTipBase::Show(show);
|
||||
if (show) {
|
||||
CaptureMouse();
|
||||
}
|
||||
else {
|
||||
ReleaseMouse();
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
void OnLeftDown(wxMouseEvent& ) {
|
||||
Show(FALSE);
|
||||
}
|
||||
#endif
|
||||
|
||||
private:
|
||||
@@ -107,6 +122,9 @@ private:
|
||||
|
||||
BEGIN_EVENT_TABLE(wxSTCCallTip, wxSTCCallTipBase)
|
||||
EVT_PAINT(wxSTCCallTip::OnPaint)
|
||||
#if wxUSE_POPUPWIN && wxSTC_USE_POPUP
|
||||
EVT_LEFT_DOWN(wxSTCCallTip::OnLeftDown)
|
||||
#endif
|
||||
END_EVENT_TABLE()
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user