Make wxUSE_TIPWINDOW dependent on wxUSE_POPUPWIN
It doesn't seem to make sense to provide wxFrame-based implementation of
wxTipWindow, if anything we should use similar code to implement
wxPopupTransientWindow itself on the platforms not providing it.
So simplify wxTipWindow code by leaving only a single implementation,
using wxPopupTransientWindow. This should have arguably been done back
in 8962e1d938
(wxTipWindow is now a wxPopupTransientWindow instead of a
wxFrame., 2001-11-30) which introduced the use of wxPopupTransientWindow
in this code.
This commit is contained in:
@@ -14,15 +14,8 @@
|
||||
|
||||
#if wxUSE_TIPWINDOW
|
||||
|
||||
#if wxUSE_POPUPWIN
|
||||
#include "wx/popupwin.h"
|
||||
#include "wx/popupwin.h"
|
||||
|
||||
#define wxTipWindowBase wxPopupTransientWindow
|
||||
#else
|
||||
#include "wx/frame.h"
|
||||
|
||||
#define wxTipWindowBase wxFrame
|
||||
#endif
|
||||
#include "wx/arrstr.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxTipWindowView;
|
||||
@@ -31,7 +24,7 @@ class WXDLLIMPEXP_FWD_CORE wxTipWindowView;
|
||||
// wxTipWindow
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxTipWindow : public wxTipWindowBase
|
||||
class WXDLLIMPEXP_CORE wxTipWindow : public wxPopupTransientWindow
|
||||
{
|
||||
public:
|
||||
// the mandatory ctor parameters are: the parent window and the text to
|
||||
@@ -69,12 +62,7 @@ protected:
|
||||
// event handlers
|
||||
void OnMouseClick(wxMouseEvent& event);
|
||||
|
||||
#if !wxUSE_POPUPWIN
|
||||
void OnActivate(wxActivateEvent& event);
|
||||
void OnKillFocus(wxFocusEvent& event);
|
||||
#else // wxUSE_POPUPWIN
|
||||
virtual void OnDismiss() wxOVERRIDE;
|
||||
#endif // wxUSE_POPUPWIN/!wxUSE_POPUPWIN
|
||||
|
||||
private:
|
||||
wxArrayString m_textLines;
|
||||
|
Reference in New Issue
Block a user