X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/328f5751e8a06727b137189fe04891a9f43bfc8b..3201a1046ba71ba8e5ef2ed694fde34d12f743f3:/interface/tipdlg.h?ds=inline diff --git a/interface/tipdlg.h b/interface/tipdlg.h index e82a2fbd8b..4b68bf8fb6 100644 --- a/interface/tipdlg.h +++ b/interface/tipdlg.h @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: tipdlg.h -// Purpose: documentation for wxTipProvider class +// Purpose: interface of wxTipProvider // Author: wxWidgets team // RCS-ID: $Id$ // Licence: wxWindows license @@ -10,27 +10,26 @@ @class wxTipProvider @wxheader{tipdlg.h} - This is the class used together with wxShowTip function. + 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. + use it instead of the one returned by wxCreateFileTipProvider(). @library{wxadv} @category{FIXME} - @seealso - @ref overview_tipsoverview "Startup tips overview", ::wxShowTip + @see @ref overview_tipsoverview "Startup tips overview", ::wxShowTip */ class wxTipProvider { public: /** Constructor. - + @param currentTip The starting tip index. */ @@ -40,7 +39,7 @@ public: 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 + 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. */ @@ -65,22 +64,51 @@ public: }; + // ============================================================================ // Global functions/macros // ============================================================================ +/** @ingroup group_funcmacro_dialog */ +//@{ + /** - This function creates a wxTipProvider which may be - used with wxShowTip. + This function creates a wxTipProvider which may be used with wxShowTip(). @param filename - The name of the file containing the tips, one per line + The name of the file containing the tips, one per line. @param currentTip - The index of the first tip to show - normally this index - is remembered between the 2 program runs. + The index of the first tip to show. Normally this index is remembered + between the 2 program runs. - @see @ref overview_tipsoverview "Tips overview" + @see @ref overview_tips + + @header{wx/tipdlg.h} */ wxTipProvider* wxCreateFileTipProvider(const wxString& filename, size_t currentTip); +/** + This function shows a "startup tip" to the user. The return value is the + state of the "Show tips at startup" checkbox. + + @param parent + The parent window for the modal dialog. + @param tipProvider + An object which is used to get the text of the tips. It may be created + with the wxCreateFileTipProvider() function. + @param showAtStartup + Should be true if startup tips are shown, false otherwise. This is + used as the initial value for "Show tips at startup" checkbox which is + shown in the tips dialog. + + @see @ref overview_tips + + @header{wx/tipdlg.h} +*/ +bool wxShowTip(wxWindow *parent, + wxTipProvider *tipProvider, + bool showAtStartup = true); + +//@} +