#ifndef _WX_TIPDLG_H_
#define _WX_TIPDLG_H_
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(__APPLE__)
#pragma interface "tipdlg.h"
#endif
// wxTipProvider evidently needs some internal state which is the tip "index"
// and which should be saved/restored by the program to not always show one and
// the same tip (of course, you may use random starting position as well...)
-class WXDLLEXPORT wxTipProvider
+class WXDLLIMPEXP_ADV wxTipProvider
{
public:
wxTipProvider(size_t currentTip) { m_currentTip = currentTip; }
// get the current tip and update the internal state to return the next tip
// when called for the next time
- virtual wxString GetTip() = 0;
+ virtual wxString GetTip() = 0;
// get the current tip "index" (or whatever allows the tip provider to know
// from where to start the next time)
size_t GetCurrentTip() const { return m_currentTip; }
+ // Allows any user-derived class to optionally override this function to
+ // modify the tip as soon as it is read. If return wxEmptyString, then
+ // the tip is skipped, and the next one is read.
+ virtual wxString PreprocessTip(const wxString& tip) { return tip; }
+
// virtual dtor for the base class
virtual ~wxTipProvider() { }
// specified text file as the source of tips (each line is a tip).
//
// NB: the caller is responsible for deleting the pointer!
-WXDLLEXPORT wxTipProvider *wxCreateFileTipProvider(const wxString& filename,
- size_t currentTip);
+WXDLLIMPEXP_ADV wxTipProvider *wxCreateFileTipProvider(const wxString& filename,
+ size_t currentTip);
// ----------------------------------------------------------------------------
// wxTipDialog
// not, the dialog on startup depending on its value, not this class).
//
// The function returns TRUE if this checkbox is checked, FALSE otherwise.
-WXDLLEXPORT bool wxShowTip(wxWindow *parent,
- wxTipProvider *tipProvider,
- bool showAtStartup = TRUE);
+WXDLLIMPEXP_ADV bool wxShowTip(wxWindow *parent,
+ wxTipProvider *tipProvider,
+ bool showAtStartup = TRUE);
#endif // wxUSE_STARTUP_TIPS