]>
Commit | Line | Data |
---|---|---|
15b6757b FM |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: tipprovider | |
3 | // Purpose: topic overview | |
4 | // Author: wxWidgets team | |
5 | // RCS-ID: $Id$ | |
6 | // Licence: wxWindows license | |
7 | ///////////////////////////////////////////////////////////////////////////// | |
8 | ||
9 | /*! | |
36c9828f | 10 | |
15b6757b | 11 | @page tipprovider_overview wxTipProvider |
36c9828f | 12 | |
15b6757b FM |
13 | This is the class used together with #wxShowTip function. |
14 | It must implement #GetTip function and return the | |
15 | current tip from it (different tip each time it is called). | |
16 | You will never use this class yourself, but you need it to show startup tips | |
17 | with wxShowTip. Also, if you want to get the tips text from elsewhere than a | |
18 | simple text file, you will want to derive a new class from wxTipProvider and | |
19 | use it instead of the one returned by #wxCreateFileTipProvider. | |
20 | @b Derived from | |
21 | None. | |
22 | @b Include files | |
23 | wx/tipdlg.h | |
24 | @b Library | |
25 | #wxAdv | |
26 | @b See also | |
27 | @ref tips_overview, ::wxShowTip | |
28 | @b Members | |
29 | wxTipProvider::wxTipProvider | |
30 | wxTipProvider::GetTip | |
31 | wxTipProvider::PreprocessTip | |
32 | wxCurrentTipProvider::GetCurrentTip | |
36c9828f FM |
33 | |
34 | ||
15b6757b | 35 | @section wxtipproviderctor wxTipProvider::wxTipProvider |
36c9828f | 36 | |
15b6757b FM |
37 | @b @b wxTipProvider(@b size_t@e currentTip) |
38 | Constructor. | |
39 | @e currentTip | |
40 | The starting tip index. | |
36c9828f FM |
41 | |
42 | ||
15b6757b | 43 | @section wxtipprovidergettip wxTipProvider::GetTip |
36c9828f | 44 | |
15b6757b FM |
45 | @b #wxString @b GetTip() |
46 | Return the text of the current tip and pass to the next one. This function is | |
47 | pure virtual, it should be implemented in the derived classes. | |
36c9828f | 48 | |
15b6757b | 49 | @section wxtipproviderpreprocesstip wxTipProvider::PreprocessTip |
36c9828f | 50 | |
15b6757b FM |
51 | @b virtual #wxString @b PreProcessTip(@b const #wxString&@e tip) |
52 | Returns a modified tip. This function will be called immediately after read, | |
36c9828f FM |
53 | and before being check whether it is a comment, an empty string or a string |
54 | to translate. You can optionally override this in your custom user-derived class | |
55 | to optionally to modify the tip as soon as it is read. You can return any | |
56 | modification to the string. If you return wxEmptyString, then this tip is | |
15b6757b | 57 | skipped, and the next one is read. |
36c9828f | 58 | |
15b6757b | 59 | @section wxtipprovidergetcurrenttip wxCurrentTipProvider::GetCurrentTip |
36c9828f | 60 | |
15b6757b | 61 | @b size_t @b GetCurrentTip() @b const |
36c9828f | 62 | Returns the index of the current tip (i.e. the one which would be returned by |
15b6757b | 63 | GetTip). |
36c9828f | 64 | The program usually remembers the value returned by this function after calling |
15b6757b FM |
65 | #wxShowTip. Note that it is not the same as the value which |
66 | was passed to wxShowTip + 1 because the user might have pressed the "Next" | |
67 | button in the tip dialog. | |
36c9828f | 68 | |
15b6757b | 69 | */ |
36c9828f FM |
70 | |
71 |