wxtipproviderthis is the class used together with wxshowtip function. it must implement gettip function and return the current tip from it (different tip each time it is called). you will never use this class yourself, but you need it to show startup tips with wxshowtip. also, if you want to get the tips text from elsewhere than a simple text file, you will want to derive a new class from wxtipprovider and use it instead of the one returned by wxcreatefiletipprovider. derived from none. include files <wx/tipdlg.h> see also startup tips overview, ::wxshowtip members
wxtipprovider::wxtipprovider
wxtipprovider::wxtipproviderwxtipprovider(size_t currenttip) constructor. currenttip
wxtipprovider::gettipwxstring gettip() return the text of the current tip and pass to the next one. this function is pure virtual, it should be implemented in the derived classes.
wxtipprovider::preprocesstipvirtual wxstring preprocesstip(const wxstring&tip) returns a modified tip. this function will be called immediately after read, and before being check whether it is a comment, an empty string or a string to translate. you can optionally override this in your custom user-derived class to optionally to modify the tip as soon as it is read. you can return any modification to the string. if you return wxemptystring, then this tip is skipped, and the next one is read.
wxcurrenttipprovider::getcurrenttipsize_t getcurrenttip() const returns the index of the current tip (i.e. the one which would be returned by gettip). the program usually remembers the value returned by this function after calling wxshowtip. note that it is not the same as the value which was passed to wxshowtip + 1 because the user might have pressed the "next" button in the tip dialog.
|