]>
git.saurik.com Git - wxWidgets.git/blob - docs/doxygen/overviews/tipprovider.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: topic overview
4 // Author: wxWidgets team
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
11 @page tipprovider_overview wxTipProvider
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.
27 @ref tips_overview, ::wxShowTip
29 wxTipProvider::wxTipProvider
31 wxTipProvider::PreprocessTip
32 wxCurrentTipProvider::GetCurrentTip
35 @section wxtipproviderctor wxTipProvider::wxTipProvider
37 @b @b wxTipProvider(@b size_t@e currentTip)
40 The starting tip index.
43 @section wxtipprovidergettip wxTipProvider::GetTip
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.
49 @section wxtipproviderpreprocesstip wxTipProvider::PreprocessTip
51 @b virtual #wxString @b PreProcessTip(@b const #wxString&@e tip)
52 Returns a modified tip. This function will be called immediately after read,
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
57 skipped, and the next one is read.
59 @section wxtipprovidergetcurrenttip wxCurrentTipProvider::GetCurrentTip
61 @b size_t @b GetCurrentTip() @b const
62 Returns the index of the current tip (i.e. the one which would be returned by
64 The program usually remembers the value returned by this function after calling
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.