]> git.saurik.com Git - wxWidgets.git/commitdiff
autodoc docstring fixes and such
authorRobin Dunn <robin@alldunn.com>
Fri, 19 Dec 2003 04:45:35 +0000 (04:45 +0000)
committerRobin Dunn <robin@alldunn.com>
Fri, 19 Dec 2003 04:45:35 +0000 (04:45 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24923 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/src/_app.i
wxPython/src/_app_ex.py
wxPython/src/_core_rename.i
wxPython/src/_defs.i
wxPython/src/_event.i
wxPython/src/_gdicmn.i
wxPython/src/_streams.i
wxPython/src/_window.i
wxPython/src/core.i

index 299cb97ffc63711de205ebe83a121c65c18dca5a..e2efaa1c1a5aaebcc1bc1344d49e1362c79f2e51 100644 (file)
@@ -66,7 +66,7 @@ public:
     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,
@@ -82,7 +82,7 @@ public:
     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(
@@ -90,13 +90,13 @@ public:
         "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.");
 
@@ -222,10 +222,10 @@ public:
         "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(),
@@ -312,7 +312,7 @@ DocStr(wxApp_CleanUp,
 
 
 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;
index 492f91a93f8c61a3732ce5f1f0ed9124f6b8b209..b843af61916f1b664ade5be61df6d13b7d096ba5 100644 (file)
@@ -21,8 +21,8 @@ class PyOnDemandOutputWindow:
     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)
@@ -180,7 +180,7 @@ class PyWidgetTester(wx.App):
         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
 
index 4b0a245fa21f48a71c4491089682f860c0c6a6af..6d93a6256219161d1fa70df88fec2d9cc823701a 100644 (file)
 %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;
index 85d6a8049aef9ed92f715b8ca9b9a7e01937fb48..66bd52763741ff0517a9d3fc83f80960417bdb4c 100644 (file)
@@ -195,6 +195,33 @@ typedef unsigned char   byte;
 }
 %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
@@ -833,6 +860,7 @@ enum wxItemKind
     wxITEM_MAX
 };
 
+
 enum wxHitTest
 {
     wxHT_NOWHERE,
index f75e41cd95c58177c40975c165ba405d0db85f44..f59a2332ce2259deb8c607701ff7740d6d6b8356 100644 (file)
@@ -991,6 +991,8 @@ enum wxUpdateUIMode
     wxUPDATE_UI_PROCESS_SPECIFIED
 };
 
+
+
 class wxUpdateUIEvent : public wxCommandEvent
 {
 public:
@@ -1184,6 +1186,7 @@ enum wxIdleMode
     wxIDLE_PROCESS_SPECIFIED
 };
 
+
 class wxIdleEvent : public wxEvent
 {
 public:
index 059343e1c297495044b246ebb1724a57457a6003..10e869f0381d2cb213d4fb62c4918e51368c0bf6 100644 (file)
@@ -21,36 +21,38 @@ enum wxBitmapType
 {
     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
 };
 
index 59ff7d7d4ae8795595b072385c85f1a2c5ac0bfc..df85f9914e957cd8df9db2340c001403a0eb3cd9 100644 (file)
@@ -68,7 +68,6 @@ enum wxSeekMode
 };
 
 
-
 %name(InputStream) class wxPyInputStream {
 public:
     %extend {
index 6bd8cd52646dd8d8215fa936e5eb844e286cafbe..9dec8acb3583f0ac207871a32893fa5109605850 100644 (file)
@@ -546,13 +546,13 @@ public:
 
     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);
 
index a41427188ffec0bf0543c8a3aefdbc76633ed30b..be891ef234d4af9e0e02cbc041d74f44b8ab3759 100644 (file)
@@ -44,18 +44,16 @@ wx = _sys.modules[__name__]
 
 #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