", "");
+MustHaveApp(wxActiveXWindow);
+
class wxActiveXWindow : public wxWindow
{
public:
%feature("noautodoc") wxIEHtmlWindowBase::GetText;
+MustHaveApp(wxIEHtmlWindowBase);
+
class wxIEHtmlWindowBase : public wxActiveXWindow {
public:
*/
+MustHaveApp(wxDynamicSashWindow);
+
class wxDynamicSashWindow : public wxWindow {
public:
%pythonAppend wxDynamicSashWindow "self._setOORInfo(self)"
// This class provides a composite control that lets the
// user easily enter list of strings
+MustHaveApp(wxEditableListBox);
class wxEditableListBox : public wxPanel
{
public:
typedef wxTreeCtrl wxPyTreeCtrl;
%}
+MustHaveApp(wxRemotelyScrolledTreeCtrl);
+
class wxRemotelyScrolledTreeCtrl: public wxPyTreeCtrl
{
public:
%}
+MustHaveApp(wxPyTreeCompanionWindow);
+
%name(TreeCompanionWindow) class wxPyTreeCompanionWindow: public wxWindow
{
public:
* than the usual one.
*/
+MustHaveApp(wxThinSplitterWindow);
+
class wxThinSplitterWindow: public wxSplitterWindow
{
public:
* scroll appropriately.
*/
+MustHaveApp(wxSplitterScrolledWindow);
+
class wxSplitterScrolledWindow: public wxScrolledWindow
{
public:
};
+MustHaveApp(wxLEDNumberCtrl);
+
class wxLEDNumberCtrl : public wxControl
{
public:
+MustHaveApp(wxPyTreeListCtrl);
+
%name(TreeListCtrl) class wxPyTreeListCtrl : public wxControl
{
public:
//---------------------------------------------------------------------------
+MustHaveApp(wxGLContext);
+
class wxGLContext : public wxObject {
public:
#ifndef __WXMAC__
+MustHaveApp(wxGLCanvas);
+
class wxGLCanvas : public wxWindow {
public:
%pythonAppend wxGLCanvas "self._setOORInfo(self)"
};
+MustHaveApp(wxIEHtmlWin);
+
class wxIEHtmlWin : public wxWindow /* wxActiveX */
{
public:
%}
+MustHaveApp(wxPyShapeCanvas);
+
class wxPyShapeCanvas : public wxScrolledWindow {
public:
%pythonAppend wxPyShapeCanvas "self._setOORandCallbackInfo(PyShapeCanvas)"
{
public:
- %pythonAppend wxXmlResource(const wxString& filemask, int flags) "self.InitAllHandlers()"
-
- %pythonAppend wxXmlResource(int flags) "val.InitAllHandlers()"
+ %pythonAppend wxXmlResource(const wxString& filemask, int flags) "self.InitAllHandlers()"
+ %pythonAppend wxXmlResource(int flags) "val.InitAllHandlers()"
// Ctors.
// Flags: wxXRC_USE_LOCALE
EVT_STC_POSCHANGED has been removed as it has been deprecated in
Scintilla for several releases now.
+All the Window and GDI (pen, bitmap, etc.) classes and also many
+toplevel functions will now check that a wx.App object has already
+been created and will raise a wx.PyNoAppError exception if not.
+
operation unless you first have created an app object, (even on
Windows where most anything was possible before.)
+**[Changed in 2.5.2.0]** All the Window and GDI (pen, bitmap, etc.)
+classes and also many toplevel functions will now check that a wx.App
+object has already been created and will raise a wx.PyNoAppError
+exception if not.
+
SWIG 1.3
#define wxPyInstance_Check(a) (wxPyGetCoreAPIPtr()->p_wxPyInstance_Check(a))
#define wxPySwigInstance_Check(a) (wxPyGetCoreAPIPtr()->p_wxPySwigInstance_Check(a))
+#define wxPyCheckForApp() (wxPyGetCoreAPIPtr()->p_wxPyCheckForApp())
+
//----------------------------------------------------------------------
#endif
bool wxPySimple_typecheck(PyObject* source, const wxChar* classname, int seqLen);
bool wxColour_typecheck(PyObject* source);
+bool wxPyCheckForApp();
+
template<class T>
bool wxPyTwoIntItem_helper(PyObject* source, T** obj, const wxChar* name)
{
bool (*p_wxPyInstance_Check)(PyObject* obj);
bool (*p_wxPySwigInstance_Check)(PyObject* obj);
-
+
+ bool (*p_wxPyCheckForApp)();
+
};
#ifdef wxPyUSE_EXPORTED_API
of the categories above)
");
+MustHaveApp(wxPyArtProvider);
+MustHaveApp(wxPyArtProvider::GetBitmap);
+MustHaveApp(wxPyArtProvider::GetIcon);
+
%name(ArtProvider) class wxPyArtProvider /*: public wxObject*/
{
public:
");
+MustHaveApp(wxBitmap);
+
class wxBitmap : public wxGDIObject
{
public:
`wx.MemoryDC` with a `wx.Bitmap` selected into it that contains a
mask.", "");
+MustHaveApp(wxMask);
+
class wxMask : public wxObject {
public:
:see: `wx.BrushList`, `wx.DC`, `wx.DC.SetBrush`
");
+MustHaveApp(wxBrush);
+
class wxBrush : public wxGDIObject {
public:
DocCtorStr(
:see: `wx.BitmapButton`
");
+MustHaveApp(wxButton);
+
class wxButton : public wxControl
{
public:
:see: `wx.Button`, `wx.Bitmap`
");
+MustHaveApp(wxBitmapButton);
+
class wxBitmapButton : public wxButton
{
public:
+MustHaveApp(wxCheckBox);
+
class wxCheckBox : public wxControl
{
public:
");
+MustHaveApp(wxChoice);
+
class wxChoice : public wxControlWithItems
{
public:
DocStr(wxColourDialog,
"This class represents the colour chooser dialog.", "");
+MustHaveApp(wxColourDialog);
+
class wxColourDialog : public wxDialog {
public:
%pythonAppend wxColourDialog "self._setOORInfo(self)"
==================== ==========================================
");
+MustHaveApp(wxDirDialog);
+
class wxDirDialog : public wxDialog {
public:
%pythonAppend wxDirDialog "self._setOORInfo(self)"
+MustHaveApp(wxFileDialog);
+
class wxFileDialog : public wxDialog {
public:
%pythonAppend wxFileDialog "self._setOORInfo(self)"
DocStr(wxMultiChoiceDialog,
"A simple dialog with a multi selection listbox.", "");
+MustHaveApp(wxMultiChoiceDialog);
+
class wxMultiChoiceDialog : public wxDialog
{
public:
DocStr(wxSingleChoiceDialog,
"A simple dialog with a single selection listbox.", "");
+MustHaveApp(wxSingleChoiceDialog);
+
class wxSingleChoiceDialog : public wxDialog {
public:
%pythonAppend wxSingleChoiceDialog "self._setOORInfo(self)"
DocStr(wxTextEntryDialog,
"A dialog with text control, [ok] and [cancel] buttons", "");
+MustHaveApp(wxTextEntryDialog);
+
class wxTextEntryDialog : public wxDialog {
public:
%pythonAppend wxTextEntryDialog "self._setOORInfo(self)"
:see: `wx.FontData`
", "");
+MustHaveApp(wxFontDialog);
+
class wxFontDialog : public wxDialog {
public:
%pythonAppend wxFontDialog "self._setOORInfo(self)"
");
+MustHaveApp(wxMessageDialog);
+
class wxMessageDialog : public wxDialog {
public:
%pythonAppend wxMessageDialog "self._setOORInfo(self)"
");
+MustHaveApp(wxProgressDialog);
+
class wxProgressDialog : public wxFrame {
public:
%pythonAppend wxProgressDialog "self._setOORInfo(self)"
===================== =========================================
");
+MustHaveApp(wxFindReplaceDialog);
+
class wxFindReplaceDialog : public wxDialog {
public:
%pythonAppend wxFindReplaceDialog "self._setOORInfo(self)"
+MustHaveApp(wxComboBox);
+
#ifdef __WXMSW__
class wxComboBox : public wxChoice
#else
A control is generally a small window which processes user input
and/or displays one or more item of data.", "");
+MustHaveApp(wxControl);
+
class wxControl : public wxWindow
{
public:
wxPyCBInputStream_create,
wxPyInstance_Check,
- wxPySwigInstance_Check
+ wxPySwigInstance_Check,
+
+ wxPyCheckForApp
};
:see: `wx.ContextHelpButton`
", "");
+MustHaveApp(wxContextHelp);
+
class wxContextHelp : public wxObject {
public:
DocCtorStr(
:see: `wx.ContextHelp`, `wx.ContextHelpButton`
", "");
+MustHaveApp(wxContextHelpButton);
+
class wxContextHelpButton : public wxBitmapButton {
public:
%pythonAppend wxContextHelpButton "self._setOORInfo(self)"
");
+MustHaveApp(wxCursor);
+
class wxCursor : public wxGDIObject
{
public:
//---------------------------------------------------------------------------
%newgroup
+MustHaveApp(wxMemoryDC);
+
class wxMemoryDC : public wxDC {
public:
wxMemoryDC();
%}
+MustHaveApp(wxBufferedDC);
+
class wxBufferedDC : public wxMemoryDC
{
public:
+MustHaveApp(wxBufferedPaintDC);
// Creates a double buffered wxPaintDC, optionally allowing the
// user to specify their own buffer to use.
//---------------------------------------------------------------------------
%newgroup
+MustHaveApp(wxScreenDC);
+
class wxScreenDC : public wxDC {
public:
wxScreenDC();
//---------------------------------------------------------------------------
%newgroup
+MustHaveApp(wxClientDC);
+
class wxClientDC : public wxDC {
public:
wxClientDC(wxWindow* win);
//---------------------------------------------------------------------------
%newgroup
+MustHaveApp(wxPaintDC);
+
class wxPaintDC : public wxDC {
public:
wxPaintDC(wxWindow* win);
//---------------------------------------------------------------------------
%newgroup
+MustHaveApp(wxWindowDC);
+
class wxWindowDC : public wxDC {
public:
wxWindowDC(wxWindow* win);
//---------------------------------------------------------------------------
%newgroup
+MustHaveApp(wxMirrorDC);
+
class wxMirrorDC : public wxDC
{
public:
#include <wx/dcps.h>
%}
+MustHaveApp(wxPostScriptDC);
+
class wxPostScriptDC : public wxDC {
public:
wxPostScriptDC(const wxPrintData& printData);
%newgroup
+MustHaveApp(wxMetaFile);
+MustHaveApp(wxMetaFileDC);
+
+
#if defined(__WXMSW__) || defined(__WXMAC__)
%{
//---------------------------------------------------------------------------
+MustHaveApp(wxPrinterDC);
+
#if defined(__WXMSW__) || defined(__WXMAC__)
class wxPrinterDC : public wxDC {
/////////////////////////////////////////////////////////////////////////////
+//---------------------------------------------------------------------------
// Globally turn on the autodoc feature
+
%feature("autodoc", "1"); // 0 == no param types, 1 == show param types
+//---------------------------------------------------------------------------
+// Tell SWIG to wrap all the wrappers with our thread protection by default
+
+%exception {
+ PyThreadState* __tstate = wxPyBeginAllowThreads();
+ $action
+ wxPyEndAllowThreads(__tstate);
+ if (PyErr_Occurred()) SWIG_fail;
+}
+
+
+// This one can be used to add a check for an existing wxApp before the real
+// work is done. An exception is raised if there isn't one.
+%define MustHaveApp(name)
+ %exception name {
+ if (!wxPyCheckForApp()) SWIG_fail;
+ PyThreadState* __tstate = wxPyBeginAllowThreads();
+ $action
+ wxPyEndAllowThreads(__tstate);
+ if (PyErr_Occurred()) SWIG_fail;
+ }
+%enddef
+
+
+
//---------------------------------------------------------------------------
// some type definitions to simplify things for SWIG
-// typedef int wxWindowID;
-// typedef int wxCoord;
-// typedef int wxInt32;
-// typedef unsigned int wxUint32;
typedef int wxEventType;
typedef unsigned int size_t;
typedef unsigned int time_t;
#define wxCoord int
#define wxInt32 int
#define wxUint32 unsigned int
-//#define wxEventType int
-//#define size_t unsigned int
-//#define time_t unsigned int
-//#define byte unsigned char
//----------------------------------------------------------------------
+MustHaveApp(wxGenericDirCtrl);
+
class wxGenericDirCtrl: public wxControl
{
public:
+MustHaveApp(wxDirFilterListCtrl);
+
class wxDirFilterListCtrl: public wxChoice
{
public:
+MustHaveApp(wxGenericDragImage);
+
%name (DragImage) class wxGenericDragImage : public wxObject
{
public:
%newgroup
+MustHaveApp(wxFont);
+MustHaveApp(wxFont::GetDefaultEncoding);
+MustHaveApp(wxFont::SetDefaultEncoding);
+
class wxFont : public wxGDIObject {
public:
%pythonPrepend wxFont "if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']"
%}
+MustHaveApp(wxPyFontEnumerator);
+
%name(FontEnumerator) class wxPyFontEnumerator {
public:
%pythonAppend wxPyFontEnumerator "self._setCallbackInfo(self, FontEnumerator, 0)"
void wxRegisterId(long id);
long wxGetCurrentId();
+MustHaveApp(wxBell);
void wxBell();
+
+MustHaveApp(wxEndBusyCursor);
void wxEndBusyCursor();
long wxGetElapsedTime(bool resetTimer = True);
+MustHaveApp(wxGetMousePosition);
DocDeclA(
void, wxGetMousePosition(int* OUTPUT, int* OUTPUT),
"GetMousePosition() -> (x,y)");
};
// Shutdown or reboot the PC
+MustHaveApp(wxShutdown);
bool wxShutdown(wxShutdownFlags wFlags);
// Dialog Functions
+MustHaveApp(wxFileSelector);
wxString wxFileSelector(const wxString& message = wxPyFileSelectorPromptStr,
const wxString& default_path = wxPyEmptyString,
const wxString& default_filename = wxPyEmptyString,
// Ask for filename to load
+MustHaveApp(wxLoadFileSelector);
wxString wxLoadFileSelector(const wxString& what,
const wxString& extension,
const wxString& default_name = wxPyEmptyString,
wxWindow *parent = NULL);
// Ask for filename to save
+MustHaveApp(wxSaveFileSelector);
wxString wxSaveFileSelector(const wxString& what,
const wxString& extension,
const wxString& default_name = wxPyEmptyString,
wxWindow *parent = NULL);
+MustHaveApp(wxDirSelector);
wxString wxDirSelector(const wxString& message = wxPyDirSelectorPromptStr,
const wxString& defaultPath = wxPyEmptyString,
long style = wxDD_DEFAULT_STYLE,
const wxPoint& pos = wxDefaultPosition,
wxWindow *parent = NULL);
+MustHaveApp(wxGetTextFromUser);
wxString wxGetTextFromUser(const wxString& message,
const wxString& caption = wxPyEmptyString,
const wxString& default_value = wxPyEmptyString,
int x = -1, int y = -1,
bool centre = True);
+MustHaveApp(wxGetPasswordFromUser);
wxString wxGetPasswordFromUser(const wxString& message,
const wxString& caption = wxPyEmptyString,
const wxString& default_value = wxPyEmptyString,
// bool centre = True, int width=150, int height=200);
+MustHaveApp(wxGetSingleChoice);
wxString wxGetSingleChoice(const wxString& message, const wxString& caption,
int choices, wxString* choices_array,
wxWindow *parent = NULL,
bool centre = True,
int width=150, int height=200);
+MustHaveApp(wxGetSingleChoiceIndex);
int wxGetSingleChoiceIndex(const wxString& message, const wxString& caption,
int choices, wxString* choices_array,
wxWindow *parent = NULL,
int width=150, int height=200);
+MustHaveApp(wxMessageBox);
int wxMessageBox(const wxString& message,
const wxString& caption = wxPyEmptyString,
int style = wxOK | wxCENTRE,
wxWindow *parent = NULL,
int x = -1, int y = -1);
+MustHaveApp(wxGetNumberFromUser);
long wxGetNumberFromUser(const wxString& message,
const wxString& prompt,
const wxString& caption,
// GDI Functions
+MustHaveApp(wxColourDisplay);
bool wxColourDisplay();
+MustHaveApp(wxDisplayDepth);
int wxDisplayDepth();
+
+MustHaveApp(wxGetDisplayDepth);
int wxGetDisplayDepth();
+MustHaveApp(wxDisplaySize);
DocDeclA(
void, wxDisplaySize(int* OUTPUT, int* OUTPUT),
"DisplaySize() -> (width, height)");
+
+MustHaveApp(wxGetDisplaySize);
wxSize wxGetDisplaySize();
+MustHaveApp(wxDisplaySizeMM);
DocDeclA(
void, wxDisplaySizeMM(int* OUTPUT, int* OUTPUT),
"DisplaySizeMM() -> (width, height)");
+
+MustHaveApp(wxGetDisplaySizeMM);
wxSize wxGetDisplaySizeMM();
+MustHaveApp(wxClientDisplayRect);
DocDeclA(
void, wxClientDisplayRect(int *OUTPUT, int *OUTPUT, int *OUTPUT, int *OUTPUT),
"ClientDisplayRect() -> (x, y, width, height)");
+
+MustHaveApp(wxGetClientDisplayRect);
wxRect wxGetClientDisplayRect();
+
+MustHaveApp(wxSetCursor);
void wxSetCursor(wxCursor& cursor);
// Miscellaneous functions
+MustHaveApp(wxBeginBusyCursor);
void wxBeginBusyCursor(wxCursor *cursor = wxHOURGLASS_CURSOR);
+
+MustHaveApp(wxGetActiveWindow);
wxWindow * wxGetActiveWindow();
+MustHaveApp(wxGenericFindWindowAtPoint);
wxWindow* wxGenericFindWindowAtPoint(const wxPoint& pt);
+
+MustHaveApp(wxFindWindowAtPoint);
wxWindow* wxFindWindowAtPoint(const wxPoint& pt);
+MustHaveApp(wxGetTopLevelParent);
wxWindow* wxGetTopLevelParent(wxWindow *win);
//bool wxSpawnBrowser(wxWindow *parent, wxString href);
+MustHaveApp(wxGetKeyState);
DocDeclStr(
bool , wxGetKeyState(wxKeyCode key),
"Get the state of a key (true if pressed or toggled on, false if not.)
//---------------------------------------------------------------------------
+MustHaveApp(wxWakeUpMainThread);
+
#if defined(__WXMSW__) || defined(__WXMAC__)
void wxWakeUpMainThread();
#else
%}
#endif
+
+MustHaveApp(wxMutexGuiEnter);
void wxMutexGuiEnter();
+
+MustHaveApp(wxMutexGuiLeave);
void wxMutexGuiLeave();
+MustHaveApp(wxMutexGuiLocker);
class wxMutexGuiLocker {
public:
wxMutexGuiLocker();
};
+MustHaveApp(wxThread);
%inline %{
bool wxThread_IsMain() {
#ifdef WXP_WITH_THREAD
//---------------------------------------------------------------------------
+MustHaveApp(wxGauge);
+
class wxGauge : public wxControl {
public:
%pythonAppend wxGauge "self._setOORInfo(self)"
};
+MustHaveApp(wxIntersectRect);
+
DocAStr(wxIntersectRect,
"IntersectRect(Rect r1, Rect r2) -> Rect",
"Calculate and return the intersection of r1 and r2.", "");
//---------------------------------------------------------------------------
%newgroup
+MustHaveApp(wxGDIObject);
+
class wxGDIObject : public wxObject {
public:
wxGDIObject();
//---------------------------------------------------------------------------
+MustHaveApp(wxIcon);
+
class wxIcon : public wxGDIObject
{
public:
else
return new wxImage;
}
-
+
+ MustHaveApp(wxImage(const wxBitmap &bitmap));
%name(ImageFromBitmap) wxImage(const wxBitmap &bitmap) {
return new wxImage(bitmap.ConvertToImage());
}
static wxString GetImageExtWildcard();
+MustHaveApp(ConvertToBitmap);
+MustHaveApp(ConvertToMonoBitmap);
+
%extend {
wxBitmap ConvertToBitmap() {
wxBitmap bitmap(*self);
};
+MustHaveApp(wxImageList);
+
// wxImageList is used for wxListCtrl, wxTreeCtrl. These controls refer to
// images for their items by an index into an image list.
%}
+MustHaveApp(wxJoystick);
+
class wxJoystick /* : public wxObject */
{
public:
//---------------------------------------------------------------------------
%newgroup
+MustHaveApp(wxListBox);
+
class wxListBox : public wxControlWithItems
{
public:
%newgroup
+MustHaveApp(wxCheckListBox);
+
// wxCheckListBox: a listbox whose items may be checked
class wxCheckListBox : public wxListBox
{
%{
#include <wx/listctrl.h>
-
%}
+
MAKE_CONST_WXSTRING2(ListCtrlNameStr, _T("wxListCtrl"));
//---------------------------------------------------------------------------
+MustHaveApp(wxPyListCtrl);
+
%name(ListCtrl)class wxPyListCtrl : public wxControl {
public:
%newgroup
+MustHaveApp(wxListView);
+
// wxListView: a class which provides a little better API for list control
class wxListView : public wxPyListCtrl
{
+MustHaveApp(wxMDIParentFrame);
+
class wxMDIParentFrame : public wxFrame {
public:
%pythonAppend wxMDIParentFrame "self._setOORInfo(self)"
//---------------------------------------------------------------------------
+MustHaveApp(wxMDIChildFrame);
+
class wxMDIChildFrame : public wxFrame {
public:
%pythonAppend wxMDIChildFrame "self._setOORInfo(self)"
//---------------------------------------------------------------------------
+MustHaveApp(wxMDIClientWindow);
+
class wxMDIClientWindow : public wxWindow {
public:
%pythonAppend wxMDIClientWindow "self._setOORInfo(self)"
%newgroup
+MustHaveApp(wxMenu);
+
class wxMenu : public wxEvtHandler
{
public:
//---------------------------------------------------------------------------
%newgroup
+MustHaveApp(wxMenuBar);
+
class wxMenuBar : public wxWindow
{
public:
#ifndef __WXX11__
+
+MustHaveApp(wxToolTip);
+
class wxToolTip : public wxObject {
public:
wxToolTip(const wxString &tip);
//---------------------------------------------------------------------------
+MustHaveApp(wxCaret);
+
class wxCaret {
public:
wxCaret(wxWindow* window, const wxSize& size);
//---------------------------------------------------------------------------
+MustHaveApp(wxBusyCursor);
+
class wxBusyCursor {
public:
wxBusyCursor(wxCursor* cursor = wxHOURGLASS_CURSOR);
//---------------------------------------------------------------------------
+MustHaveApp(wxWindowDisabler);
+
class wxWindowDisabler {
public:
wxWindowDisabler(wxWindow *winToSkip = NULL);
//---------------------------------------------------------------------------
+MustHaveApp(wxBusyInfo);
+
class wxBusyInfo : public wxObject {
public:
wxBusyInfo(const wxString& message);
// TODO: Virtualize this class so other book controls can be derived in Python
+MustHaveApp(wxBookCtrl);
+
// Common base class for wxList/Tree/Notebook
class wxBookCtrl : public wxControl
{
+MustHaveApp(wxNotebook);
+
class wxNotebook : public wxBookCtrl {
public:
%pythonAppend wxNotebook "self._setOORInfo(self)"
+MustHaveApp(wxListbook);
+
// wxListCtrl and wxNotebook combination
class wxListbook : public wxBookCtrl
{
//---------------------------------------------------------------------------
+MustHaveApp(wxPalette);
+
class wxPalette : public wxGDIObject {
public:
wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
%newgroup
+MustHaveApp(wxPanel);
+
class wxPanel : public wxWindow
{
public:
// derive from it and wxPanel. But what to do about wxGTK where this
// is not True?
+MustHaveApp(wxScrolledWindow);
+
class wxScrolledWindow : public wxPanel
{
public:
%newgroup
+MustHaveApp(wxPen);
+
class wxPen : public wxGDIObject {
public:
wxPen(wxColour& colour, int width=1, int style=wxSOLID);
#ifndef __WXMAC__
%newgroup;
+MustHaveApp(wxPopupWindow);
// wxPopupWindow: a special kind of top level window used for popup menus,
// combobox popups and such.
+MustHaveApp(wxPopupWindow);
+
class wxPopupWindow : public wxWindow {
public:
%pythonAppend wxPopupWindow "self._setOORInfo(self)"
%}
+MustHaveApp(wxPyPopupTransientWindow);
// wxPopupTransientWindow: a wxPopupWindow which disappears automatically
// when the user clicks mouse outside it or if it loses focus in any other way
+
%name(PopupTransientWindow) class wxPyPopupTransientWindow : public wxPopupWindow
{
public:
+MustHaveApp(wxPageSetupDialog);
+
class wxPageSetupDialog : public wxDialog {
public:
%pythonAppend wxPageSetupDialog "self._setOORInfo(self)"
};
+MustHaveApp(wxPrintDialog);
+
class wxPrintDialog : public wxDialog {
public:
%pythonAppend wxPrintDialog "self._setOORInfo(self)"
};
+MustHaveApp(wxPrinter);
+
class wxPrinter : public wxObject {
public:
wxPrinter(wxPrintDialogData* data = NULL);
%}
+MustHaveApp(wxPyPrintout);
+
// Now define the custom class for SWIGging
%name(Printout) class wxPyPrintout : public wxObject {
public:
+MustHaveApp(wxPreviewCanvas);
+
class wxPreviewCanvas: public wxScrolledWindow
{
public:
};
+MustHaveApp(wxPreviewFrame);
+
class wxPreviewFrame : public wxFrame {
public:
%pythonAppend wxPreviewFrame "self._setOORInfo(self)"
wxID_PREVIEW_GOTO
};
+MustHaveApp(wxPreviewControlBar);
+
class wxPreviewControlBar: public wxPanel
{
public:
//---------------------------------------------------------------------------
+MustHaveApp(wxPrintPreview);
+
class wxPrintPreview : public wxObject {
public:
%nokwargs wxPrintPreview;
%}
+MustHaveApp(wxPyPrintPreview);
+
class wxPyPrintPreview : public wxPrintPreview
{
public:
%}
+MustHaveApp(wxPyPreviewFrame);
+
class wxPyPreviewFrame : public wxPreviewFrame
{
public:
%}
+MustHaveApp(wxPyPreviewControlBar);
+
class wxPyPreviewControlBar : public wxPreviewControlBar
{
public:
};
+MustHaveApp(wxExecute);
+
long wxExecute(const wxString& command,
int flags = wxEXEC_ASYNC,
wxPyProcess *process = NULL);
%}
// And now the one for SWIG to see
+MustHaveApp(wxPyControl);
class wxPyControl : public wxControl
{
public:
%}
// And now the one for SWIG to see
+MustHaveApp(wxPyWindow);
class wxPyWindow : public wxWindow
{
public:
%}
// And now the one for SWIG to see
+MustHaveApp(wxPyPanel);
class wxPyPanel : public wxPanel
{
public:
%}
// And now the one for SWIG to see
+MustHaveApp(wxPyScrolledWindow);
class wxPyScrolledWindow : public wxScrolledWindow
{
public:
//---------------------------------------------------------------------------
%newgroup
+MustHaveApp(wxRadioBox);
+
class wxRadioBox : public wxControl
{
public:
//---------------------------------------------------------------------------
%newgroup
+MustHaveApp(wxRadioButton);
+
class wxRadioButton : public wxControl
{
public:
+MustHaveApp(wxRegion);
+
class wxRegion : public wxGDIObject {
public:
wxRegion(wxCoord x=0, wxCoord y=0, wxCoord width=0, wxCoord height=0);
+MustHaveApp(wxRegionIterator);
+
class wxRegionIterator : public wxObject {
public:
wxRegionIterator(const wxRegion& region);
// wxSashWindow allows any of its edges to have a sash which can be dragged
// to resize the window. The actual content window will be created as a child
// of wxSashWindow.
+MustHaveApp(wxSashWindow);
+
class wxSashWindow: public wxWindow
{
public:
// This is window that can remember alignment/orientation, does its own layout,
// and can provide sashes too. Useful for implementing docked windows with sashes in
// an IDE-style interface.
+MustHaveApp(wxSashLayoutWindow);
+
class wxSashLayoutWindow: public wxSashWindow
{
public:
//---------------------------------------------------------------------------
%newgroup
+MustHaveApp(wxScrollBar);
+
class wxScrollBar : public wxControl {
public:
%pythonAppend wxScrollBar "self._setOORInfo(self)"
//---------------------------------------------------------------------------
+MustHaveApp(wxSystemSettings::GetColour);
+MustHaveApp(wxSystemSettings::GetFont);
+MustHaveApp(wxSystemSettings::GetMetric);
+MustHaveApp(wxSystemSettings::HasFeature);
+MustHaveApp(wxSystemSettings::GetScreenType);
+MustHaveApp(wxSystemSettings::SetScreenType);
class wxSystemSettings
{
//---------------------------------------------------------------------------
%newgroup
+MustHaveApp(wxSlider);
+
class wxSlider : public wxControl {
public:
%pythonPrepend wxSlider "if kwargs.has_key('point'): kwargs['pos'] = kwargs['point'];del kwargs['point']"
+MustHaveApp(wxSound);
+MustHaveApp(wxSound::Play);
+MustHaveApp(wxSound::Stop);
+
class wxSound /*: public wxObject*/
{
public:
// wxSP_VERTICAL: vertical spin button (the default)
// wxSP_ARROW_KEYS: arrow keys increment/decrement value
// wxSP_WRAP: value wraps at either end
+MustHaveApp(wxSpinButton);
class wxSpinButton : public wxControl
{
public:
// a spin ctrl is a text control with a spin button which is usually used to
// prompt the user for a numeric input
+MustHaveApp(wxSpinCtrl);
+
class wxSpinCtrl : public wxControl
{
public:
+MustHaveApp(wxSplitterWindow);
+
class wxSplitterWindow: public wxWindow
{
public:
//---------------------------------------------------------------------------
%newgroup
+MustHaveApp(wxStaticBox);
+
class wxStaticBox : public wxControl {
public:
%pythonAppend wxStaticBox "self._setOORInfo(self)"
%newgroup
+MustHaveApp(wxStaticLine);
+
class wxStaticLine : public wxControl {
public:
%pythonAppend wxStaticLine "self._setOORInfo(self)"
//---------------------------------------------------------------------------
%newgroup
+MustHaveApp(wxStaticText);
+
class wxStaticText : public wxControl {
public:
%pythonAppend wxStaticText "self._setOORInfo(self)"
//---------------------------------------------------------------------------
%newgroup
+MustHaveApp(wxStaticBitmap);
+
class wxStaticBitmap : public wxControl {
public:
%pythonAppend wxStaticBitmap "self._setOORInfo(self)"
// wxStatusBar: a window near the bottom of the frame used for status info
+MustHaveApp(wxStatusBar);
class wxStatusBar : public wxWindow
{
public:
//---------------------------------------------------------------------------
+MustHaveApp(wxColourDatabase);
+
class wxColourDatabase : public wxObject {
public:
wxColourDatabase();
+MustHaveApp(wxTaskBarIcon);
+
class wxTaskBarIcon : public wxEvtHandler
{
public:
// wxTextCtrl: a single or multiple line text zone where user can enter and
// edit text
+MustHaveApp(wxTextCtrl);
class wxTextCtrl : public wxControl
{
public:
}
+MustHaveApp(wxToggleButton);
+
class wxToggleButton : public wxControl
{
public:
+MustHaveApp(wxPyTimer);
+
%name(Timer) class wxPyTimer : public wxEvtHandler
{
public:
// wxTimerRunner: starts the timer in its ctor, stops in the dtor
+MustHaveApp(wxTimerRunner);
class wxTimerRunner
{
public:
// 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);
%newgroup;
+MustHaveApp(wxTipWindow);
+
class wxTipWindow :
#ifndef __WXMAC__
public wxPyPopupTransientWindow
+MustHaveApp(wxToolBar);
+
class wxToolBar : public wxToolBarBase {
public:
%pythonAppend wxToolBar "self._setOORInfo(self)"
// is accounted for in client size calculations - all others should be taken
// care of manually.
+MustHaveApp(wxFrame);
+
class wxFrame : public wxTopLevelWindow {
public:
%pythonAppend wxFrame "self._setOORInfo(self)"
//---------------------------------------------------------------------------
%newgroup
+MustHaveApp(wxDialog);
+
class wxDialog : public wxTopLevelWindow {
public:
%pythonAppend wxDialog "self._setOORInfo(self)"
%newgroup
+MustHaveApp(wxMiniFrame);
+
class wxMiniFrame : public wxFrame {
public:
%pythonAppend wxMiniFrame "self._setOORInfo(self)"
};
+MustHaveApp(wxSplashScreenWindow);
+
class wxSplashScreenWindow: public wxWindow
{
public:
};
+MustHaveApp(wxSplashScreen);
+
class wxSplashScreen : public wxFrame {
public:
%pythonAppend wxSplashScreen "self._setOORInfo(self)"
+MustHaveApp(wxPyTreeCtrl);
+
%name(TreeCtrl)class wxPyTreeCtrl : public wxControl {
public:
%pythonAppend wxPyTreeCtrl "self._setOORInfo(self);self._setCallbackInfo(self, TreeCtrl)"
of the window and not its entire client area.
*/
+MustHaveApp(wxPyVScrolledWindow);
+
%name(VScrolledWindow) class wxPyVScrolledWindow : public wxPanel
{
public:
It emits the same events as wxListBox and the same event macros may be used
with it.
*/
+MustHaveApp(wxPyVListBox);
+
%name(VListBox) class wxPyVListBox : public wxPyVScrolledWindow
{
public:
// wxHtmlListBox is a listbox whose items are wxHtmlCells
+MustHaveApp(wxPyHtmlListBox);
%name(HtmlListBox) class wxPyHtmlListBox : public wxPyVListBox
{
public:
");
+MustHaveApp(wxWindow);
+MustHaveApp(wxWindow::FindFocus);
+MustHaveApp(wxWindow::GetCapture);
+MustHaveApp(wxWindow::GetClassDefaultAttributes);
class wxWindow : public wxEvtHandler
{
hierarchy. The search is recursive in both cases.", "");
+MustHaveApp(wxFindWindowById);
+MustHaveApp(wxFindWindowByName);
+MustHaveApp(wxFindWindowByLabel);
+
%inline %{
wxWindow* wxFindWindowById( long id, const wxWindow *parent = NULL ) {
return wxWindow::FindWindowById(id, parent);
");
+MustHaveApp(wxCalendarCtrl);
+
class wxCalendarCtrl : public wxControl
{
public:
+MustHaveApp(wxGrid);
+
class wxGrid : public wxScrolledWindow
{
public:
static PyObject* wxPython_dict = NULL;
static PyObject* wxPyAssertionError = NULL;
+static PyObject* wxPyNoAppError = NULL;
PyObject* wxPyPtrTypeMap = NULL;
return NULL;
if (!PyDict_Check(wxPython_dict)) {
- PyErr_SetString(PyExc_TypeError, "_wxPySetDictionary must have dictionary object!");
+ PyErr_SetString(PyExc_TypeError,
+ "_wxPySetDictionary must have dictionary object!");
return NULL;
}
PyExc_AssertionError, NULL);
PyDict_SetItemString(wxPython_dict, "PyAssertionError", wxPyAssertionError);
+ // Create an exception object to use when the app object hasn't been created yet
+ wxPyNoAppError = PyErr_NewException("wx._core.PyNoAppError",
+ PyExc_RuntimeError, NULL);
+ PyDict_SetItemString(wxPython_dict, "PyNoAppError", wxPyNoAppError);
+
+
#ifdef __WXMOTIF__
#define wxPlatform "__WXMOTIF__"
_AddInfoString("gtk1");
#endif
#endif
-
+#ifdef __WXDEBUG__
+ _AddInfoString("wx-assertions-on");
+#else
+ _AddInfoString("wx-assertions-off");
+#endif
+
#undef _AddInfoString
PyObject* PlatInfoTuple = PyList_AsTuple(PlatInfo);
//---------------------------------------------------------------------------
+// Check for existence of a wxApp, setting an exception if there isn't one.
+// This doesn't need to aquire the GIL because it should only be called from
+// an %exception before the lock is released.
+
+bool wxPyCheckForApp() {
+ if (wxTheApp != NULL)
+ return true;
+ else {
+ PyErr_SetString(wxPyNoAppError, "The wx.App object must be created first!");
+ return false;
+ }
+}
+
+//---------------------------------------------------------------------------
+
+
void wxPyClientData_dtor(wxPyClientData* self) {
if (! wxPyDoingCleanup) { // Don't do it during cleanup as Python
// may have already garbage collected the object...
+MustHaveApp(wxPyHtmlWindow);
+
%name(HtmlWindow) class wxPyHtmlWindow : public wxScrolledWindow {
public:
%pythonAppend wxPyHtmlWindow "self._setCallbackInfo(self, HtmlWindow); self._setOORInfo(self)"
%newgroup
+MustHaveApp(wxHtmlDCRenderer);
+
class wxHtmlDCRenderer : public wxObject {
public:
wxHtmlDCRenderer();
};
+MustHaveApp(wxHtmlPrintout);
+
class wxHtmlPrintout : public wxPyPrintout {
public:
wxHtmlPrintout(const wxString& title = wxPyHtmlPrintoutTitleStr);
+MustHaveApp(wxHtmlEasyPrinting);
+
class wxHtmlEasyPrinting : public wxObject {
public:
wxHtmlEasyPrinting(const wxString& name = wxPyHtmlPrintingTitleStr,
//---------------------------------------------------------------------------
+MustHaveApp(wxHtmlHelpFrame);
+
class wxHtmlHelpFrame : public wxFrame {
public:
%pythonAppend wxHtmlHelpFrame "self._setOORInfo(self)"
};
+MustHaveApp(wxHtmlHelpController);
+
class wxHtmlHelpController : public wxEvtHandler {
public:
%pythonAppend wxHtmlHelpController "self._setOORInfo(self)"
%{
#include "wx/wxPython/wxPython.h"
#include "wx/wxPython/pyclasses.h"
-#include "wx/wxPython/pyistream.h"
-
+#include "wx/wxPython/pyistream.h"
%}
//---------------------------------------------------------------------------
/////////////////////////////////////////////////////////////////////////////
-//---------------------------------------------------------------------------
-// Tell SWIG to wrap all the wrappers with our thread protection
-
-%exception {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- $action
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
-}
-
-
//----------------------------------------------------------------------
// Typemaps to convert a list of items to an int (size) and an array
//
// Other than GetNext/Prev() functions, wxWizardPage is just a panel and may be
// used as such (i.e. controls may be placed directly on it &c).
+MustHaveApp(wxWizardPage);
class wxWizardPage : public wxPanel
{
public:
+MustHaveApp(wxPyWizardPage);
+
class wxPyWizardPage : public wxWizardPage {
public:
// OTOH, it is also possible to dynamicly decide which page to return (i.e.
// depending on the user's choices) as the wizard sample shows - in order to do
// this, you must derive from wxWizardPage directly.
+MustHaveApp(wxWizardPageSimple);
class wxWizardPageSimple : public wxWizardPage
{
public:
//----------------------------------------------------------------------
+MustHaveApp(wxWizard);
+
class wxWizard : public wxDialog
{
public: