DocDeclStr(
void, SetAppName(const wxString& name),
"Set the application name. This value may be used automatically\n"
- "by wxConfig and such.");
+ "by wx.Config and such.");
DocDeclStr(
wxString, GetClassName() const,
DocDeclStr(
void, SetVendorName(const wxString& name),
"Set the application's vendor name. This value may be used automatically\n"
- "by wxConfig and such.");
+ "by wx.Config and such.");
DocDeclStr(
"Create the app traits object to which we delegate for everything which either\n"
"should be configurable by the user (then he can change the default behaviour\n"
"simply by overriding CreateTraits() and returning his own traits object) or\n"
- "which is GUI/console dependent as then wxAppTraits allows us to abstract the\n"
+ "which is GUI/console dependent as then wx.AppTraits allows us to abstract the\n"
"differences behind the common facade");
DocDeclStr(
virtual void, ProcessPendingEvents(),
- "Process all events in the wxPendingEvents list -- it is necessary to call this\n"
+ "Process all events in the Pending Events list -- it is necessary to call this\n"
"function to process posted events. This happens during each event loop\n"
"iteration.");
"Set the OnAssert behaviour for debug and hybrid builds. The following flags\n"
"may be or'd together:\n"
"\n"
- " wxPYAPP_ASSERT_SUPPRESS Don't do anything\n"
- " wxPYAPP_ASSERT_EXCEPTION Turn it into a Python exception if possible (default)\n"
- " wxPYAPP_ASSERT_DIALOG Display a message dialog\n"
- " wxPYAPP_ASSERT_LOG Write the assertion info to the wxLog\n");
+ " wx.PYAPP_ASSERT_SUPPRESS Don't do anything\n"
+ " wx.PYAPP_ASSERT_EXCEPTION Turn it into a Python exception if possible (default)\n"
+ " wx.PYAPP_ASSERT_DIALOG Display a message dialog\n"
+ " wx.PYAPP_ASSERT_LOG Write the assertion info to the wx.Log\n");
DocDeclStr(
int, GetAssertMode(),
DocStr(wxGetApp,
- "Return a reference to the current wxApp object.");
+ "Return a reference to the current wx.App object.");
%inline %{
wxPyApp* wxGetApp() {
return (wxPyApp*)wxTheApp;
def CreateOutputWindow(self, st):
self.frame = wx.Frame(self.parent, -1, self.title,
style=wx.DEFAULT_FRAME_STYLE | wx.NO_FULL_REPAINT_ON_RESIZE)
- self.text = wxTextCtrl(self.frame, -1, "",
- style = wx.TE_MULTILINE | wx.TE_READONLY)
+ self.text = wx.TextCtrl(self.frame, -1, "",
+ style = wx.TE_MULTILINE | wx.TE_READONLY)
self.frame.SetSize((450, 300))
self.frame.Show(True)
EVT_CLOSE(self.frame, self.OnCloseWindow)
wx.App.__init__(self, 0)
def OnInit(self):
- self.frame = wxFrame(None, -1, "Widget Tester", pos=(0,0), size=self.size)
+ self.frame = wx.Frame(None, -1, "Widget Tester", pos=(0,0), size=self.size)
self.SetTopWindow(self.frame)
return True
%rename(Object) wxObject;
%rename(BITMAP_TYPE_INVALID) wxBITMAP_TYPE_INVALID;
%rename(BITMAP_TYPE_BMP) wxBITMAP_TYPE_BMP;
-%rename(BITMAP_TYPE_BMP_RESOURCE) wxBITMAP_TYPE_BMP_RESOURCE;
-%rename(BITMAP_TYPE_RESOURCE) wxBITMAP_TYPE_RESOURCE;
%rename(BITMAP_TYPE_ICO) wxBITMAP_TYPE_ICO;
-%rename(BITMAP_TYPE_ICO_RESOURCE) wxBITMAP_TYPE_ICO_RESOURCE;
%rename(BITMAP_TYPE_CUR) wxBITMAP_TYPE_CUR;
-%rename(BITMAP_TYPE_CUR_RESOURCE) wxBITMAP_TYPE_CUR_RESOURCE;
%rename(BITMAP_TYPE_XBM) wxBITMAP_TYPE_XBM;
%rename(BITMAP_TYPE_XBM_DATA) wxBITMAP_TYPE_XBM_DATA;
%rename(BITMAP_TYPE_XPM) wxBITMAP_TYPE_XPM;
%rename(BITMAP_TYPE_XPM_DATA) wxBITMAP_TYPE_XPM_DATA;
%rename(BITMAP_TYPE_TIF) wxBITMAP_TYPE_TIF;
-%rename(BITMAP_TYPE_TIF_RESOURCE) wxBITMAP_TYPE_TIF_RESOURCE;
%rename(BITMAP_TYPE_GIF) wxBITMAP_TYPE_GIF;
-%rename(BITMAP_TYPE_GIF_RESOURCE) wxBITMAP_TYPE_GIF_RESOURCE;
%rename(BITMAP_TYPE_PNG) wxBITMAP_TYPE_PNG;
-%rename(BITMAP_TYPE_PNG_RESOURCE) wxBITMAP_TYPE_PNG_RESOURCE;
%rename(BITMAP_TYPE_JPEG) wxBITMAP_TYPE_JPEG;
-%rename(BITMAP_TYPE_JPEG_RESOURCE) wxBITMAP_TYPE_JPEG_RESOURCE;
%rename(BITMAP_TYPE_PNM) wxBITMAP_TYPE_PNM;
-%rename(BITMAP_TYPE_PNM_RESOURCE) wxBITMAP_TYPE_PNM_RESOURCE;
%rename(BITMAP_TYPE_PCX) wxBITMAP_TYPE_PCX;
-%rename(BITMAP_TYPE_PCX_RESOURCE) wxBITMAP_TYPE_PCX_RESOURCE;
%rename(BITMAP_TYPE_PICT) wxBITMAP_TYPE_PICT;
-%rename(BITMAP_TYPE_PICT_RESOURCE) wxBITMAP_TYPE_PICT_RESOURCE;
%rename(BITMAP_TYPE_ICON) wxBITMAP_TYPE_ICON;
-%rename(BITMAP_TYPE_ICON_RESOURCE) wxBITMAP_TYPE_ICON_RESOURCE;
%rename(BITMAP_TYPE_ANI) wxBITMAP_TYPE_ANI;
%rename(BITMAP_TYPE_IFF) wxBITMAP_TYPE_IFF;
%rename(BITMAP_TYPE_MACCURSOR) wxBITMAP_TYPE_MACCURSOR;
-%rename(BITMAP_TYPE_MACCURSOR_RESOURCE) wxBITMAP_TYPE_MACCURSOR_RESOURCE;
%rename(BITMAP_TYPE_ANY) wxBITMAP_TYPE_ANY;
%rename(CURSOR_NONE) wxCURSOR_NONE;
%rename(CURSOR_ARROW) wxCURSOR_ARROW;
}
%enddef
+//---------------------------------------------------------------------------
+// Forward declarations and %renames for some classes, so the autodoc strings
+// will be able to use the right types even when the real class declaration is
+// not in the module being processed.
+
+#ifdef BUILDING_RENAMERS
+ #define FORWARD_DECLARE(wxName, Name)
+#else
+ %define FORWARD_DECLARE(wxName, Name)
+ %rename(Name) wxName;
+ class wxName;
+ %enddef
+#endif
+
+FORWARD_DECLARE(wxString, String);
+FORWARD_DECLARE(wxBitmap, Bitmap);
+FORWARD_DECLARE(wxDateTime, DateTime);
+FORWARD_DECLARE(wxInputStream, InputStream);
+FORWARD_DECLARE(wxDC, DC);
+FORWARD_DECLARE(wxCursor, Cursor);
+FORWARD_DECLARE(wxRegion, Region);
+FORWARD_DECLARE(wxColour, Colour);
+FORWARD_DECLARE(wxFont, Font);
+FORWARD_DECLARE(wxCaret, Caret);
+FORWARD_DECLARE(wxToolTip, ToolTip);
+FORWARD_DECLARE(wxPyDropTarget, PyDropTarget);
+
//---------------------------------------------------------------------------
// General numeric #define's and etc. Making them all enums makes SWIG use the
wxITEM_MAX
};
+
enum wxHitTest
{
wxHT_NOWHERE,
wxUPDATE_UI_PROCESS_SPECIFIED
};
+
+
class wxUpdateUIEvent : public wxCommandEvent
{
public:
wxIDLE_PROCESS_SPECIFIED
};
+
class wxIdleEvent : public wxEvent
{
public:
{
wxBITMAP_TYPE_INVALID, // should be == 0 for compatibility!
wxBITMAP_TYPE_BMP,
- wxBITMAP_TYPE_BMP_RESOURCE,
- wxBITMAP_TYPE_RESOURCE = wxBITMAP_TYPE_BMP_RESOURCE,
wxBITMAP_TYPE_ICO,
- wxBITMAP_TYPE_ICO_RESOURCE,
wxBITMAP_TYPE_CUR,
- wxBITMAP_TYPE_CUR_RESOURCE,
wxBITMAP_TYPE_XBM,
wxBITMAP_TYPE_XBM_DATA,
wxBITMAP_TYPE_XPM,
wxBITMAP_TYPE_XPM_DATA,
wxBITMAP_TYPE_TIF,
- wxBITMAP_TYPE_TIF_RESOURCE,
wxBITMAP_TYPE_GIF,
- wxBITMAP_TYPE_GIF_RESOURCE,
wxBITMAP_TYPE_PNG,
- wxBITMAP_TYPE_PNG_RESOURCE,
wxBITMAP_TYPE_JPEG,
- wxBITMAP_TYPE_JPEG_RESOURCE,
wxBITMAP_TYPE_PNM,
- wxBITMAP_TYPE_PNM_RESOURCE,
wxBITMAP_TYPE_PCX,
- wxBITMAP_TYPE_PCX_RESOURCE,
wxBITMAP_TYPE_PICT,
- wxBITMAP_TYPE_PICT_RESOURCE,
wxBITMAP_TYPE_ICON,
- wxBITMAP_TYPE_ICON_RESOURCE,
wxBITMAP_TYPE_ANI,
wxBITMAP_TYPE_IFF,
wxBITMAP_TYPE_MACCURSOR,
- wxBITMAP_TYPE_MACCURSOR_RESOURCE,
+
+// wxBITMAP_TYPE_BMP_RESOURCE,
+// wxBITMAP_TYPE_RESOURCE = wxBITMAP_TYPE_BMP_RESOURCE,
+// wxBITMAP_TYPE_ICO_RESOURCE,
+// wxBITMAP_TYPE_CUR_RESOURCE,
+// wxBITMAP_TYPE_TIF_RESOURCE,
+// wxBITMAP_TYPE_GIF_RESOURCE,
+// wxBITMAP_TYPE_PNG_RESOURCE,
+// wxBITMAP_TYPE_JPEG_RESOURCE,
+// wxBITMAP_TYPE_PNM_RESOURCE,
+// wxBITMAP_TYPE_PCX_RESOURCE,
+// wxBITMAP_TYPE_PICT_RESOURCE,
+// wxBITMAP_TYPE_ICON_RESOURCE,
+// wxBITMAP_TYPE_MACCURSOR_RESOURCE,
+
wxBITMAP_TYPE_ANY = 50
};
};
-
%name(InputStream) class wxPyInputStream {
public:
%extend {
DocDeclAStr(
void, GetTextExtent(const wxString& string, int *OUTPUT, int *OUTPUT),
- "GetTextExtent(wxString string) -> (width, height)",
+ "GetTextExtent(String string) -> (width, height)",
"Get the width and height of the text using the current font.");
DocDeclAStrName(
void, GetTextExtent(const wxString& string,
int *OUTPUT, int *OUTPUT, int *OUTPUT, int* OUTPUT,
const wxFont* font = NULL),
- "GetFullTextExtent(wxString string, Font font=None) ->\n (width, height, descent, externalLeading)",
+ "GetFullTextExtent(String string, Font font=None) ->\n (width, height, descent, externalLeading)",
"Get the width, height, decent and leading of the text using the current or specified font.",
GetFullTextExtent);
#endif
-//---------------------------------------------------------------------------
-%{
- DECLARE_DEF_STRING(EmptyString);
-// DECLARE_DEF_STRING(PanelNameStr);
-%}
//---------------------------------------------------------------------------
// Include all the files that make up the core module
// wxObject, functions and other base stuff
%include _defs.i
+
+MAKE_CONST_WXSTRING(EmptyString);
+
%include _obj.i
%include _gdicmn.i
%include _streams.i