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