X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c89165a82daea967ec79e528fd08bf7440bbd4ec..66c2bf7b1d9326fb650acfaae22ec50528cfbf7c:/include/wx/tipdlg.h diff --git a/include/wx/tipdlg.h b/include/wx/tipdlg.h index 9b02046705..e0093855fb 100644 --- a/include/wx/tipdlg.h +++ b/include/wx/tipdlg.h @@ -1,10 +1,9 @@ /////////////////////////////////////////////////////////////////////////////// -// Name: tipdlg.h +// Name: wx/tipdlg.h // Purpose: declaration of wxTipDialog // Author: Vadim Zeitlin // Modified by: // Created: 28.06.99 -// RCS-ID: $Id$ // Copyright: (c) Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -12,10 +11,6 @@ #ifndef _WX_TIPDLG_H_ #define _WX_TIPDLG_H_ -#ifdef __GNUG__ - #pragma interface "tipdlg.h" -#endif - // ---------------------------------------------------------------------------- // headers which we must include here // ---------------------------------------------------------------------------- @@ -36,7 +31,7 @@ // 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; } @@ -49,6 +44,11 @@ public: // 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() { } @@ -60,8 +60,10 @@ protected: // 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); +#if wxUSE_TEXTFILE +WXDLLIMPEXP_ADV wxTipProvider *wxCreateFileTipProvider(const wxString& filename, + size_t currentTip); +#endif // wxUSE_TEXTFILE // ---------------------------------------------------------------------------- // wxTipDialog @@ -73,10 +75,10 @@ WXDLLEXPORT wxTipProvider *wxCreateFileTipProvider(const wxString& filename, // the user to disable this (however, it's the program which should show, or // 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); +// The function returns true if this checkbox is checked, false otherwise. +WXDLLIMPEXP_ADV bool wxShowTip(wxWindow *parent, + wxTipProvider *tipProvider, + bool showAtStartup = true); #endif // wxUSE_STARTUP_TIPS