wxWidgets/interface/wx/tipdlg.h
Vadim Zeitlin 3f66f6a5b3 Remove all lines containing cvs/svn "$Id$" keyword.
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.

If nothing else, this will make an eventual transition to Git simpler.

Closes #14487.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-26 16:02:46 +00:00

116 lines
3.7 KiB
Objective-C

/////////////////////////////////////////////////////////////////////////////
// Name: tipdlg.h
// Purpose: interface of wxTipProvider
// Author: wxWidgets team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
/**
@class wxTipProvider
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{wxadv}
@category{misc}
@see @ref overview_tips, ::wxShowTip
*/
class wxTipProvider
{
public:
/**
Constructor.
@param currentTip
The starting tip index.
*/
wxTipProvider(size_t currentTip);
virtual ~wxTipProvider();
/**
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.
*/
size_t GetCurrentTip() const;
/**
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.
*/
virtual wxString GetTip() = 0;
/**
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.
*/
virtual wxString PreprocessTip(const wxString& tip);
};
// ============================================================================
// Global functions/macros
// ============================================================================
/** @addtogroup group_funcmacro_dialog */
//@{
/**
This function creates a wxTipProvider which may be used with wxShowTip().
@param filename
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.
@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);
//@}