wxWidgets/wxPython/src/_tipdlg.i
Robin Dunn a72f4631fe Update SWIG patch to output "True" ("False") in the autodoc string
when "true" ("false") is in the .i file.

Changed the .i files to use true/false to avoid collisions with any
True/False in headers that may be included.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29290 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-09-23 20:23:54 +00:00

98 lines
3.1 KiB
OpenEdge ABL

/////////////////////////////////////////////////////////////////////////////
// Name: _tipdlg.i
// Purpose: SWIG defs for wxTip classes and such
//
// Author: Robin Dunn
//
// Created: 18-June-1999
// RCS-ID: $Id$
// Copyright: (c) 2003 by Total Control Software
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
// Not a %module
//---------------------------------------------------------------------------
%newgroup
%{
#include <wx/tipdlg.h>
%}
//---------------------------------------------------------------------------
// wxTipProvider - a class which is used by wxTipDialog to get the text of the
// tips
class wxTipProvider
{
public:
// wxTipProvider(size_t currentTip); **** Abstract base class
~wxTipProvider();
// get the current tip and update the internal state to return the next tip
// when called for the next time
virtual wxString GetTip();
// get the current tip "index" (or whatever allows the tip provider to know
// from where to start the next time)
size_t GetCurrentTip();
// 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);
};
// The C++ version of wxPyTipProvider
%{
class wxPyTipProvider : public wxTipProvider {
public:
wxPyTipProvider(size_t currentTip)
: wxTipProvider(currentTip) {}
DEC_PYCALLBACK_STRING__pure(GetTip);
DEC_PYCALLBACK_STRING_STRING(PreprocessTip);
PYPRIVATE;
};
IMP_PYCALLBACK_STRING__pure( wxPyTipProvider, wxTipProvider, GetTip);
IMP_PYCALLBACK_STRING_STRING(wxPyTipProvider, wxTipProvider, PreprocessTip);
%}
// Now let SWIG know about it
class wxPyTipProvider : public wxTipProvider {
public:
%pythonAppend wxPyTipProvider "self._setCallbackInfo(self, PyTipProvider)"
wxPyTipProvider(size_t currentTip);
void _setCallbackInfo(PyObject* self, PyObject* _class);
};
// A dialog which shows a "tip" - a short and helpful messages describing to
// the user some program characteristic. Many programs show the tips at
// startup, so the dialog has "Show tips on startup" checkbox which allows to
// 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.
MustHaveApp(wxShowTip);
bool wxShowTip(wxWindow *parent, wxTipProvider *tipProvider, bool showAtStartup = true);
// a function which returns an implementation of wxTipProvider using the
// specified text file as the source of tips (each line is a tip).
%newobject wxCreateFileTipProvider;
MustHaveApp(wxCreateFileTipProvider);
wxTipProvider* wxCreateFileTipProvider(const wxString& filename, size_t currentTip);
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------