Merge branch 'tipwindow'
Miscellaneous wxTipWindow enhancements, including better high DPI support. See https://github.com/wxWidgets/wxWidgets/pull/1949
This commit is contained in:
@@ -2414,6 +2414,17 @@
|
||||
# endif
|
||||
#endif /* wxUSE_PROPGRID */
|
||||
|
||||
#if wxUSE_TIPWINDOW
|
||||
# if !wxUSE_POPUPWIN
|
||||
# ifdef wxABORT_ON_CONFIG_ERROR
|
||||
# error "wxTipWindow requires wxUSE_POPUPWIN"
|
||||
# else
|
||||
# undef wxUSE_POPUPWIN
|
||||
# define wxUSE_POPUPWIN 1
|
||||
# endif
|
||||
# endif
|
||||
#endif /* wxUSE_TIPWINDOW */
|
||||
|
||||
#endif /* wxUSE_GUI */
|
||||
|
||||
#endif /* _WX_CHKCONF_H_ */
|
||||
|
@@ -14,16 +14,7 @@
|
||||
|
||||
#if wxUSE_TIPWINDOW
|
||||
|
||||
#if wxUSE_POPUPWIN
|
||||
#include "wx/popupwin.h"
|
||||
|
||||
#define wxTipWindowBase wxPopupTransientWindow
|
||||
#else
|
||||
#include "wx/frame.h"
|
||||
|
||||
#define wxTipWindowBase wxFrame
|
||||
#endif
|
||||
#include "wx/arrstr.h"
|
||||
#include "wx/popupwin.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxTipWindowView;
|
||||
|
||||
@@ -31,7 +22,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,17 +60,9 @@ 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;
|
||||
wxCoord m_heightLine;
|
||||
|
||||
wxTipWindowView *m_view;
|
||||
|
||||
wxTipWindow** m_windowPtr;
|
||||
|
Reference in New Issue
Block a user