wxWidgets: wxTipProvider Class Reference

| Version: 3.0.5

Public Member Functions | List of all members
wxTipProvider Class Referenceabstract
Class List by Category » Miscellaneous

`#include </home/Hamish/wxwidgets/wxWidgets3.0-3.0.5.1-1.src/wxWidgets3.0-3.0.5.1-1.i686/src/wxWidgets-3.0.5.1/interface/wx/tipdlg.h>`

## Detailed Description

This is the class used together with wxShowTip() function.

It must implement wxTipProvider::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().

##

Library: wxAdvanced

<>< =''>:</>&;&;< =''>\ </></>

See also
  wxTipProvider Overview, wxShowTip

## Public Member Functions
| wxTipProvider (size_t currentTip)
| Constructor. More...
virtual | ~wxTipProvider ()
size_t | GetCurrentTip () const
| Returns the index of the current tip (i.e. the one which would be returned by GetTip()). More...
virtual wxString | GetTip ()=0
| Return the text of the current tip and pass to the next one. More...
virtual wxString | PreprocessTip (const wxString &tip)
| Returns a modified tip. More...

## Constructor & Destructor Documentation

## ◆ wxTipProvider()

wxTipProvider::wxTipProvider | ( | size_t | currentTip | ) |

Constructor.

Parameters

  currentTip | The starting tip index.

## ◆ ~wxTipProvider()

virtual wxTipProvider::~wxTipProvider | ( |  | ) |
| virtual

## Member Function Documentation

## ◆ GetCurrentTip()

size_t wxTipProvider::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.

## ◆ GetTip()

virtual wxString wxTipProvider::GetTip | ( |  | ) |
| pure virtual

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.

## ◆ PreprocessTip()

virtual wxString wxTipProvider::PreprocessTip | ( | const wxString & | tip | ) |
| virtual

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.