]> git.saurik.com Git - wxWidgets.git/blob - include/wx/generic/private/richtooltip.h
Add wxActivateEvent::GetActivationReason().
[wxWidgets.git] / include / wx / generic / private / richtooltip.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/generic/private/richtooltip.h
3 // Purpose: wxRichToolTipGenericImpl declaration.
4 // Author: Vadim Zeitlin
5 // Created: 2011-10-18
6 // Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
7 // Licence: wxWindows licence
8 ///////////////////////////////////////////////////////////////////////////////
9
10 #ifndef _WX_GENERIC_PRIVATE_RICHTOOLTIP_H_
11 #define _WX_GENERIC_PRIVATE_RICHTOOLTIP_H_
12
13 #include "wx/icon.h"
14 #include "wx/colour.h"
15
16 // ----------------------------------------------------------------------------
17 // wxRichToolTipGenericImpl: defines generic wxRichToolTip implementation.
18 // ----------------------------------------------------------------------------
19
20 class wxRichToolTipGenericImpl : public wxRichToolTipImpl
21 {
22 public:
23 wxRichToolTipGenericImpl(const wxString& title, const wxString& message) :
24 m_title(title),
25 m_message(message)
26 {
27 m_tipKind = wxTipKind_Auto;
28
29 // This is pretty arbitrary, we could follow MSW and use some multiple
30 // of double-click time here.
31 m_timeout = 5000;
32 m_delay = 0;
33 }
34
35 virtual void SetBackgroundColour(const wxColour& col,
36 const wxColour& colEnd);
37 virtual void SetCustomIcon(const wxIcon& icon);
38 virtual void SetStandardIcon(int icon);
39 virtual void SetTimeout(unsigned milliseconds,
40 unsigned millisecondsDelay = 0);
41 virtual void SetTipKind(wxTipKind tipKind);
42 virtual void SetTitleFont(const wxFont& font);
43
44 virtual void ShowFor(wxWindow* win, const wxRect* rect = NULL);
45
46 protected:
47 wxString m_title,
48 m_message;
49
50 private:
51 wxIcon m_icon;
52
53 wxColour m_colStart,
54 m_colEnd;
55
56 unsigned m_timeout,
57 m_delay;
58
59 wxTipKind m_tipKind;
60
61 wxFont m_titleFont;
62 };
63
64 #endif // _WX_GENERIC_PRIVATE_RICHTOOLTIP_H_