From d07d2bc9d05408c58b76c53a0a291915b88e5064 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 12 May 2004 00:17:48 +0000 Subject: [PATCH] Some docstring additions, reformats and epydoc markup. Removed RefDoc macros, instead made all the normal Docstring macros take an extra parameter to be used for the optional details postion of the docstring. The intent is that the docstrings put in the generated .py files checked in to CVS and delivered in releases will be only a paragraph or two, but when used for generating the epydoc reference docs they can optionally contain a lot more details. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27216 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/config.py | 10 + wxPython/docs/bin/simplify.py | 3 - wxPython/src/_accel.i | 24 +- wxPython/src/_app.i | 87 ++-- wxPython/src/_app_ex.py | 2 +- wxPython/src/_artprov.i | 12 +- wxPython/src/_bitmap.i | 59 ++- wxPython/src/_brush.i | 20 +- wxPython/src/_button.i | 39 +- wxPython/src/_checkbox.i | 24 +- wxPython/src/_choice.i | 16 +- wxPython/src/_clipbrd.i | 28 +- wxPython/src/_cmndlgs.i | 308 +++++++------- wxPython/src/_colour.i | 78 ++-- wxPython/src/_combobox.i | 110 ++--- wxPython/src/_config.i | 189 ++++----- wxPython/src/_constraints.i | 172 ++++---- wxPython/src/_control.i | 104 ++--- wxPython/src/_cshelp.i | 191 ++++----- wxPython/src/_cursor.i | 87 ++-- wxPython/src/_dataobj.i | 74 ++-- wxPython/src/_datetime.i | 2 +- wxPython/src/_dc.i | 18 +- wxPython/src/_defs.i | 201 ++++++--- wxPython/src/_dirctrl.i | 8 +- wxPython/src/_display.i | 68 ++- wxPython/src/_event.i | 5 +- wxPython/src/_gbsizer.i | 4 +- wxPython/src/_gdicmn.i | 167 ++++---- wxPython/src/_image.i | 14 +- wxPython/src/_listctrl.i | 4 +- wxPython/src/_notebook.i | 3 +- wxPython/src/_obj.i | 6 +- wxPython/src/_panel.i | 8 +- wxPython/src/_splitter.i | 272 ++++++------ wxPython/src/_textctrl.i | 7 +- wxPython/src/_treectrl.i | 8 +- wxPython/src/_window.i | 750 +++++++++++++++++----------------- wxPython/src/calendar.i | 69 ++-- wxPython/src/grid.i | 9 +- wxPython/src/html.i | 2 +- 41 files changed, 1691 insertions(+), 1571 deletions(-) diff --git a/wxPython/config.py b/wxPython/config.py index f981ddbfe1..ee8414f476 100644 --- a/wxPython/config.py +++ b/wxPython/config.py @@ -101,6 +101,11 @@ SWIG = "swig" # The swig executable to use. BUILD_RENAMERS = 1 # Should we build the renamer modules too? +FULL_DOCS = 0 # Some docstrings are split into a basic docstring and a + # details string. Setting this flag to 1 will + # cause the two strings to be combined and output + # as the full docstring. + UNICODE = 0 # This will pass the 'wxUSE_UNICODE' flag to SWIG and # will ensure that the right headers are found and the # right libs are linked. @@ -211,6 +216,7 @@ for flag in ['BUILD_GLCANVAS', 'BUILD_OGL', 'BUILD_STC', 'BUILD_XRC', 'BUILD_GIZMOS', 'BUILD_DLLWIDGET', 'BUILD_IEWIN', 'BUILD_ACTIVEX', 'CORE_ONLY', 'PREP_ONLY', 'USE_SWIG', 'UNICODE', 'UNDEF_NDEBUG', 'NO_SCRIPTS', 'NO_HEADERS', 'BUILD_RENAMERS', + 'FULL_DOCS', 'FINAL', 'HYBRID', ]: for x in range(len(sys.argv)): if sys.argv[x].find(flag) == 0: @@ -741,6 +747,10 @@ swig_args = ['-c++', if UNICODE: swig_args.append('-DwxUSE_UNICODE') +if FULL_DOCS: + swig_args.append('-D_DO_FULL_DOCS') + + swig_deps = [ 'src/my_typemaps.i', 'src/common.swg', 'src/pyrun.swg', diff --git a/wxPython/docs/bin/simplify.py b/wxPython/docs/bin/simplify.py index 152642e7b6..882717097e 100755 --- a/wxPython/docs/bin/simplify.py +++ b/wxPython/docs/bin/simplify.py @@ -246,13 +246,10 @@ def doDocStrings(parentNode, srcNode): autodoc = getAttr(srcNode, "python_autodoc") docstr = getAttr(srcNode, "feature_docstring") - refdoc = getAttr(srcNode, "feature_refdoc") if autodoc: parentNode.addChild(makeDocElement("autodoc", autodoc)) if docstr: parentNode.addChild(makeDocElement("docstring", docstr)) - if refdoc: - parentNode.addChild(makeDocElement("refdoc", refdoc)) diff --git a/wxPython/src/_accel.i b/wxPython/src/_accel.i index 40eade94d6..a047466d29 100644 --- a/wxPython/src/_accel.i +++ b/wxPython/src/_accel.i @@ -36,19 +36,19 @@ programs can choose to use wx.AcceleratorEntry objects, but using a list of 3-tuple of integers (flags, keyCode, cmdID) usually works just as well. See `__init__` for details of the tuple values. -:see: `wx.AcceleratorTable`"); +:see: `wx.AcceleratorTable`", ""); class wxAcceleratorEntry { public: DocCtorStr( wxAcceleratorEntry(int flags = 0, int keyCode = 0, int cmdID = 0/*, wxMenuItem *menuitem = NULL*/), - "Construct a wx.AcceleratorEntry. - - :param flags: A bitmask of wx.ACCEL_ALT, wx.ACCEL_SHIFT, + "Construct a wx.AcceleratorEntry.", + " + :param flags: A bitmask of wx.ACCEL_ALT, wx.ACCEL_SHIFT, wx.ACCEL_CTRL or wx.ACCEL_NORMAL used to specify which modifier keys are held down. - :param keyCode: The keycode to be detected - :param cmdID: The menu or control command ID to use for the + :param keyCode: The keycode to be detected + :param cmdID: The menu or control command ID to use for the accellerator event. "); ~wxAcceleratorEntry(); @@ -56,7 +56,7 @@ public: DocDeclStr( void , Set(int flags, int keyCode, int cmd/*, wxMenuItem *menuItem = NULL*/), "(Re)set the attributes of a wx.AcceleratorEntry. -:see `__init__`"); +:see `__init__`", ""); // void SetMenuItem(wxMenuItem *item); @@ -64,15 +64,15 @@ public: DocDeclStr( int , GetFlags(), - "Get the AcceleratorEntry's flags."); + "Get the AcceleratorEntry's flags.", ""); DocDeclStr( int , GetKeyCode(), - "Get the AcceleratorEntry's keycode."); + "Get the AcceleratorEntry's keycode.", ""); DocDeclStr( int , GetCommand(), - "Get the AcceleratorEntry's command ID."); + "Get the AcceleratorEntry's command ID.", ""); }; @@ -83,7 +83,7 @@ DocStr(wxAcceleratorTable, "An accelerator table allows the application to specify a table of keyboard shortcuts for menus or other commands. On Windows, menu or button commands are supported; on GTK, only menu commands are -supported. +supported.", " The object ``wx.NullAcceleratorTable`` is defined to be a table with no data, and is the initial accelerator table for a window. @@ -113,7 +113,7 @@ public: "Construct an AcceleratorTable from a list of `wx.AcceleratorEntry` items or or of 3-tuples (flags, keyCode, cmdID) -:see: `wx.AcceleratorEntry`"); +:see: `wx.AcceleratorEntry`", ""); wxAcceleratorTable(int n, const wxAcceleratorEntry* entries); ~wxAcceleratorTable(); diff --git a/wxPython/src/_app.i b/wxPython/src/_app.i index b5f9b7fbe1..d28c88992c 100644 --- a/wxPython/src/_app.i +++ b/wxPython/src/_app.i @@ -42,7 +42,7 @@ enum DocStr(wxPyApp, "The ``wx.PyApp`` class is an *implementation detail*, please use the -`wx.App` class (or some other derived class) instead."); +`wx.App` class (or some other derived class) instead.", ""); class wxPyApp : public wxEvtHandler { public: @@ -52,7 +52,7 @@ public: self._setOORInfo(self)"; DocStr(wxPyApp, - "Create a new application object, starting the bootstrap process."); + "Create a new application object, starting the bootstrap process.", ""); %extend { wxPyApp() { wxPythonApp = new wxPyApp(); @@ -67,27 +67,27 @@ public: DocDeclStr( wxString, GetAppName() const, - "Get the application name."); + "Get the application name.", ""); DocDeclStr( void, SetAppName(const wxString& name), "Set the application name. This value may be used automatically by -`wx.Config` and such."); +`wx.Config` and such.", ""); DocDeclStr( wxString, GetClassName() const, - "Get the application's class name."); + "Get the application's class name.", ""); DocDeclStr( void, SetClassName(const wxString& name), "Set the application's class name. This value may be used for -X-resources if applicable for the platform"); +X-resources if applicable for the platform", ""); DocDeclStr( const wxString&, GetVendorName() const, - "Get the application's vendor name."); + "Get the application's vendor name.", ""); DocDeclStr( void, SetVendorName(const wxString& name), "Set the application's vendor name. This value may be used -automatically by `wx.Config` and such."); +automatically by `wx.Config` and such.", ""); DocDeclStr( @@ -99,14 +99,14 @@ CreateTraits() and returning his own traits object) or which is GUI/console dependent as then wx.AppTraits allows us to abstract the differences behind the common facade. -:todo: Add support for overriding CreateAppTraits in wxPython."); +:todo: Add support for overriding CreateAppTraits in wxPython.", ""); DocDeclStr( virtual void, ProcessPendingEvents(), "Process all events in the Pending Events list -- it is necessary to call this function to process posted events. This normally happens -during each event loop iteration."); +during each event loop iteration.", ""); DocDeclStr( @@ -116,75 +116,76 @@ until return to the event loop. It is an error to call ``Yield`` recursively unless the value of ``onlyIfNeeded`` is True. :warning: This function is dangerous as it can lead to unexpected - reentrancies (i.e. when called from an event handler it may - result in calling the same event handler again), use with - _extreme_ care or, better, don't use at all! + reentrancies (i.e. when called from an event handler it may + result in calling the same event handler again), use with + extreme care or, better, don't use at all! -:see: `wx.Yield`, `wx.YieldIfNeeded`, `wx.SafeYield`"); +:see: `wx.Yield`, `wx.YieldIfNeeded`, `wx.SafeYield` +", ""); DocDeclStr( virtual void, WakeUpIdle(), "Make sure that idle events are sent again. -:see: `wx.WakeUpIdle`"); +:see: `wx.WakeUpIdle`", ""); DocDeclStr( virtual int, MainLoop(), "Execute the main GUI loop, the function doesn't normally return until -all top level windows have been closed and destroyed."); +all top level windows have been closed and destroyed.", ""); DocDeclStr( virtual void, Exit(), "Exit the main loop thus terminating the application. -:see: `wx.Exit`"); +:see: `wx.Exit`", ""); DocDeclStr( virtual void, ExitMainLoop(), "Exit the main GUI loop during the next iteration of the main -loop, (i.e. it does not stop the program immediately!)"); +loop, (i.e. it does not stop the program immediately!)", ""); DocDeclStr( virtual bool, Pending(), - "Returns True if there are unprocessed events in the event queue."); + "Returns True if there are unprocessed events in the event queue.", ""); DocDeclStr( virtual bool, Dispatch(), "Process the first event in the event queue (blocks until an event -appears if there are none currently)"); +appears if there are none currently)", ""); DocDeclStr( virtual bool, ProcessIdle(), "Called from the MainLoop when the application becomes idle (there are no pending events) and sends a `wx.IdleEvent` to all interested -parties. Returns True if more idle events are needed, False if not."); +parties. Returns True if more idle events are needed, False if not.", ""); DocDeclStr( virtual bool, SendIdleEvents(wxWindow* win, wxIdleEvent& event), "Send idle event to window and all subwindows. Returns True if more -idle time is requested."); +idle time is requested.", ""); DocDeclStr( virtual bool, IsActive() const, - "Return True if our app has focus."); + "Return True if our app has focus.", ""); DocDeclStr( void, SetTopWindow(wxWindow *win), - "Set the *main* top level window"); + "Set the *main* top level window", ""); DocDeclStr( virtual wxWindow*, GetTopWindow() const, "Return the *main* top level window (if it hadn't been set previously with SetTopWindow(), will return just some top level window and, if -there not any, will return None)"); +there not any, will return None)", ""); DocDeclStr( @@ -193,12 +194,12 @@ there not any, will return None)"); loop (and so, usually, terminate) when the last top-level program window is deleted. Beware that if you disable this behaviour (with SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop() -explicitly from somewhere."); +explicitly from somewhere.", ""); DocDeclStr( bool, GetExitOnFrameDelete() const, - "Get the current exit behaviour setting."); + "Get the current exit behaviour setting.", ""); #if 0 // Get display mode that is in use. This is only used in framebuffer @@ -215,11 +216,11 @@ explicitly from somewhere."); DocDeclStr( void, SetUseBestVisual( bool flag ), "Set whether the app should try to use the best available visual on -systems where more than one is available, (Sun, SGI, XFree86 4, etc.)"); +systems where more than one is available, (Sun, SGI, XFree86 4, etc.)", ""); DocDeclStr( bool, GetUseBestVisual() const, - "Get current UseBestVisual setting."); + "Get current UseBestVisual setting.", ""); // set/get printing mode: see wxPRINT_XXX constants. @@ -232,8 +233,8 @@ systems where more than one is available, (Sun, SGI, XFree86 4, etc.)"); DocDeclStr( void, SetAssertMode(int mode), - "Set the OnAssert behaviour for debug and hybrid builds. The following -flags may be or'd together: + "Set the OnAssert behaviour for debug and hybrid builds.", + "The following flags may be or'd together: ========================= ======================================= wx.PYAPP_ASSERT_SUPPRESS Don't do anything @@ -247,7 +248,7 @@ flags may be or'd together: DocDeclStr( int, GetAssertMode(), - "Get the current OnAssert behaviour setting."); + "Get the current OnAssert behaviour setting.", ""); static bool GetMacSupportPCMenuShortcuts(); @@ -265,11 +266,11 @@ flags may be or'd together: DocDeclStr( void, _BootstrapApp(), - "For internal use only"); + "For internal use only", ""); DocStr(GetComCtl32Version, "Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if -it wasn't found at all. Raises an exception on non-Windows platforms."); +it wasn't found at all. Raises an exception on non-Windows platforms.", ""); #ifdef __WXMSW__ static int GetComCtl32Version(); #else @@ -288,16 +289,16 @@ it wasn't found at all. Raises an exception on non-Windows platforms."); DocDeclStr( void, wxExit(), - "Force an exit of the application. Convenience for wx.GetApp().Exit()"); + "Force an exit of the application. Convenience for wx.GetApp().Exit()", ""); DocDeclStr( bool, wxYield(), - "Yield to other apps/messages. Convenience for wx.GetApp().Yield()"); + "Yield to other apps/messages. Convenience for wx.GetApp().Yield()", ""); DocDeclStr( bool, wxYieldIfNeeded(), - "Yield to other apps/messages. Convenience for wx.GetApp().Yield(True)"); + "Yield to other apps/messages. Convenience for wx.GetApp().Yield(True)", ""); DocDeclStr( @@ -308,24 +309,24 @@ re-enables it again afterwards. If ``win`` is not None, this window will remain enabled, allowing the implementation of some limited user interaction. -:Returns: the result of the call to `wx.Yield`."); +:Returns: the result of the call to `wx.Yield`.", ""); DocDeclStr( void, wxWakeUpIdle(), "Cause the message queue to become empty again, so idle events will be -sent."); +sent.", ""); DocDeclStr( void, wxPostEvent(wxEvtHandler *dest, wxEvent& event), "Send an event to a window or other wx.EvtHandler to be processed -later."); +later.", ""); DocStr(wxApp_CleanUp, - "For internal use only, it is used to cleanup after wxWindows when -Python shuts down."); + "For internal use only, it is used to cleanup after wxWidgets when +Python shuts down.", ""); %inline %{ void wxApp_CleanUp() { __wxPyCleanup(); @@ -334,7 +335,7 @@ Python shuts down."); DocStr(wxGetApp, - "Return a reference to the current wx.App object."); + "Return a reference to the current wx.App object.", ""); %inline %{ wxPyApp* wxGetApp() { return (wxPyApp*)wxTheApp; diff --git a/wxPython/src/_app_ex.py b/wxPython/src/_app_ex.py index 5ea24fb4e8..ed611bb1f7 100644 --- a/wxPython/src/_app_ex.py +++ b/wxPython/src/_app_ex.py @@ -86,7 +86,7 @@ class App(wx.PyApp): ``self.SetTopWindow(frame)``. :see: `wx.PySimpleApp` for a simpler app class that can be used - directly. + directly. """ outputWindowClass = PyOnDemandOutputWindow diff --git a/wxPython/src/_artprov.i b/wxPython/src/_artprov.i index e8f19c9eb6..0f1511589a 100644 --- a/wxPython/src/_artprov.i +++ b/wxPython/src/_artprov.i @@ -122,7 +122,7 @@ method and register the provider with wx.ArtProvider.PushProvider:: def CreateBitmap(self, artid, client, size): ... return bmp - +", " Identifying art resources ------------------------- @@ -197,18 +197,18 @@ public: DocDeclStr( static void , PushProvider(wxPyArtProvider *provider), - "Add new provider to the top of providers stack."); + "Add new provider to the top of providers stack.", ""); DocDeclStr( static bool , PopProvider(), - "Remove latest added provider and delete it."); + "Remove latest added provider and delete it.", ""); DocDeclStr( static bool , RemoveProvider(wxPyArtProvider *provider), "Remove provider. The provider must have been added previously! The -provider is _not_ deleted."); +provider is _not_ deleted.", ""); DocDeclStr( @@ -216,7 +216,7 @@ provider is _not_ deleted."); const wxString& client = wxPyART_OTHER, const wxSize& size = wxDefaultSize), "Query the providers for bitmap with given ID and return it. Return -wx.NullBitmap if no provider provides it."); +wx.NullBitmap if no provider provides it.", ""); DocDeclStr( @@ -224,7 +224,7 @@ wx.NullBitmap if no provider provides it."); const wxString& client = wxPyART_OTHER, const wxSize& size = wxDefaultSize), "Query the providers for icon with given ID and return it. Return -wx.NullIcon if no provider provides it."); +wx.NullIcon if no provider provides it.", ""); %extend { void Destroy() { delete self; }} diff --git a/wxPython/src/_bitmap.i b/wxPython/src/_bitmap.i index 2b4aaca596..241c9ceada 100644 --- a/wxPython/src/_bitmap.i +++ b/wxPython/src/_bitmap.i @@ -49,7 +49,7 @@ bitmap. It can be either monochrome or colour, and either loaded from a file or created dynamically. A bitmap can be selected into a memory device context (instance of `wx.MemoryDC`). This enables the bitmap to be copied to a window or memory device context using `wx.DC.Blit`, or -to be used as a drawing surface. +to be used as a drawing surface.", " The BMP and XMP image file formats are supported on all platforms by wx.Bitmap. Other formats are automatically loaded by `wx.Image` and @@ -70,12 +70,12 @@ class wxBitmap : public wxGDIObject public: DocCtorStr( wxBitmap(const wxString& name, wxBitmapType type=wxBITMAP_TYPE_ANY), - "Loads a bitmap from a file. - -:param name: Name of the file to load the bitmap from. -:param type: The type of image to expect. Can be one of the following - constants (assuming that the neccessary `wx.Image` handlers are - loaded): + "Loads a bitmap from a file.", + " + :param name: Name of the file to load the bitmap from. + :param type: The type of image to expect. Can be one of the following + constants (assuming that the neccessary `wx.Image` handlers are + loaded): * wx.BITMAP_TYPE_ANY * wx.BITMAP_TYPE_BMP @@ -105,12 +105,12 @@ public: wxBitmap(int width, int height, int depth=-1), "Creates a new bitmap of the given size. A depth of -1 indicates the depth of the current screen or visual. Some platforms only support 1 -for monochrome and -1 for the current colour setting.", +for monochrome and -1 for the current colour setting.", "", EmptyBitmap); DocCtorStrName( wxBitmap(const wxIcon& icon), - "Create a new bitmap from a `wx.Icon` object.", + "Create a new bitmap from a `wx.Icon` object.", "", BitmapFromIcon); DocCtorStrName( @@ -119,13 +119,13 @@ for monochrome and -1 for the current colour setting.", actually display a `wx.Image` as you cannot draw an image directly on a window. The resulting bitmap will use the provided colour depth (or that of the current screen colour depth if depth is -1) which entails -that a colour reduction may have to take place.", +that a colour reduction may have to take place.", "", BitmapFromImage); %extend { DocStr(wxBitmap(PyObject* listOfStrings), - "Construct a Bitmap from a list of strings formatted as XPM data."); + "Construct a Bitmap from a list of strings formatted as XPM data.", ""); %name(BitmapFromXPMData) wxBitmap(PyObject* listOfStrings) { char** cArray = NULL; wxBitmap* bmp; @@ -142,7 +142,7 @@ that a colour reduction may have to take place.", "Creates a bitmap from an array of bits. You should only use this function for monochrome bitmaps (depth 1) in portable programs: in this case the bits parameter should contain an XBM image. For other -bit depths, the behaviour is platform dependent."); +bit depths, the behaviour is platform dependent.", ""); %name(BitmapFromBits) wxBitmap(PyObject* bits, int width, int height, int depth=1 ) { char* buf; int length; @@ -168,23 +168,23 @@ bit depths, the behaviour is platform dependent."); DocDeclStr( int , GetWidth(), - "Gets the width of the bitmap in pixels."); + "Gets the width of the bitmap in pixels.", ""); DocDeclStr( int , GetHeight(), - "Gets the height of the bitmap in pixels."); + "Gets the height of the bitmap in pixels.", ""); DocDeclStr( int , GetDepth(), "Gets the colour depth of the bitmap. A value of 1 indicates a -monochrome bitmap."); +monochrome bitmap.", ""); %extend { - DocStr(GetSize, "Get the size of the bitmap."); + DocStr(GetSize, "Get the size of the bitmap.", ""); wxSize GetSize() { wxSize size(self->GetWidth(), self->GetHeight()); return size; @@ -196,7 +196,7 @@ monochrome bitmap."); virtual wxImage , ConvertToImage() const, "Creates a platform-independent image from a platform-dependent bitmap. This preserves mask information so that bitmaps and images can -be converted back and forth without loss in that respect."); +be converted back and forth without loss in that respect.", ""); DocDeclStr( @@ -205,7 +205,7 @@ be converted back and forth without loss in that respect."); file or explpicitly set for the bitmap. :see: `SetMask`, `wx.Mask` -"); +", ""); DocDeclStr( @@ -213,12 +213,12 @@ file or explpicitly set for the bitmap. "Sets the mask for this bitmap. :see: `GetMask`, `wx.Mask` -"); +", ""); %extend { DocStr(SetMaskColour, - "Create a Mask based on a specified colour in the Bitmap."); + "Create a Mask based on a specified colour in the Bitmap.", ""); void SetMaskColour(const wxColour& colour) { wxMask *mask = new wxMask(*self, colour); self->SetMask(mask); @@ -230,20 +230,20 @@ file or explpicitly set for the bitmap. virtual wxBitmap , GetSubBitmap(const wxRect& rect) const, "Returns a sub-bitmap of the current one as long as the rect belongs entirely to the bitmap. This function preserves bit depth and mask -information."); +information.", ""); DocDeclStr( virtual bool , SaveFile(const wxString &name, wxBitmapType type, wxPalette *palette = NULL), "Saves a bitmap in the named file. See `__init__` for a description of -the ``type`` parameter."); +the ``type`` parameter.", ""); DocDeclStr( virtual bool , LoadFile(const wxString &name, wxBitmapType type), "Loads a bitmap from a file. See `__init__` for a description of the -``type`` parameter."); +``type`` parameter.", ""); @@ -257,21 +257,21 @@ the ``type`` parameter."); DocDeclStr( virtual void , SetHeight(int height), - "Set the height property (does not affect the existing bitmap data)."); + "Set the height property (does not affect the existing bitmap data).", ""); DocDeclStr( virtual void , SetWidth(int width), - "Set the width property (does not affect the existing bitmap data)."); + "Set the width property (does not affect the existing bitmap data).", ""); DocDeclStr( virtual void , SetDepth(int depth), - "Set the depth property (does not affect the existing bitmap data)."); + "Set the depth property (does not affect the existing bitmap data).", ""); %extend { - DocStr(SetSize, "Set the bitmap size (does not affect the existing bitmap data)."); + DocStr(SetSize, "Set the bitmap size (does not affect the existing bitmap data).", ""); void SetSize(const wxSize& size) { self->SetWidth(size.x); self->SetHeight(size.y); @@ -304,8 +304,7 @@ will be drawn, and the masked area will not be drawn. A mask may be associated with a `wx.Bitmap`. It is used in `wx.DC.DrawBitmap` or `wx.DC.Blit` when the source device context is a `wx.MemoryDC` with a `wx.Bitmap` selected into it that contains a -mask. -"); +mask.", ""); class wxMask : public wxObject { public: @@ -317,7 +316,7 @@ the pixels in ``bitmap`` that match ``colour`` will be the transparent portions of the mask. If no ``colour`` or an invalid ``colour`` is passed then BLACK is used. -:see: `wx.Bitmap`, `wx.Colour`"); +:see: `wx.Bitmap`, `wx.Colour`", ""); %extend { wxMask(const wxBitmap& bitmap, const wxColour& colour = wxNullColour) { diff --git a/wxPython/src/_brush.i b/wxPython/src/_brush.i index 45503e817f..3545f9b975 100644 --- a/wxPython/src/_brush.i +++ b/wxPython/src/_brush.i @@ -19,7 +19,7 @@ DocStr(wxBrush, "A brush is a drawing tool for filling in areas. It is used for painting the background of rectangles, ellipses, etc. when drawing on -a `wx.DC`. It has a colour and a style. +a `wx.DC`. It has a colour and a style.", " :warning: Do not create instances of wx.Brush before the `wx.App` object has been created because, depending on the platform, @@ -37,8 +37,8 @@ class wxBrush : public wxGDIObject { public: DocCtorStr( wxBrush(const wxColour& colour, int style=wxSOLID), - "Constructs a brush from a `wx.Colour` object and a style. The style -parameter may be one of the following: + "Constructs a brush from a `wx.Colour` object and a style.", + "The style parameter may be one of the following: =================== ============================= Style Meaning @@ -61,36 +61,36 @@ parameter may be one of the following: DocDeclStr( virtual void , SetColour(const wxColour& col), - "Set the brush's `wx.Colour`."); + "Set the brush's `wx.Colour`.", ""); DocDeclStr( virtual void , SetStyle(int style), - "Sets the style of the brush. See `__init__` for a listing of styles."); + "Sets the style of the brush. See `__init__` for a listing of styles.", ""); DocDeclStr( virtual void , SetStipple(const wxBitmap& stipple), - "Sets the stipple `wx.Bitmap`."); + "Sets the stipple `wx.Bitmap`.", ""); DocDeclStr( wxColour , GetColour() const, - "Returns the `wx.Colour` of the brush."); + "Returns the `wx.Colour` of the brush.", ""); DocDeclStr( int , GetStyle() const, "Returns the style of the brush. See `__init__` for a listing of -styles."); +styles.", ""); DocDeclStr( wxBitmap *, GetStipple() const, "Returns the stiple `wx.Bitmap` of the brush. If the brush does not have a wx.STIPPLE style, then the return value may be non-None but an -uninitialised bitmap (`wx.Bitmap.Ok` returns False)."); +uninitialised bitmap (`wx.Bitmap.Ok` returns False).", ""); DocDeclStr( bool , Ok(), - "Returns True if the brush is initialised and valid."); + "Returns True if the brush is initialised and valid.", ""); #ifdef __WXMAC__ diff --git a/wxPython/src/_button.i b/wxPython/src/_button.i index 40c92dd711..2826dd75a8 100644 --- a/wxPython/src/_button.i +++ b/wxPython/src/_button.i @@ -33,7 +33,7 @@ enum { DocStr(wxButton, "A button is a control that contains a text string, and is one of the most common elements of a GUI. It may be placed on a dialog box or panel, or -indeed almost any other window. +indeed almost any other window.", " Window Styles ------------- @@ -65,7 +65,6 @@ public: %pythonAppend wxButton() "" - RefDoc(wxButton, ""); DocCtorStr( wxButton(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, @@ -73,11 +72,11 @@ public: long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxPyButtonNameStr), - "Create and show a button."); + "Create and show a button.", ""); DocCtorStrName( wxButton(), - "Precreate a Button for 2-phase creation.", + "Precreate a Button for 2-phase creation.", "", PreButton); DocDeclStr( @@ -87,18 +86,18 @@ public: long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxPyButtonNameStr), - "Acutally create the GUI Button for 2-phase creation."); + "Acutally create the GUI Button for 2-phase creation.", ""); DocDeclStr( void , SetDefault(), - "This sets the button to be the default item for the panel or dialog box."); + "This sets the button to be the default item for the panel or dialog box.", ""); DocDeclStr( static wxSize , GetDefaultSize(), - "Returns the default button size for this platform."); + "Returns the default button size for this platform.", ""); static wxVisualAttributes GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); @@ -113,7 +112,7 @@ DocStr(wxBitmapButton, "A Button that contains a bitmap. A bitmap button can be supplied with a single bitmap, and wxWidgets will draw all button states using this bitmap. If the application needs more control, additional bitmaps for the selected state, -unpressed focused state, and greyed-out state may be supplied. +unpressed focused state, and greyed-out state may be supplied.", " Window Styles ------------- @@ -150,8 +149,6 @@ public: %pythonAppend wxBitmapButton "self._setOORInfo(self)" %pythonAppend wxBitmapButton() "" - RefDoc(wxBitmapButton, ""); // turn it off for the ctors - DocCtorStr( wxBitmapButton(wxWindow* parent, wxWindowID id, const wxBitmap& bitmap, const wxPoint& pos = wxDefaultPosition, @@ -159,11 +156,11 @@ public: long style = wxBU_AUTODRAW, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxPyButtonNameStr), - "Create and show a button with a bitmap for the label."); + "Create and show a button with a bitmap for the label.", ""); DocCtorStrName( wxBitmapButton(), - "Precreate a BitmapButton for 2-phase creation.", + "Precreate a BitmapButton for 2-phase creation.", "", PreBitmapButton); DocDeclStr( @@ -173,46 +170,46 @@ public: long style = wxBU_AUTODRAW, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxPyButtonNameStr), - "Acutally create the GUI BitmapButton for 2-phase creation."); + "Acutally create the GUI BitmapButton for 2-phase creation.", ""); DocDeclStr( wxBitmap , GetBitmapLabel(), - "Returns the label bitmap (the one passed to the constructor)."); + "Returns the label bitmap (the one passed to the constructor).", ""); DocDeclStr( wxBitmap , GetBitmapDisabled(), - "Returns the bitmap for the disabled state."); + "Returns the bitmap for the disabled state.", ""); DocDeclStr( wxBitmap , GetBitmapFocus(), - "Returns the bitmap for the focused state."); + "Returns the bitmap for the focused state.", ""); DocDeclStr( wxBitmap , GetBitmapSelected(), - "Returns the bitmap for the selected state."); + "Returns the bitmap for the selected state.", ""); DocDeclStr( void , SetBitmapDisabled(const wxBitmap& bitmap), - "Sets the bitmap for the disabled button appearance."); + "Sets the bitmap for the disabled button appearance.", ""); DocDeclStr( void , SetBitmapFocus(const wxBitmap& bitmap), - "Sets the bitmap for the button appearance when it has the keyboard focus."); + "Sets the bitmap for the button appearance when it has the keyboard focus.", ""); DocDeclStr( void , SetBitmapSelected(const wxBitmap& bitmap), - "Sets the bitmap for the selected (depressed) button appearance."); + "Sets the bitmap for the selected (depressed) button appearance.", ""); DocDeclStr( void , SetBitmapLabel(const wxBitmap& bitmap), "Sets the bitmap label for the button. This is the bitmap used for the -unselected state, and for all other states if no other bitmaps are provided."); +unselected state, and for all other states if no other bitmaps are provided.", ""); void SetMargins(int x, int y); diff --git a/wxPython/src/_checkbox.i b/wxPython/src/_checkbox.i index 66fb9d2070..626c4f20fb 100644 --- a/wxPython/src/_checkbox.i +++ b/wxPython/src/_checkbox.i @@ -49,7 +49,7 @@ DocStr(wxCheckBox, checkmark is visible) or off (no checkmark). Optionally (When the wx.CHK_3STATE style flag is set) it can have a third state, called the mixed or undetermined state. Often this is used as a \"Does Not -Apply\" state. +Apply\" state.", " Window Styles ------------- @@ -84,8 +84,6 @@ public: %pythonAppend wxCheckBox "self._setOORInfo(self)" %pythonAppend wxCheckBox() "" - RefDoc(wxCheckBox, ""); // turn it off for the ctors - DocCtorStr( wxCheckBox(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, @@ -93,11 +91,11 @@ public: long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxPyCheckBoxNameStr), - "Creates and shows a CheckBox control"); + "Creates and shows a CheckBox control", ""); DocCtorStrName( wxCheckBox(), - "Precreate a CheckBox for 2-phase creation.", + "Precreate a CheckBox for 2-phase creation.", "", PreCheckBox); @@ -108,30 +106,30 @@ public: long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxPyCheckBoxNameStr), - "Actually create the GUI CheckBox for 2-phase creation."); + "Actually create the GUI CheckBox for 2-phase creation.", ""); DocDeclStr( bool, GetValue(), "Gets the state of a 2-state CheckBox. Returns True if it is checked, -False otherwise."); +False otherwise.", ""); DocDeclStr( bool, IsChecked(), "Similar to GetValue, but raises an exception if it is not a 2-state -CheckBox."); +CheckBox.", ""); DocDeclStr( void, SetValue(const bool state), "Set the state of a 2-state CheckBox. Pass True for checked, False for -unchecked."); +unchecked.", ""); DocDeclStr( wxCheckBoxState, Get3StateValue() const, "Returns wx.CHK_UNCHECKED when the CheckBox is unchecked, wx.CHK_CHECKED when it is checked and wx.CHK_UNDETERMINED when it's in the undetermined state. Raises an exceptiion when the function is -used with a 2-state CheckBox."); +used with a 2-state CheckBox.", ""); DocDeclStr( void, Set3StateValue(wxCheckBoxState state), @@ -139,16 +137,16 @@ used with a 2-state CheckBox."); of the following: wx.CHK_UNCHECKED (Check is off), wx.CHK_CHECKED (the Check is on) or wx.CHK_UNDETERMINED (Check is mixed). Raises an exception when the CheckBox is a 2-state checkbox and setting the -state to wx.CHK_UNDETERMINED."); +state to wx.CHK_UNDETERMINED.", ""); DocDeclStr( bool, Is3State() const, - "Returns whether or not the CheckBox is a 3-state CheckBox."); + "Returns whether or not the CheckBox is a 3-state CheckBox.", ""); DocDeclStr( bool, Is3rdStateAllowedForUser() const, "Returns whether or not the user can set the CheckBox to the third -state."); +state.", ""); static wxVisualAttributes GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); diff --git a/wxPython/src/_choice.i b/wxPython/src/_choice.i index de2bc68844..37492a18d6 100644 --- a/wxPython/src/_choice.i +++ b/wxPython/src/_choice.i @@ -24,7 +24,7 @@ MAKE_CONST_WXSTRING(ChoiceNameStr); DocStr(wxChoice, "A Choice control is used to select one of a list of strings. Unlike a `wx.ListBox`, only the selection is visible until the -user pulls down the menu of choices. +user pulls down the menu of choices.", " Events ------ @@ -40,8 +40,6 @@ public: %pythonAppend wxChoice "self._setOORInfo(self)" %pythonAppend wxChoice() "" - RefDoc(wxChoice, ""); // turn it off for the ctors - DocCtorAStr( wxChoice(wxWindow *parent, wxWindowID id=-1, const wxPoint& pos = wxDefaultPosition, @@ -53,11 +51,11 @@ public: "__init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, List choices=[], long style=0, Validator validator=DefaultValidator, String name=ChoiceNameStr) -> Choice", - "Create and show a Choice control"); + "Create and show a Choice control", ""); DocCtorStrName( wxChoice(), - "Precreate a Choice control for 2-phase creation.", + "Precreate a Choice control for 2-phase creation.", "", PreChoice); @@ -72,7 +70,7 @@ public: "Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, List choices=[], long style=0, Validator validator=DefaultValidator, String name=ChoiceNameStr) -> bool", - "Actually create the GUI Choice control for 2-phase creation"); + "Actually create the GUI Choice control for 2-phase creation", ""); // // These are only meaningful on wxMotif... @@ -82,15 +80,15 @@ public: DocDeclStr( void , SetSelection(const int n), - "Select the n'th item (zero based) in the list."); + "Select the n'th item (zero based) in the list.", ""); DocDeclStr( bool , SetStringSelection(const wxString& string), - "Select the item with the specifed string"); + "Select the item with the specifed string", ""); DocDeclStr( void , SetString(int n, const wxString& string), - "Set the label for the n'th item (zero based) in the list."); + "Set the label for the n'th item (zero based) in the list.", ""); %pythoncode { Select = SetSelection } diff --git a/wxPython/src/_clipbrd.i b/wxPython/src/_clipbrd.i index 7fd9be4534..89c143f3b4 100644 --- a/wxPython/src/_clipbrd.i +++ b/wxPython/src/_clipbrd.i @@ -33,7 +33,7 @@ clipboard and relinquish ownership. You should keep the clipboard open only momentarily. :see: `wx.DataObject` -"); +", ""); @@ -41,7 +41,7 @@ class wxClipboard : public wxObject { public: DocCtorStr( wxClipboard(), - ""); + "", ""); ~wxClipboard(); @@ -51,17 +51,17 @@ public: "Call this function to open the clipboard before calling SetData and GetData. Call Close when you have finished with the clipboard. You should keep the clipboard open for only a very short time. Returns -True on success."); +True on success.", ""); DocDeclStr( virtual void , Close(), - "Closes the clipboard."); + "Closes the clipboard.", ""); DocDeclStr( virtual bool , IsOpened() const, - "Query whether the clipboard is opened"); + "Query whether the clipboard is opened", ""); @@ -74,7 +74,7 @@ call this function repeatedly after having cleared the clipboard. After this function has been called, the clipboard owns the data, so do not delete the data explicitly. -:see: `wx.DataObject`"); +:see: `wx.DataObject`", ""); DocDeclStr( @@ -82,7 +82,7 @@ do not delete the data explicitly. "Set the clipboard data, this is the same as `Clear` followed by `AddData`. -:see: `wx.DataObject`"); +:see: `wx.DataObject`", ""); %clear wxDataObject *data; @@ -90,18 +90,18 @@ do not delete the data explicitly. DocDeclStr( virtual bool , IsSupported( const wxDataFormat& format ), "Returns True if the given format is available in the data object(s) on -the clipboard."); +the clipboard.", ""); DocDeclStr( virtual bool , GetData( wxDataObject& data ), "Call this function to fill data with data on the clipboard, if -available in the required format. Returns true on success."); +available in the required format. Returns true on success.", ""); DocDeclStr( virtual void , Clear(), "Clears data from the clipboard object and also the system's clipboard -if possible."); +if possible.", ""); DocDeclStr( @@ -109,14 +109,14 @@ if possible."); "Flushes the clipboard: this means that the data which is currently on clipboard will stay available even after the application exits, possibly eating memory, otherwise the clipboard will be emptied on -exit. Returns False if the operation is unsuccesful for any reason."); +exit. Returns False if the operation is unsuccesful for any reason.", ""); DocDeclStr( virtual void , UsePrimarySelection( bool primary = True ), "On platforms supporting it (the X11 based platforms), selects the so called PRIMARY SELECTION as the clipboard as opposed to the -normal clipboard, if primary is True."); +normal clipboard, if primary is True.", ""); }; @@ -131,7 +131,7 @@ wxClipboard* const wxTheClipboard; DocStr(wxClipboardLocker, "A helpful class for opening the clipboard and automatically -closing it when the locker is destroyed."); +closing it when the locker is destroyed.", ""); class wxClipboardLocker { @@ -141,7 +141,7 @@ public: DocStr(__nonzero__, "A ClipboardLocker instance evaluates to True if the clipboard was -successfully opened.") +successfully opened.", ""); %extend { bool __nonzero__() { return !!(*self); } } diff --git a/wxPython/src/_cmndlgs.i b/wxPython/src/_cmndlgs.i index e898f3fabe..1b1294e0ab 100644 --- a/wxPython/src/_cmndlgs.i +++ b/wxPython/src/_cmndlgs.i @@ -29,13 +29,13 @@ MAKE_CONST_WXSTRING(MessageBoxCaptionStr); DocStr(wxColourData, "This class holds a variety of information related to the colour chooser dialog, used to transfer settings and results to and from the -`wx.ColourDialog`."); +`wx.ColourDialog`.", ""); class wxColourData : public wxObject { public: DocCtorStr( wxColourData(), - "Constructor, sets default values."); + "Constructor, sets default values.", ""); ~wxColourData(); @@ -44,33 +44,33 @@ public: bool , GetChooseFull(), "Under Windows, determines whether the Windows colour dialog will display the full dialog with custom colour selection controls. Has no -meaning under other platforms. The default value is true."); +meaning under other platforms. The default value is true.", ""); DocDeclStr( wxColour , GetColour(), - "Gets the colour (pre)selected by the dialog."); + "Gets the colour (pre)selected by the dialog.", ""); DocDeclStr( wxColour , GetCustomColour(int i), "Gets the i'th custom colour associated with the colour dialog. i should be an integer between 0 and 15. The default custom colours are -all white."); +all white.", ""); DocDeclStr( void , SetChooseFull(int flag), "Under Windows, tells the Windows colour dialog to display the full dialog with custom colour selection controls. Under other platforms, -has no effect. The default value is true."); +has no effect. The default value is true.", ""); DocDeclStr( void , SetColour(const wxColour& colour), "Sets the default colour for the colour dialog. The default colour is -black."); +black.", ""); DocDeclStr( void , SetCustomColour(int i, const wxColour& colour), "Sets the i'th custom colour for the colour dialog. i should be an -integer between 0 and 15. The default custom colours are all white."); +integer between 0 and 15. The default custom colours are all white.", ""); }; @@ -78,7 +78,7 @@ integer between 0 and 15. The default custom colours are all white."); DocStr(wxColourDialog, - "This class represents the colour chooser dialog."); + "This class represents the colour chooser dialog.", ""); class wxColourDialog : public wxDialog { public: @@ -88,11 +88,11 @@ public: wxColourDialog(wxWindow* parent, wxColourData* data = NULL), "Constructor. Pass a parent window, and optionally a `wx.ColourData`, which will be copied to the colour dialog's internal ColourData -instance."); +instance.", ""); DocDeclStr( wxColourData& , GetColourData(), - "Returns a reference to the `wx.ColourData` used by the dialog."); + "Returns a reference to the `wx.ColourData` used by the dialog.", ""); }; @@ -101,8 +101,7 @@ instance."); DocStr(wxDirDialog, "wx.DirDialog allows the user to select a directory by browising the -file system. - +file system.", " Window Styles -------------- @@ -118,8 +117,6 @@ class wxDirDialog : public wxDialog { public: %pythonAppend wxDirDialog "self._setOORInfo(self)" - RefDoc(wxDirDialog, ""); // turn it off for the ctors - DocCtorStr( wxDirDialog(wxWindow* parent, const wxString& message = wxPyDirSelectorPromptStr, @@ -128,28 +125,28 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, const wxString& name = wxPyDirDialogNameStr), - "Constructor. Use ShowModal method to show the dialog."); + "Constructor. Use ShowModal method to show the dialog.", ""); DocDeclStr( wxString , GetPath(), - "Returns the default or user-selected path."); + "Returns the default or user-selected path.", ""); DocDeclStr( wxString , GetMessage(), - "Returns the message that will be displayed on the dialog."); + "Returns the message that will be displayed on the dialog.", ""); DocDeclStr( long , GetStyle(), - "Returns the dialog style."); + "Returns the dialog style.", ""); DocDeclStr( void , SetMessage(const wxString& message), - "Sets the message that will be displayed on the dialog."); + "Sets the message that will be displayed on the dialog.", ""); DocDeclStr( void , SetPath(const wxString& path), - "Sets the default path."); + "Sets the default path.", ""); }; @@ -158,7 +155,7 @@ public: DocStr(wxFileDialog, "wx.FileDialog allows the user to select one or more files from the -filesystem. +filesystem.", " In Windows, this is the common file selector dialog. On X based platforms a generic alternative is used. The path and filename are @@ -169,7 +166,7 @@ displayed in the file selector, and file extension supplies a type extension for the required filename. Both the X and Windows versions implement a wildcard filter. Typing a -filename containing wildcards (*, ?) in the filename text item, and +filename containing wildcards (\*, ?) in the filename text item, and clicking on Ok, will result in only those files matching the pattern being displayed. The wildcard may be a specification for multiple types of file with a description for each, such as:: @@ -179,24 +176,24 @@ types of file with a description for each, such as:: Window Styles -------------- - ================== ========================================== - wx.OPEN This is an open dialog. + =================== ========================================== + wx.OPEN This is an open dialog. - wx.SAVE This is a save dialog. + wx.SAVE This is a save dialog. - wx.HIDE_READONLY For open dialog only: hide the checkbox - allowing to open the file in read-only mode. + wx.HIDE_READONLY For open dialog only: hide the checkbox + allowing to open the file in read-only mode. - wx.OVERWRITE_PROMPT For save dialog only: prompt for a confirmation - if a file will be overwritten. + wx.OVERWRITE_PROMPT For save dialog only: prompt for a confirmation + if a file will be overwritten. - wx.MULTIPLE For open dialog only: allows selecting multiple - files. + wx.MULTIPLE For open dialog only: allows selecting multiple + files. - wx.CHANGE_DIR Change the current working directory to the - directory where the file(s) chosen by the user - are. - ================== ========================================== + wx.CHANGE_DIR Change the current working directory to the + directory where the file(s) chosen by the user + are. + =================== ========================================== "); @@ -205,8 +202,6 @@ class wxFileDialog : public wxDialog { public: %pythonAppend wxFileDialog "self._setOORInfo(self)" - RefDoc(wxFileDialog, ""); // turn it off for the ctors - DocCtorStr( wxFileDialog(wxWindow* parent, const wxString& message = wxPyFileSelectorPromptStr, @@ -215,25 +210,25 @@ public: const wxString& wildcard = wxPyFileSelectorDefaultWildcardStr, long style = 0, const wxPoint& pos = wxDefaultPosition), - "Constructor. Use ShowModal method to show the dialog."); + "Constructor. Use ShowModal method to show the dialog.", ""); DocDeclStr( void , SetMessage(const wxString& message), - "Sets the message that will be displayed on the dialog."); + "Sets the message that will be displayed on the dialog.", ""); DocDeclStr( void , SetPath(const wxString& path), "Sets the path (the combined directory and filename that will be -returned when the dialog is dismissed)."); +returned when the dialog is dismissed).", ""); DocDeclStr( void , SetDirectory(const wxString& dir), - "Sets the default directory."); + "Sets the default directory.", ""); DocDeclStr( void , SetFilename(const wxString& name), - "Sets the default filename."); + "Sets the default filename.", ""); DocDeclStr( void , SetWildcard(const wxString& wildCard), @@ -241,58 +236,58 @@ returned when the dialog is dismissed)."); example:: \"BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif\" -"); +", ""); DocDeclStr( void , SetStyle(long style), - "Sets the dialog style."); + "Sets the dialog style.", ""); DocDeclStr( void , SetFilterIndex(int filterIndex), - "Sets the default filter index, starting from zero."); + "Sets the default filter index, starting from zero.", ""); DocDeclStr( wxString , GetMessage() const, - "Returns the message that will be displayed on the dialog."); + "Returns the message that will be displayed on the dialog.", ""); DocDeclStr( wxString , GetPath() const, - "Returns the full path (directory and filename) of the selected file."); + "Returns the full path (directory and filename) of the selected file.", ""); DocDeclStr( wxString , GetDirectory() const, - "Returns the default directory."); + "Returns the default directory.", ""); DocDeclStr( wxString , GetFilename() const, - "Returns the default filename."); + "Returns the default filename.", ""); DocDeclStr( wxString , GetWildcard() const, - "Returns the file dialog wildcard."); + "Returns the file dialog wildcard.", ""); DocDeclStr( long , GetStyle() const, - "Returns the dialog style."); + "Returns the dialog style.", ""); DocDeclStr( int , GetFilterIndex() const, "Returns the index into the list of filters supplied, optionally, in the wildcard parameter. Before the dialog is shown, this is the index which will be used when the dialog is first displayed. After the -dialog is shown, this is the index selected by the user."); +dialog is shown, this is the index selected by the user.", ""); DocStr(GetFilenames, "Returns a list of filenames chosen in the dialog. This function should only be used with the dialogs which have wx.MULTIPLE style, use -GetFilename for the others."); +GetFilename for the others.", ""); DocStr(GetPaths, "Fills the array paths with the full paths of the files chosen. This function should only be used with the dialogs which have wx.MULTIPLE -style, use GetPath for the others."); +style, use GetPath for the others.", ""); %extend { PyObject* GetFilenames() { @@ -337,7 +332,7 @@ enum { wxCHOICEDLG_STYLE }; DocStr(wxMultiChoiceDialog, - "A simple dialog with a multi selection listbox."); + "A simple dialog with a multi selection listbox.", ""); class wxMultiChoiceDialog : public wxDialog { @@ -354,18 +349,18 @@ public: "__init__(Window parent, String message, String caption, List choices=[], long style=CHOICEDLG_STYLE, Point pos=DefaultPosition) -> MultiChoiceDialog", - "Constructor. Use ShowModal method to show the dialog."); + "Constructor. Use ShowModal method to show the dialog.", ""); DocDeclAStr( void, SetSelections(const wxArrayInt& selections), "SetSelections(List selections)", "Specify the items in the list that should be selected, using a list of -integers."); +integers.", ""); DocAStr(GetSelections, "GetSelections() -> [selections]", - "Returns a list of integers representing the items that are selected."); + "Returns a list of integers representing the items that are selected.", ""); %extend { PyObject* GetSelections() { return wxArrayInt2PyList_helper(self->GetSelections()); @@ -377,7 +372,7 @@ integers."); //--------------------------------------------------------------------------- DocStr(wxSingleChoiceDialog, - "A simple dialog with a single selection listbox."); + "A simple dialog with a single selection listbox.", ""); class wxSingleChoiceDialog : public wxDialog { public: @@ -387,7 +382,7 @@ public: "__init__(Window parent, String message, String caption, List choices=[], long style=CHOICEDLG_STYLE, Point pos=DefaultPosition) -> SingleChoiceDialog", - "Constructor. Use ShowModal method to show the dialog."); + "Constructor. Use ShowModal method to show the dialog.", ""); %extend { // TODO: ignoring clientData for now... FIX THIS @@ -406,22 +401,22 @@ public: DocDeclStr( int , GetSelection(), - "Get the index of teh currently selected item."); + "Get the index of teh currently selected item.", ""); DocDeclStr( wxString , GetStringSelection(), - "Returns the string value of the currently selected item"); + "Returns the string value of the currently selected item", ""); DocDeclStr( void , SetSelection(int sel), - "Set the current selected item to sel"); + "Set the current selected item to sel", ""); }; //--------------------------------------------------------------------------- DocStr(wxTextEntryDialog, - "A dialog with text control, [ok] and [cancel] buttons"); + "A dialog with text control, [ok] and [cancel] buttons", ""); class wxTextEntryDialog : public wxDialog { public: @@ -434,16 +429,16 @@ public: const wxString& defaultValue = wxPyEmptyString, long style = wxOK | wxCANCEL | wxCENTRE, const wxPoint& pos = wxDefaultPosition), - "Constructor. Use ShowModal method to show the dialog."); + "Constructor. Use ShowModal method to show the dialog.", ""); DocDeclStr( wxString , GetValue(), "Returns the text that the user has entered if the user has pressed OK, -or the original value if the user has pressed Cancel."); +or the original value if the user has pressed Cancel.", ""); DocDeclStr( void , SetValue(const wxString& value), - "Sets the default text value."); + "Sets the default text value.", ""); }; //--------------------------------------------------------------------------- @@ -451,7 +446,7 @@ or the original value if the user has pressed Cancel."); DocStr(wxFontData, "This class holds a variety of information related to font dialogs and -is used to transfer settings to and results from a `wx.FontDialog`."); +is used to transfer settings to and results from a `wx.FontDialog`.", ""); class wxFontData : public wxObject { @@ -463,65 +458,65 @@ public: void , EnableEffects(bool enable), "Enables or disables 'effects' under MS Windows only. This refers to the controls for manipulating colour, strikeout and underline -properties. The default value is true."); +properties. The default value is true.", ""); DocDeclStr( bool , GetAllowSymbols(), "Under MS Windows, returns a flag determining whether symbol fonts can be selected. Has no effect on other platforms. The default value is -true."); +true.", ""); DocDeclStr( wxColour , GetColour(), "Gets the colour associated with the font dialog. The default value is -black."); +black.", ""); DocDeclStr( wxFont , GetChosenFont(), - "Gets the font chosen by the user."); + "Gets the font chosen by the user.", ""); DocDeclStr( bool , GetEnableEffects(), - "Determines whether 'effects' are enabled under Windows."); + "Determines whether 'effects' are enabled under Windows.", ""); DocDeclStr( wxFont , GetInitialFont(), "Gets the font that will be initially used by the font dialog. This -should have previously been set by the application."); +should have previously been set by the application.", ""); DocDeclStr( bool , GetShowHelp(), "Returns true if the Help button will be shown (Windows only). The -default value is false."); +default value is false.", ""); DocDeclStr( void , SetAllowSymbols(bool allowSymbols), "Under MS Windows, determines whether symbol fonts can be selected. Has -no effect on other platforms. The default value is true."); +no effect on other platforms. The default value is true.", ""); DocDeclStr( void , SetChosenFont(const wxFont& font), "Sets the font that will be returned to the user (normally for internal -use only)."); +use only).", ""); DocDeclStr( void , SetColour(const wxColour& colour), "Sets the colour that will be used for the font foreground colour. The -default colour is black."); +default colour is black.", ""); DocDeclStr( void , SetInitialFont(const wxFont& font), - "Sets the font that will be initially used by the font dialog."); + "Sets the font that will be initially used by the font dialog.", ""); DocDeclStr( void , SetRange(int min, int max), "Sets the valid range for the font point size (Windows only). The -default is 0, 0 (unrestricted range)."); +default is 0, 0 (unrestricted range).", ""); DocDeclStr( void , SetShowHelp(bool showHelp), "Determines whether the Help button will be displayed in the font -dialog (Windows only). The default value is false."); +dialog (Windows only). The default value is false.", ""); }; @@ -531,7 +526,7 @@ DocStr(wxFontDialog, "wx.FontDialog allows the user to select a system font and its attributes. :see: `wx.FontData` -"); +", ""); class wxFontDialog : public wxDialog { public: @@ -541,14 +536,14 @@ public: "Constructor. Pass a parent window and the `wx.FontData` object to be used to initialize the dialog controls. Call `ShowModal` to display the dialog. If ShowModal returns ``wx.ID_OK`` then you can fetch the -results with via the `wx.FontData` returned by `GetFontData`."); +results with via the `wx.FontData` returned by `GetFontData`.", ""); wxFontDialog(wxWindow* parent, const wxFontData& data); DocDeclStr( wxFontData& , GetFontData(), "Returns a reference to the internal `wx.FontData` used by the -wx.FontDialog."); +wx.FontDialog.", ""); }; @@ -557,27 +552,26 @@ wx.FontDialog."); DocStr(wxMessageDialog, "This class provides a simple dialog that shows a single or multi-line -message, with a choice of OK, Yes, No and/or Cancel buttons. - +message, with a choice of OK, Yes, No and/or Cancel buttons.", " Window Styles -------------- - ================= ============================================= - wx.OK Show an OK button. - wx.CANCEL Show a Cancel button. - wx.YES_NO Show Yes and No buttons. - wx.YES_DEFAULT Used with wxYES_NO, makes Yes button the - default - which is the default behaviour. - wx.NO_DEFAULT Used with wxYES_NO, makes No button the default. - wx.ICON_EXCLAMATION Shows an exclamation mark icon. - wx.ICON_HAND Shows an error icon. - wx.ICON_ERROR Shows an error icon - the same as wxICON_HAND. - wx.ICON_QUESTION Shows a question mark icon. - wx.ICON_INFORMATION Shows an information (i) icon. - wx.STAY_ON_TOP The message box stays on top of all other - window, even those of the other applications - (Windows only). - ================= ============================================= + =================== ============================================= + wx.OK Show an OK button. + wx.CANCEL Show a Cancel button. + wx.YES_NO Show Yes and No buttons. + wx.YES_DEFAULT Used with wxYES_NO, makes Yes button the + default - which is the default behaviour. + wx.NO_DEFAULT Used with wxYES_NO, makes No button the default. + wx.ICON_EXCLAMATION Shows an exclamation mark icon. + wx.ICON_HAND Shows an error icon. + wx.ICON_ERROR Shows an error icon - the same as wxICON_HAND. + wx.ICON_QUESTION Shows a question mark icon. + wx.ICON_INFORMATION Shows an information (i) icon. + wx.STAY_ON_TOP The message box stays on top of all other + window, even those of the other applications + (Windows only). + =================== ============================================= "); @@ -585,15 +579,13 @@ class wxMessageDialog : public wxDialog { public: %pythonAppend wxMessageDialog "self._setOORInfo(self)" - RefDoc(wxMessageDialog, ""); // turn it off for the ctors - DocCtorStr( wxMessageDialog(wxWindow* parent, const wxString& message, const wxString& caption = wxPyMessageBoxCaptionStr, long style = wxOK | wxCANCEL | wxCENTRE, const wxPoint& pos = wxDefaultPosition), - "Constructor, use `ShowModal` to display the dialog."); + "Constructor, use `ShowModal` to display the dialog.", ""); }; @@ -602,34 +594,34 @@ public: DocStr(wxProgressDialog, "A dialog that shows a short message and a progress bar. Optionally, it -can display an ABORT button. +can display an ABORT button.", " Window Styles -------------- - ================= ============================================= - wx.PD_APP_MODAL Make the progress dialog modal. If this flag is - not given, it is only \"locally\" modal - - that is the input to the parent window is - disabled, but not to the other ones. - - wx.PD_AUTO_HIDE Causes the progress dialog to disappear from - screen as soon as the maximum value of the - progress meter has been reached. - - wx.PD_CAN_ABORT This flag tells the dialog that it should have - a \"Cancel\" button which the user may press. If - this happens, the next call to Update() will - return false. - - wx.PD_ELAPSED_TIME This flag tells the dialog that it should show - elapsed time (since creating the dialog). - - wx.PD_ESTIMATED_TIME This flag tells the dialog that it should show - estimated time. - - wx.PD_REMAINING_TIME This flag tells the dialog that it should show - remaining time. - ================= ============================================= + ==================== ============================================= + wx.PD_APP_MODAL Make the progress dialog modal. If this flag is + not given, it is only \"locally\" modal - + that is the input to the parent window is + disabled, but not to the other ones. + + wx.PD_AUTO_HIDE Causes the progress dialog to disappear from + screen as soon as the maximum value of the + progress meter has been reached. + + wx.PD_CAN_ABORT This flag tells the dialog that it should have + a \"Cancel\" button which the user may press. If + this happens, the next call to Update() will + return false. + + wx.PD_ELAPSED_TIME This flag tells the dialog that it should show + elapsed time (since creating the dialog). + + wx.PD_ESTIMATED_TIME This flag tells the dialog that it should show + estimated time. + + wx.PD_REMAINING_TIME This flag tells the dialog that it should show + remaining time. + ==================== ============================================= "); @@ -637,8 +629,6 @@ class wxProgressDialog : public wxFrame { public: %pythonAppend wxProgressDialog "self._setOORInfo(self)" - RefDoc(wxProgressDialog, ""); // turn it off for the ctors - DocCtorStr( wxProgressDialog(const wxString& title, const wxString& message, @@ -647,7 +637,7 @@ public: int style = wxPD_AUTO_HIDE | wxPD_APP_MODAL ), "Constructor. Creates the dialog, displays it and disables user input for other windows, or, if wx.PD_APP_MODAL flag is not given, for its -parent window only."); +parent window only.", ""); DocDeclStr( virtual bool , Update(int value, const wxString& newmsg = wxPyEmptyString), @@ -657,12 +647,12 @@ button has been pressed. If false is returned, the application can either immediately destroy the dialog or ask the user for the confirmation and if the abort is -not confirmed the dialog may be resumed with Resume function."); +not confirmed the dialog may be resumed with Resume function.", ""); DocDeclStr( void , Resume(), "Can be used to continue with the dialog, after the user had chosen to -abort."); +abort.", ""); }; @@ -722,7 +712,7 @@ EVT_COMMAND_FIND_CLOSE = EVT_FIND_CLOSE DocStr(wxFindDialogEvent, - "Events for the FindReplaceDialog"); + "Events for the FindReplaceDialog", ""); class wxFindDialogEvent : public wxCommandEvent { @@ -732,32 +722,32 @@ public: DocDeclStr( int , GetFlags(), "Get the currently selected flags: this is the combination of -wx.FR_DOWN, wx.FR_WHOLEWORD and wx.FR_MATCHCASE flags."); +wx.FR_DOWN, wx.FR_WHOLEWORD and wx.FR_MATCHCASE flags.", ""); DocDeclStr( const wxString& , GetFindString(), - "Return the string to find (never empty)."); + "Return the string to find (never empty).", ""); DocDeclStr( const wxString& , GetReplaceString(), "Return the string to replace the search string with (only for replace -and replace all events)."); +and replace all events).", ""); DocDeclStr( wxFindReplaceDialog *, GetDialog(), - "Return the pointer to the dialog which generated this event."); + "Return the pointer to the dialog which generated this event.", ""); DocDeclStr( void , SetFlags(int flags), - ""); + "", ""); DocDeclStr( void , SetFindString(const wxString& str), - ""); + "", ""); DocDeclStr( void , SetReplaceString(const wxString& str), - ""); + "", ""); }; @@ -770,7 +760,7 @@ time a `wx.FindDialogEvent` is generated so instead of using the `wx.FindDialogEvent` methods you can also directly query this object. Note that all SetXXX() methods may only be called before showing the -dialog and calling them has no effect later. +dialog and calling them has no effect later.", " Flags ----- @@ -793,34 +783,34 @@ class wxFindReplaceData : public wxObject public: DocCtorStr( wxFindReplaceData(int flags=0), - "Constuctor initializes the flags to default value (0)."); + "Constuctor initializes the flags to default value (0).", ""); ~wxFindReplaceData(); DocDeclStr( const wxString& , GetFindString(), - "Get the string to find."); + "Get the string to find.", ""); DocDeclStr( const wxString& , GetReplaceString(), - "Get the replacement string."); + "Get the replacement string.", ""); DocDeclStr( int , GetFlags(), - "Get the combination of flag values."); + "Get the combination of flag values.", ""); DocDeclStr( void , SetFlags(int flags), - "Set the flags to use to initialize the controls of the dialog."); + "Set the flags to use to initialize the controls of the dialog.", ""); DocDeclStr( void , SetFindString(const wxString& str), - "Set the string to find (used as initial value by the dialog)."); + "Set the string to find (used as initial value by the dialog).", ""); DocDeclStr( void , SetReplaceString(const wxString& str), - "Set the replacement string (used as initial value by the dialog)."); + "Set the replacement string (used as initial value by the dialog).", ""); }; @@ -834,7 +824,7 @@ something else). The actual searching is supposed to be done in the owner window which is the parent of this dialog. Note that it means that unlike for the other standard dialogs this one must have a parent window. Also note that there is no way to use this dialog in a modal -way; it is always, by design and implementation, modeless. +way; it is always, by design and implementation, modeless.", " Window Styles @@ -856,35 +846,33 @@ public: %pythonAppend wxFindReplaceDialog "self._setOORInfo(self)" %pythonAppend wxFindReplaceDialog() "" - RefDoc(wxFindReplaceDialog, ""); // turn it off for the ctors - DocCtorStr( wxFindReplaceDialog(wxWindow *parent, wxFindReplaceData *data, const wxString &title, int style = 0), "Create a FindReplaceDialog. The parent and data parameters must be -non-None. Use Show to display the dialog."); +non-None. Use Show to display the dialog.", ""); DocCtorStrName( wxFindReplaceDialog(), - "Precreate a FindReplaceDialog for 2-phase creation", + "Precreate a FindReplaceDialog for 2-phase creation", "", PreFindReplaceDialog); DocDeclStr( bool , Create(wxWindow *parent, wxFindReplaceData *data, const wxString &title, int style = 0), - "Create the dialog, for 2-phase create."); + "Create the dialog, for 2-phase create.", ""); DocDeclStr( const wxFindReplaceData *, GetData(), - "Get the FindReplaceData object used by this dialog."); + "Get the FindReplaceData object used by this dialog.", ""); DocDeclStr( void , SetData(wxFindReplaceData *data), - "Set the FindReplaceData object used by this dialog."); + "Set the FindReplaceData object used by this dialog.", ""); }; diff --git a/wxPython/src/_colour.i b/wxPython/src/_colour.i index 245eed2067..c0a53a5a03 100644 --- a/wxPython/src/_colour.i +++ b/wxPython/src/_colour.i @@ -18,96 +18,104 @@ DocStr(wxColour, -"A colour is an object representing a combination of Red, Green, and Blue (RGB) -intensity values, and is used to determine drawing colours, window colours, -etc. Valid RGB values are in the range 0 to 255. +"A colour is an object representing a combination of Red, Green, and +Blue (RGB) intensity values, and is used to determine drawing colours, +window colours, etc. Valid RGB values are in the range 0 to 255. -In wxPython there are typemaps that will automatically convert from a colour -name, or from a '#RRGGBB' colour hex value string to a wx.Colour object when -calling C++ methods that expect a wxColour. This means that the following are -all equivallent: +In wxPython there are typemaps that will automatically convert from a +colour name, or from a '#RRGGBB' colour hex value string to a +wx.Colour object when calling C++ methods that expect a wxColour. +This means that the following are all equivallent:: win.SetBackgroundColour(wxColour(0,0,255)) win.SetBackgroundColour('BLUE') win.SetBackgroundColour('#0000FF') -You can retrieve the various current system colour settings with -wx.SystemSettings.GetColour."); +Additional colour names and their coresponding values can be added +using `wx.ColourDatabase`. Various system colours (as set in the +user's system preferences) can be retrieved with +`wx.SystemSettings.GetColour`. +", ""); class wxColour : public wxObject { public: DocCtorStr( - wxColour(unsigned char red=0, unsigned char green=0, unsigned char blue=0), - "Constructs a colour from red, green and blue values."); + wxColour(byte red=0, byte green=0, byte blue=0), + "Constructs a colour from red, green and blue values. + +:see: Alternate constructors `wx.NamedColour` and `wx.ColourRGB`. +", ""); DocCtorStrName( wxColour( const wxString& colorName), - "Constructs a colour object using a colour name listed in wx.TheColourDatabase.", + "Constructs a colour object using a colour name listed in +``wx.TheColourDatabase``.", "", NamedColour); DocCtorStrName( wxColour( unsigned long colRGB ), - "Constructs a colour from a packed RGB value.", + "Constructs a colour from a packed RGB value.", "", ColourRGB); ~wxColour(); DocDeclStr( - unsigned char , Red(), - "Returns the red intensity."); + byte , Red(), + "Returns the red intensity.", ""); DocDeclStr( - unsigned char , Green(), - "Returns the green intensity."); + byte , Green(), + "Returns the green intensity.", ""); DocDeclStr( - unsigned char , Blue(), - "Returns the blue intensity."); + byte , Blue(), + "Returns the blue intensity.", ""); DocDeclStr( bool , Ok(), - "Returns True if the colour object is valid (the colour has been\n" - "initialised with RGB values)."); + "Returns True if the colour object is valid (the colour has been +initialised with RGB values).", ""); DocDeclStr( - void , Set(unsigned char red, unsigned char green, unsigned char blue), - "Sets the RGB intensity values."); + void , Set(byte red, byte green, byte blue), + "Sets the RGB intensity values.", ""); DocDeclStrName( void , Set(unsigned long colRGB), - "Sets the RGB intensity values from a packed RGB value.", + "Sets the RGB intensity values from a packed RGB value.", "", SetRGB); DocDeclStrName( void , InitFromName(const wxString& colourName), - "Sets the RGB intensity values using a colour name listed in wx.TheColourDatabase.", + "Sets the RGB intensity values using a colour name listed in +``wx.TheColourDatabase``.", "", SetFromName); DocDeclStr( long , GetPixel() const, - "Returns a pixel value which is platform-dependent. On Windows, a\n" - "COLORREF is returned. On X, an allocated pixel value is returned.\n" - "-1 is returned if the pixel is invalid (on X, unallocated)."); + "Returns a pixel value which is platform-dependent. On Windows, a +COLORREF is returned. On X, an allocated pixel value is returned. -1 +is returned if the pixel is invalid (on X, unallocated).", ""); DocDeclStr( bool , operator==(const wxColour& colour) const, - "Compare colours for equality"); + "Compare colours for equality", ""); DocDeclStr( bool , operator!=(const wxColour& colour) const, - "Compare colours for inequality"); + "Compare colours for inequality", ""); %extend { DocAStr(Get, "Get() -> (r, g, b)", - "Returns the RGB intensity values as a tuple."); + "Returns the RGB intensity values as a tuple.", ""); PyObject* Get() { PyObject* rv = PyTuple_New(3); int red = -1; @@ -125,7 +133,7 @@ public: } DocStr(GetRGB, - "Return the colour as a packed RGB value"); + "Return the colour as a packed RGB value", ""); unsigned long GetRGB() { return self->Red() | (self->Green() << 8) | (self->Blue() << 16); } @@ -133,9 +141,9 @@ public: %pythoncode { - asTuple = Get - def __str__(self): return str(self.asTuple()) - def __repr__(self): return 'wx.Colour' + str(self.asTuple()) + asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") + def __str__(self): return str(self.Get()) + def __repr__(self): return 'wx.Colour' + str(self.Get()) def __nonzero__(self): return self.Ok() __safe_for_unpickling__ = True def __reduce__(self): return (Colour, self.Get()) diff --git a/wxPython/src/_combobox.i b/wxPython/src/_combobox.i index e07864bca5..8c964c1d92 100644 --- a/wxPython/src/_combobox.i +++ b/wxPython/src/_combobox.i @@ -22,28 +22,36 @@ MAKE_CONST_WXSTRING(ComboBoxNameStr); DocStr(wxComboBox, -"A combobox is like a combination of an edit control and a listbox. It can be -displayed as static list with editable or read-only text field; or a drop-down -list with text field."); - -RefDoc(wxComboBox, " - Styles - wx.CB_SIMPLE: Creates a combobox with a permanently displayed list. - Windows only. - - wx.CB_DROPDOWN: Creates a combobox with a drop-down list. - - wx.CB_READONLY: Same as wxCB_DROPDOWN but only the strings specified as - the combobox choices can be selected, it is impossible - to select (even from a program) a string which is not in - the choices list. - - wx.CB_SORT: Sorts the entries in the list alphabetically. - - Events - - EVT_COMBOBOX: Sent when an item on the list is selected. - EVT_TEXT: Sent when the combobox text changes. +"A combobox is like a combination of an edit control and a +listbox. It can be displayed as static list with editable or +read-only text field; or a drop-down list with text field. + +A combobox permits a single selection only. Combobox items are +numbered from zero.", " + +Styles +------ + ================ =============================================== + wx.CB_SIMPLE Creates a combobox with a permanently + displayed list. Windows only. + + wx.CB_DROPDOWN Creates a combobox with a drop-down list. + + wx.CB_READONLY Same as wxCB_DROPDOWN but only the strings + specified as the combobox choices can be + selected, it is impossible to select + (even from a program) a string which is + not in the choices list. + + wx.CB_SORT Sorts the entries in the list alphabetically. + ================ =============================================== + +Events +------- + ================ =============================================== + EVT_COMBOBOX Sent when an item on the list is selected. + EVT_TEXT Sent when the combobox text changes. + ================ =============================================== "); @@ -58,8 +66,6 @@ public: %pythonAppend wxComboBox "self._setOORInfo(self)" %pythonAppend wxComboBox() "" - RefDoc(wxComboBox, ""); // turn it off for the ctors - DocCtorAStr( wxComboBox(wxWindow* parent, wxWindowID id=-1, const wxString& value = wxPyEmptyString, @@ -69,15 +75,15 @@ public: long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxPyComboBoxNameStr), - "__init__(Window parent, int id, String value=EmptyString,\n" - " Point pos=DefaultPosition, Size size=DefaultSize,\n" - " List choices=[], long style=0, Validator validator=DefaultValidator,\n" - " String name=ComboBoxNameStr) -> ComboBox", - "Constructor, creates and shows a ComboBox control."); + "__init__(Window parent, int id, String value=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + List choices=[], long style=0, Validator validator=DefaultValidator, + String name=ComboBoxNameStr) -> ComboBox", + "Constructor, creates and shows a ComboBox control.", ""); DocCtorStrName( wxComboBox(), - "Precreate a ComboBox control for 2-phase creation.", + "Precreate a ComboBox control for 2-phase creation.", "", PreComboBox); @@ -90,81 +96,81 @@ public: long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxPyChoiceNameStr), - "Create(Window parent, int id, String value=EmptyString,\n" - " Point pos=DefaultPosition, Size size=DefaultSize,\n" - " List choices=[], long style=0, Validator validator=DefaultValidator,\n" - " String name=ChoiceNameStr) -> bool", - "Actually create the GUI wxComboBox control for 2-phase creation"); + "Create(Window parent, int id, String value=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + List choices=[], long style=0, Validator validator=DefaultValidator, + String name=ChoiceNameStr) -> bool", + "Actually create the GUI wxComboBox control for 2-phase creation", ""); DocDeclStr( virtual wxString , GetValue() const, - "Returns the current value in the combobox text field."); + "Returns the current value in the combobox text field.", ""); DocDeclStr( virtual void , SetValue(const wxString& value), - ""); + "", ""); DocDeclStr( virtual void , Copy(), - "Copies the selected text to the clipboard."); + "Copies the selected text to the clipboard.", ""); DocDeclStr( virtual void , Cut(), - "Copies the selected text to the clipboard and removes the selection."); + "Copies the selected text to the clipboard and removes the selection.", ""); DocDeclStr( virtual void , Paste(), - "Pastes text from the clipboard to the text field."); + "Pastes text from the clipboard to the text field.", ""); DocDeclStr( virtual void , SetInsertionPoint(long pos), - "Sets the insertion point in the combobox text field."); + "Sets the insertion point in the combobox text field.", ""); DocDeclStr( virtual long , GetInsertionPoint() const, - "Returns the insertion point for the combobox's text field."); + "Returns the insertion point for the combobox's text field.", ""); DocDeclStr( virtual long , GetLastPosition() const, - "Returns the last position in the combobox text field."); + "Returns the last position in the combobox text field.", ""); DocDeclStr( virtual void , Replace(long from, long to, const wxString& value), - "Replaces the text between two positions with the given text, in the\n" - "combobox text field."); + "Replaces the text between two positions with the given text, in the +combobox text field.", ""); DocDeclStr( void , SetSelection(int n), - "Sets the item at index 'n' to be the selected item."); + "Sets the item at index 'n' to be the selected item.", ""); DocDeclStrName( virtual void , SetSelection(long from, long to), - "Selects the text between the two positions in the combobox text field.", + "Selects the text between the two positions in the combobox text field.", "", SetMark); DocDeclStr( bool , SetStringSelection(const wxString& string), - "Select the item with the specifed string"); + "Select the item with the specifed string", ""); DocDeclStr( void , SetString(int n, const wxString& string), - "Set the label for the n'th item (zero based) in the list."); + "Set the label for the n'th item (zero based) in the list.", ""); DocDeclStr( virtual void , SetEditable(bool editable), - ""); + "", ""); DocDeclStr( virtual void , SetInsertionPointEnd(), - "Sets the insertion point at the end of the combobox text field."); + "Sets the insertion point at the end of the combobox text field.", ""); DocDeclStr( virtual void , Remove(long from, long to), - "Removes the text between the two positions in the combobox text field."); + "Removes the text between the two positions in the combobox text field.", ""); static wxVisualAttributes GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); diff --git a/wxPython/src/_config.i b/wxPython/src/_config.i index ec06be39c7..a0a2bf2660 100644 --- a/wxPython/src/_config.i +++ b/wxPython/src/_config.i @@ -47,24 +47,23 @@ enum DocStr(wxConfigBase, "wx.ConfigBase class defines the basic interface of all config -classes. It can not be used by itself (it is an abstract base -class) and you will always use one of its derivations: wx.Config -or wx.FileConfig. - -wx.ConfigBase organizes the items in a tree-like structure, -modeled after the Unix/Dos filesystem. There are groups that act -like directories and entries, key/value pairs that act like -files. There is always one current group given by the current -path. As in the file system case, to specify a key in the config -class you must use a path to it. Config classes also support the -notion of the current group, which makes it possible to use -relative paths. +classes. It can not be used by itself (it is an abstract base class) +and you will always use one of its derivations: wx.Config or +wx.FileConfig. + +wx.ConfigBase organizes the items in a tree-like structure, modeled +after the Unix/Dos filesystem. There are groups that act like +directories and entries, key/value pairs that act like files. There +is always one current group given by the current path. As in the file +system case, to specify a key in the config class you must use a path +to it. Config classes also support the notion of the current group, +which makes it possible to use relative paths. Keys are pairs \"key_name = value\" where value may be of string, integer floating point or boolean, you can not store binary data -without first encoding it as a string. For performance reasons -items should be kept small, no more than a couple kilobytes. -"); +without first encoding it as a string. For performance reasons items +should be kept small, no more than a couple kilobytes. +", ""); class wxConfigBase { @@ -88,50 +87,51 @@ public: DocDeclStr( static wxConfigBase *, Set(wxConfigBase *config), - "Sets the global config object (the one returned by Get) and\n" - "returns a reference to the previous global config object."); + "Sets the global config object (the one returned by Get) and returns a +reference to the previous global config object.", ""); DocDeclStr( static wxConfigBase *, Get(bool createOnDemand = True), - "Returns the current global config object, creating one if neccessary."); + "Returns the current global config object, creating one if neccessary.", ""); DocDeclStr( static wxConfigBase *, Create(), - "Create and return a new global config object. This function will\n" - "create the \"best\" implementation of wx.Config available for the\n" - "current platform."); + "Create and return a new global config object. This function will +create the \"best\" implementation of wx.Config available for the +current platform.", ""); DocDeclStr( static void , DontCreateOnDemand(), - "Should Get() try to create a new log object if there isn't a current one?"); + "Should Get() try to create a new log object if there isn't a current +one?", ""); DocDeclStr( virtual void , SetPath(const wxString& path), - "Set current path: if the first character is '/', it's the absolute path,\n" - "otherwise it's a relative path. '..' is supported. If the strPath\n" - "doesn't exist it is created."); + "Set current path: if the first character is '/', it's the absolute +path, otherwise it's a relative path. '..' is supported. If the +strPath doesn't exist it is created.", ""); DocDeclStr( virtual const wxString& , GetPath() const, - "Retrieve the current path (always as absolute path)"); + "Retrieve the current path (always as absolute path)", ""); %extend { DocAStr(GetFirstGroup, "GetFirstGroup() -> (more, value, index)", - "Allows enumerating the subgroups in a config object. Returns\n" - "a tuple containing a flag indicating there are more items, the\n" - "name of the current item, and an index to pass to GetNextGroup to\n" - "fetch the next item."); + "Allows enumerating the subgroups in a config object. Returns a tuple +containing a flag indicating there are more items, the name of the +current item, and an index to pass to GetNextGroup to fetch the next +item.", ""); PyObject* GetFirstGroup() { bool cont; long index = 0; @@ -145,10 +145,10 @@ public: DocAStr(GetNextGroup, "GetNextGroup(long index) -> (more, value, index)", - "Allows enumerating the subgroups in a config object. Returns\n" - "a tuple containing a flag indicating there are more items, the\n" - "name of the current item, and an index to pass to GetNextGroup to\n" - "fetch the next item."); + "Allows enumerating the subgroups in a config object. Returns a tuple +containing a flag indicating there are more items, the name of the +current item, and an index to pass to GetNextGroup to fetch the next +item.", ""); PyObject* GetNextGroup(long index) { bool cont; wxString value; @@ -160,10 +160,10 @@ public: DocAStr(GetFirstEntry, "GetFirstEntry() -> (more, value, index)", - "Allows enumerating the entries in the current group in a config\n" - "object. Returns a tuple containing a flag indicating there are\n" - "more items, the name of the current item, and an index to pass to\n" - "GetNextGroup to fetch the next item."); + "Allows enumerating the entries in the current group in a config +object. Returns a tuple containing a flag indicating there are more +items, the name of the current item, and an index to pass to +GetNextGroup to fetch the next item.", ""); PyObject* GetFirstEntry() { bool cont; long index = 0; @@ -176,10 +176,10 @@ public: DocAStr(GetNextEntry, "GetNextEntry(long index) -> (more, value, index)", - "Allows enumerating the entries in the current group in a config\n" - "object. Returns a tuple containing a flag indicating there are\n" - "more items, the name of the current item, and an index to pass to\n" - "GetNextGroup to fetch the next item."); + "Allows enumerating the entries in the current group in a config +object. Returns a tuple containing a flag indicating there are more +items, the name of the current item, and an index to pass to +GetNextGroup to fetch the next item.", ""); PyObject* GetNextEntry(long index) { bool cont; wxString value; @@ -193,46 +193,46 @@ public: DocDeclStr( virtual size_t , GetNumberOfEntries(bool recursive = False) const, - "Get the number of entries in the current group, with or\n" - "without its subgroups."); + "Get the number of entries in the current group, with or without its +subgroups.", ""); DocDeclStr( virtual size_t , GetNumberOfGroups(bool recursive = False) const, - "Get the number of subgroups in the current group, with or\n" - "without its subgroups."); + "Get the number of subgroups in the current group, with or without its +subgroups.", ""); DocDeclStr( virtual bool , HasGroup(const wxString& name) const, - "Returns True if the group by this name exists"); + "Returns True if the group by this name exists", ""); DocDeclStr( virtual bool , HasEntry(const wxString& name) const, - "Returns True if the entry by this name exists"); + "Returns True if the entry by this name exists", ""); DocDeclStr( bool , Exists(const wxString& name) const, - "Returns True if either a group or an entry with a given name exists"); + "Returns True if either a group or an entry with a given name exists", ""); // get the entry type DocDeclStr( virtual EntryType , GetEntryType(const wxString& name) const, - "Get the type of the entry. Returns one of the wx.Config.Type_XXX values."); + "Get the type of the entry. Returns one of the wx.Config.Type_XXX values.", ""); DocDeclStr( wxString , Read(const wxString& key, const wxString& defaultVal = wxPyEmptyString), - "Returns the value of key if it exists, defaultVal otherwise."); + "Returns the value of key if it exists, defaultVal otherwise.", ""); %extend { DocStr(ReadInt, - "Returns the value of key if it exists, defaultVal otherwise."); + "Returns the value of key if it exists, defaultVal otherwise.", ""); long ReadInt(const wxString& key, long defaultVal = 0) { long rv; self->Read(key, &rv, defaultVal); @@ -240,7 +240,7 @@ public: } DocStr(ReadFloat, - "Returns the value of key if it exists, defaultVal otherwise."); + "Returns the value of key if it exists, defaultVal otherwise.", ""); double ReadFloat(const wxString& key, double defaultVal = 0.0) { double rv; self->Read(key, &rv, defaultVal); @@ -248,7 +248,7 @@ public: } DocStr(ReadBool, - "Returns the value of key if it exists, defaultVal otherwise."); + "Returns the value of key if it exists, defaultVal otherwise.", ""); bool ReadBool(const wxString& key, bool defaultVal = False) { bool rv; self->Read(key, &rv, defaultVal); @@ -260,40 +260,40 @@ public: // write the value (return True on success) DocDeclStr( bool , Write(const wxString& key, const wxString& value), - "write the value (return True on success)"); + "write the value (return True on success)", ""); DocDeclStrName( bool, Write(const wxString& key, long value), - "write the value (return True on success)", + "write the value (return True on success)", "", WriteInt); DocDeclStrName( bool, Write(const wxString& key, double value), - "write the value (return True on success)", + "write the value (return True on success)", "", WriteFloat); DocDeclStrName( bool, Write(const wxString& key, bool value), - "write the value (return True on success)", + "write the value (return True on success)", "", WriteBool); DocDeclStr( virtual bool , Flush(bool currentOnly = False), - "permanently writes all changes"); + "permanently writes all changes", ""); DocDeclStr( virtual bool , RenameEntry(const wxString& oldName, const wxString& newName), - "Rename an entry. Returns False on failure (probably because the new\n" - "name is already taken by an existing entry)"); + "Rename an entry. Returns False on failure (probably because the new +name is already taken by an existing entry)", ""); DocDeclStr( virtual bool , RenameGroup(const wxString& oldName, const wxString& newName), - "Rename aa group. Returns False on failure (probably because the new\n" - "name is already taken by an existing entry)"); + "Rename a group. Returns False on failure (probably because the new +name is already taken by an existing entry)", ""); // deletes the specified entry and the group it belongs to if @@ -301,71 +301,72 @@ public: DocDeclStr( virtual bool , DeleteEntry(const wxString& key, bool deleteGroupIfEmpty = True), - "Deletes the specified entry and the group it belongs to if\n" - "it was the last key in it and the second parameter is True"); + "Deletes the specified entry and the group it belongs to if it was the +last key in it and the second parameter is True", ""); DocDeclStr( virtual bool , DeleteGroup(const wxString& key), - "Delete the group (with all subgroups)"); + "Delete the group (with all subgroups)", ""); DocDeclStr( virtual bool , DeleteAll(), - "Delete the whole underlying object (disk file, registry key, ...)\n" - "primarly intended for use by deinstallation routine."); + "Delete the whole underlying object (disk file, registry key, ...) +primarly intended for use by deinstallation routine.", ""); DocDeclStr( void , SetExpandEnvVars(bool doIt = True), - "We can automatically expand environment variables in the config entries\n" - "(this option is on by default, you can turn it on/off at any time)"); + "We can automatically expand environment variables in the config +entries this option is on by default, you can turn it on/off at any +time)", ""); DocDeclStr( bool , IsExpandingEnvVars() const, - "Are we currently expanding environment variables?"); + "Are we currently expanding environment variables?", ""); DocDeclStr( void , SetRecordDefaults(bool doIt = True), - "Set whether the config objec should record default values."); + "Set whether the config objec should record default values.", ""); DocDeclStr( bool , IsRecordingDefaults() const, - "Are we currently recording default values?"); + "Are we currently recording default values?", ""); DocDeclStr( wxString , ExpandEnvVars(const wxString& str) const, - "Expand any environment variables in str and return the result"); + "Expand any environment variables in str and return the result", ""); DocDeclStr( wxString , GetAppName() const, - ""); + "", ""); DocDeclStr( wxString , GetVendorName() const, - ""); + "", ""); DocDeclStr( void , SetAppName(const wxString& appName), - ""); + "", ""); DocDeclStr( void , SetVendorName(const wxString& vendorName), - ""); + "", ""); DocDeclStr( void , SetStyle(long style), - ""); + "", ""); DocDeclStr( long , GetStyle() const, - ""); + "", ""); }; @@ -374,7 +375,7 @@ public: DocStr(wxConfig, "This ConfigBase-derived class will use the registry on Windows, -and will be a wx.FileConfig on other platforms."); +and will be a wx.FileConfig on other platforms.", ""); class wxConfig : public wxConfigBase { public: @@ -384,7 +385,7 @@ public: const wxString& localFilename = wxPyEmptyString, const wxString& globalFilename = wxPyEmptyString, long style = wxCONFIG_USE_LOCAL_FILE | wxCONFIG_USE_GLOBAL_FILE), - ""); + "", ""); ~wxConfig(); }; @@ -393,7 +394,7 @@ public: DocStr(wxFileConfig, - "This config class will use a file for storage on all platforms."); + "This config class will use a file for storage on all platforms.", ""); class wxFileConfig : public wxConfigBase { public: @@ -403,7 +404,7 @@ public: const wxString& localFilename = wxPyEmptyString, const wxString& globalFilename = wxPyEmptyString, long style = wxCONFIG_USE_LOCAL_FILE | wxCONFIG_USE_GLOBAL_FILE), - ""); + "", ""); ~wxFileConfig(); }; @@ -412,23 +413,23 @@ public: //--------------------------------------------------------------------------- DocStr(wxConfigPathChanger, -"A handy little class which changes current path to the path of -given entry and restores it in the destructoir: so if you declare -a local variable of this type, you work in the entry directory -and the path is automatically restored when the function returns."); +"A handy little class which changes current path to the path of given +entry and restores it in the destructoir: so if you declare a local +variable of this type, you work in the entry directory and the path is +automatically restored when the function returns.", ""); class wxConfigPathChanger { public: DocCtorStr( wxConfigPathChanger(const wxConfigBase *config, const wxString& entry), - ""); + "", ""); ~wxConfigPathChanger(); DocDeclStr( const wxString& , Name() const, - "Get the key name"); + "Get the key name", ""); }; @@ -438,10 +439,10 @@ public: DocDeclStr( wxString , wxExpandEnvVars(const wxString &sz), - "Replace environment variables ($SOMETHING) with their values. The\n" - "format is $VARNAME or ${VARNAME} where VARNAME contains\n" - "alphanumeric characters and '_' only. '$' must be escaped ('\$')\n" - "in order to be taken literally."); + "Replace environment variables ($SOMETHING) with their values. The +format is $VARNAME or ${VARNAME} where VARNAME contains alphanumeric +characters and '_' only. '$' must be escaped ('\$') in order to be +taken literally.", ""); diff --git a/wxPython/src/_constraints.i b/wxPython/src/_constraints.i index 664e8bff30..13ceba74f9 100644 --- a/wxPython/src/_constraints.i +++ b/wxPython/src/_constraints.i @@ -43,51 +43,58 @@ enum wxRelationship DocStr(wxIndividualLayoutConstraint, -"Objects of this class are stored in the wx.LayoutConstraint class as one of -eight possible constraints that a window can be involved in. You will never -need to create an instance of wx.IndividualLayoutConstraint, rather you should -use create a wx.LayoutContstraints instance and use the individual contstraints -that it contains. +"Objects of this class are stored in the `wx.LayoutConstraints` class as +one of eight possible constraints that a window can be involved in. +You will never need to create an instance of +wx.IndividualLayoutConstraint, rather you should create a +`wx.LayoutConstraints` instance and use the individual contstraints +that it contains.", " -Constraints are initially set to have the relationship wx.Unconstrained, which -means that their values should be calculated by looking at known constraints. +Constraints are initially set to have the relationship +wx.Unconstrained, which means that their values should be calculated +by looking at known constraints. The Edge specifies the type of edge or dimension of a window. - Edges - - wx.Left The left edge. - wx.Top The top edge. - wx.Right The right edge. - wx.Bottom The bottom edge. - wx.CentreX The x-coordinate of the centre of the window. - wx.CentreY The y-coordinate of the centre of the window. - - -The Relationship specifies the relationship that this edge or dimension has -with another specified edge or dimension. Normally, the user doesn't use these -directly because functions such as Below and RightOf are a convenience for -using the more general Set function. - - Relationships - - wx.Unconstrained The edge or dimension is unconstrained +Edges +------ + ================== ============================================== + wx.Left The left edge. + wx.Top The top edge. + wx.Right The right edge. + wx.Bottom The bottom edge. + wx.CentreX The x-coordinate of the centre of the window. + wx.CentreY The y-coordinate of the centre of the window. + ================== ============================================== + + +The Relationship specifies the relationship that this edge or +dimension has with another specified edge or dimension. Normally, the +user doesn't use these directly because functions such as Below and +RightOf are a convenience for using the more general Set function. + +Relationships +------------- + ================== ============================================== + wx.Unconstrained The edge or dimension is unconstrained (the default for edges.) - wx.AsIs The edge or dimension is to be taken from the current + wx.AsIs The edge or dimension is to be taken from the current window position or size (the default for dimensions.) - wx.Above The edge should be above another edge. - wx.Below The edge should be below another edge. - wx.LeftOf The edge should be to the left of another edge. - wx.RightOf The edge should be to the right of another edge. - wx.SameAs The edge or dimension should be the same as another edge + wx.Above The edge should be above another edge. + wx.Below The edge should be below another edge. + wx.LeftOf The edge should be to the left of another edge. + wx.RightOf The edge should be to the right of another edge. + wx.SameAs The edge or dimension should be the same as another edge or dimension. - wx.PercentOf The edge or dimension should be a percentage of another + wx.PercentOf The edge or dimension should be a percentage of another edge or dimension. - wx.Absolute The edge or dimension should be a given absolute value. + wx.Absolute The edge or dimension should be a given absolute value. + ================== ============================================== +:see: `wx.LayoutConstraints`, `wx.Window.SetConstraints` "); -// wxIndividualLayoutConstraint: a constraint on window position + class wxIndividualLayoutConstraint : public wxObject { public: @@ -97,123 +104,141 @@ public: DocDeclStr( void , Set(wxRelationship rel, wxWindow *otherW, wxEdge otherE, int val = 0, int marg = wxLAYOUT_DEFAULT_MARGIN), - ""); + "Sets the properties of the constraint. Normally called by one of the +convenience functions such as Above, RightOf, SameAs.", ""); DocDeclStr( void , LeftOf(wxWindow *sibling, int marg = 0), - "Sibling relationship"); + "Constrains this edge to be to the left of the given window, with an +optional margin. Implicitly, this is relative to the left edge of the +other window.", ""); DocDeclStr( void , RightOf(wxWindow *sibling, int marg = 0), - "Sibling relationship"); + "Constrains this edge to be to the right of the given window, with an +optional margin. Implicitly, this is relative to the right edge of the +other window.", ""); DocDeclStr( void , Above(wxWindow *sibling, int marg = 0), - "Sibling relationship"); + "Constrains this edge to be above the given window, with an optional +margin. Implicitly, this is relative to the top edge of the other +window.", ""); DocDeclStr( void , Below(wxWindow *sibling, int marg = 0), - "Sibling relationship"); + "Constrains this edge to be below the given window, with an optional +margin. Implicitly, this is relative to the bottom edge of the other +window.", ""); DocDeclStr( void , SameAs(wxWindow *otherW, wxEdge edge, int marg = 0), - "'Same edge' alignment"); + "Constrains this edge or dimension to be to the same as the edge of the +given window, with an optional margin.", ""); DocDeclStr( void , PercentOf(wxWindow *otherW, wxEdge wh, int per), - "The edge is a percentage of the other window's edge"); + "Constrains this edge or dimension to be to a percentage of the given +window, with an optional margin.", ""); DocDeclStr( void , Absolute(int val), - "Edge has absolute value"); + "Constrains this edge or dimension to be the given absolute value.", ""); DocDeclStr( void , Unconstrained(), - "Dimension is unconstrained"); + "Sets this edge or dimension to be unconstrained, that is, dependent on +other edges and dimensions from which this value can be deduced.", ""); DocDeclStr( void , AsIs(), - "Dimension is 'as is' (use current size settings)"); + "Sets this edge or constraint to be whatever the window's value is at +the moment. If either of the width and height constraints are *as is*, +the window will not be resized, but moved instead. This is important +when considering panel items which are intended to have a default +size, such as a button, which may take its size from the size of the +button label.", ""); DocDeclStr( wxWindow *, GetOtherWindow(), - ""); + "", ""); DocDeclStr( wxEdge , GetMyEdge() const, - ""); + "", ""); DocDeclStr( void , SetEdge(wxEdge which), - ""); + "", ""); DocDeclStr( void , SetValue(int v), - ""); + "", ""); DocDeclStr( int , GetMargin(), - ""); + "", ""); DocDeclStr( void , SetMargin(int m), - ""); + "", ""); DocDeclStr( int , GetValue() const, - ""); + "", ""); DocDeclStr( int , GetPercent() const, - ""); + "", ""); DocDeclStr( int , GetOtherEdge() const, - ""); + "", ""); DocDeclStr( bool , GetDone() const, - ""); + "", ""); DocDeclStr( void , SetDone(bool d), - ""); + "", ""); DocDeclStr( wxRelationship , GetRelationship(), - ""); + "", ""); DocDeclStr( void , SetRelationship(wxRelationship r), - ""); + "", ""); DocDeclStr( bool , ResetIfWin(wxWindow *otherW), - "Reset constraint if it mentions otherWin"); + "Reset constraint if it mentions otherWin", ""); DocDeclStr( bool , SatisfyConstraint(wxLayoutConstraints *constraints, wxWindow *win), - "Try to satisfy constraint"); + "Try to satisfy constraint", ""); DocDeclStr( int , GetEdge(wxEdge which, wxWindow *thisWin, wxWindow *other) const, "Get the value of this edge or dimension, or if this\n" - "is not determinable, -1."); + "is not determinable, -1.", ""); }; DocStr(wxLayoutConstraints, -"Note: constraints are now deprecated and you should use sizers instead. +"**Note:** constraints are now deprecated and you should use sizers +instead. -Objects of this class can be associated with a window to define its layout -constraints, with respect to siblings or its parent. +Objects of this class can be associated with a window to define its +layout constraints, with respect to siblings or its parent. The class consists of the following eight constraints of class wx.IndividualLayoutConstraint, some or all of which should be accessed @@ -228,15 +253,18 @@ directly to set the appropriate constraints. * centreX: represents the horizontal centre point of the window * centreY: represents the vertical centre point of the window -Most constraints are initially set to have the relationship wxUnconstrained, -which means that their values should be calculated by looking at known -constraints. The exceptions are width and height, which are set to wxAsIs to -ensure that if the user does not specify a constraint, the existing width and -height will be used, to be compatible with panel items which often have take a -default size. If the constraint is wxAsIs, the dimension will not be changed. -"); +Most constraints are initially set to have the relationship +wxUnconstrained, which means that their values should be calculated by +looking at known constraints. The exceptions are width and height, +which are set to wxAsIs to ensure that if the user does not specify a +constraint, the existing width and height will be used, to be +compatible with panel items which often have take a default size. If +the constraint is ``wx.AsIs``, the dimension will not be changed. + +:see: `wx.IndividualLayoutConstraint`, `wx.Window.SetConstraints` +", ""); -// wxLayoutConstraints: the complete set of constraints for a window + class wxLayoutConstraints : public wxObject { public: @@ -260,7 +288,7 @@ public: DocCtorStr( wxLayoutConstraints(), - ""); + "", ""); DocDeclA( bool, SatisfyConstraints(wxWindow *win, int *OUTPUT), diff --git a/wxPython/src/_control.i b/wxPython/src/_control.i index 6e7e46de39..f681865741 100644 --- a/wxPython/src/_control.i +++ b/wxPython/src/_control.i @@ -24,8 +24,8 @@ MAKE_CONST_WXSTRING(ControlNameStr); DocStr(wxControl, "This is the base class for a control or 'widget'. -A control is generally a small window which processes user input and/or -displays one or more item of data."); +A control is generally a small window which processes user input +and/or displays one or more item of data.", ""); class wxControl : public wxWindow { @@ -41,12 +41,12 @@ public: long style=0, const wxValidator& validator=wxDefaultValidator, const wxString& name=wxPyControlNameStr), - "Create a Control. Normally you should only call this from a\n" - "subclass' __init__ as a plain old wx.Control is not very useful."); + "Create a Control. Normally you should only call this from a subclass' +__init__ as a plain old wx.Control is not very useful.", ""); DocCtorStrName( wxControl(), - "Precreate a Control control for 2-phase creation", + "Precreate a Control control for 2-phase creation", "", PreControl); DocDeclStr( @@ -57,21 +57,23 @@ public: long style=0, const wxValidator& validator=wxDefaultValidator, const wxString& name=wxPyControlNameStr), - "Do the 2nd phase and create the GUI control."); + "Do the 2nd phase and create the GUI control.", ""); DocDeclStr( void , Command(wxCommandEvent& event), - "Simulates the effect of the user issuing a command to the\n" - "item. See wx.CommandEvent."); + "Simulates the effect of the user issuing a command to the item. + +:see: `wx.CommandEvent` +", ""); DocDeclStr( wxString , GetLabel(), - "Return a control's text."); + "Return a control's text.", ""); DocDeclStr( void , SetLabel(const wxString& label), - "Sets the item's text."); + "Sets the item's text.", ""); static wxVisualAttributes @@ -85,18 +87,18 @@ public: DocStr(wxItemContainer, "wx.ItemContainer defines an interface which is implemented by all -controls which have string subitems, each of which may be -selected, such as wx.ListBox, wx.CheckListBox, wx.Choice and -wx.ComboBox (which implements an extended interface deriving from -this one) +controls which have string subitems, each of which may be selected, +such as `wx.ListBox`, `wx.CheckListBox`, `wx.Choice` as well as +`wx.ComboBox` which implements an extended interface deriving from +this one. -It defines the methods for accessing the control's items and -although each of the derived classes implements them differently, -they still all conform to the same interface. +It defines the methods for accessing the control's items and although +each of the derived classes implements them differently, they still +all conform to the same interface. -The items in a wx.ItemContainer have (non empty) string labels -and, optionally, client data associated with them. -"); +The items in a wx.ItemContainer have (non empty) string labels and, +optionally, client data associated with them. +", ""); class wxItemContainer { @@ -106,10 +108,10 @@ public: %extend { DocStr(Append, - "Adds the item to the control, associating the given data with the\n" - "item if not None. The return value is the index of the newly\n" - "added item which may be different from the last one if the\n" - "control is sorted (e.g. has wx.LB_SORT or wx.CB_SORT style)."); + "Adds the item to the control, associating the given data with the item +if not None. The return value is the index of the newly added item +which may be different from the last one if the control is sorted (e.g. +has wx.LB_SORT or wx.CB_SORT style).", ""); int Append(const wxString& item, PyObject* clientData=NULL) { if (clientData) { wxPyClientData* data = new wxPyClientData(clientData); @@ -121,16 +123,16 @@ public: DocDeclStrName( void , Append(const wxArrayString& strings), - "Apend several items at once to the control. Notice that calling\n" - "this method may be much faster than appending the items one by\n" - "one if you need to add a lot of items.", + "Apend several items at once to the control. Notice that calling this +method may be much faster than appending the items one by one if you +need to add a lot of items.", "", AppendItems); %extend { DocStr(Insert, - "Insert an item into the control before the item at the pos index,\n" - "optionally associating some data object with the item."); + "Insert an item into the control before the item at the ``pos`` index, +optionally associating some data object with the item.", ""); int Insert(const wxString& item, int pos, PyObject* clientData=NULL) { if (clientData) { wxPyClientData* data = new wxPyClientData(clientData); @@ -143,65 +145,67 @@ public: DocDeclStr( virtual void , Clear(), - "Removes all items from the control."); + "Removes all items from the control.", ""); DocDeclStr( virtual void , Delete(int n), - "Deletes the item at the zero-based index 'n' from the control.\n" - "Note that it is an error (signalled by a PyAssertionError\n" - "exception if enabled) to remove an item with the index negative\n" - "or greater or equal than the number of items in the control."); + "Deletes the item at the zero-based index 'n' from the control. Note +that it is an error (signalled by a `wx.PyAssertionError` exception if +enabled) to remove an item with the index negative or greater or equal +than the number of items in the control.", ""); DocDeclStr( virtual int , GetCount() const, - "Returns the number of items in the control."); + "Returns the number of items in the control.", ""); DocDeclStr( bool , IsEmpty() const, - "Returns True if the control is empty or False if it has some items."); + "Returns True if the control is empty or False if it has some items.", ""); DocDeclStr( virtual wxString , GetString(int n) const, - "Returns the label of the item with the given index."); + "Returns the label of the item with the given index.", ""); DocDeclStr( wxArrayString , GetStrings() const, - ""); + "", ""); DocDeclStr( virtual void , SetString(int n, const wxString& s), - "Sets the label for the given item."); + "Sets the label for the given item.", ""); DocDeclStr( virtual int , FindString(const wxString& s) const, - "Finds an item whose label matches the given string. Returns the\n" - "zero-based position of the item, or wx.NOT_FOUND if the string\n" - "was not found."); + "Finds an item whose label matches the given string. Returns the +zero-based position of the item, or ``wx.NOT_FOUND`` if the string was not +found.", ""); DocDeclStr( virtual void , Select(int n), - "Sets the item at index 'n' to be the selected item."); + "Sets the item at index 'n' to be the selected item.", ""); %pythoncode { SetSelection = Select } DocDeclStr( virtual int , GetSelection() const, - "Returns the index of the selected item or wx.NOT_FOUND if no item is selected."); + "Returns the index of the selected item or ``wx.NOT_FOUND`` if no item +is selected.", ""); DocDeclStr( wxString , GetStringSelection() const, - "Returns the label of the selected item or an empty string if no item is selected."); + "Returns the label of the selected item or an empty string if no item +is selected.", ""); %extend { DocStr(GetClientData, - "Returns the client data associated with the given item, (if any.)"); + "Returns the client data associated with the given item, (if any.)", ""); PyObject* GetClientData(int n) { wxPyClientData* data = (wxPyClientData*)self->GetClientObject(n); if (data) { @@ -214,7 +218,7 @@ public: } DocStr(SetClientData, - "Associate the given client data with the item at position n."); + "Associate the given client data with the item at position n.", ""); void SetClientData(int n, PyObject* clientData) { wxPyClientData* data = new wxPyClientData(clientData); self->SetClientObject(n, data); @@ -228,9 +232,9 @@ public: %newgroup; DocStr(wxControlWithItems, -"wx.ControlWithItems combines the wx.ItemContainer class with the -wx.Control class, and is used for the base class of various -controls that have items."); +"wx.ControlWithItems combines the ``wx.ItemContainer`` class with the +wx.Control class, and is used for the base class of various controls +that have items.", ""); class wxControlWithItems : public wxControl, public wxItemContainer { diff --git a/wxPython/src/_cshelp.i b/wxPython/src/_cshelp.i index 445db16569..30a9ad44fd 100644 --- a/wxPython/src/_cshelp.i +++ b/wxPython/src/_cshelp.i @@ -38,28 +38,32 @@ EVT_DETAILED_HELP_RANGE = wx.PyEventBinder( wxEVT_DETAILED_HELP, 2) //---------------------------------------------------------------------- DocStr(wxHelpEvent, -"A help event is sent when the user has requested -context-sensitive help. This can either be caused by the -application requesting context-sensitive help mode via -wx.ContextHelp, or (on MS Windows) by the system generating a -WM_HELP message when the user pressed F1 or clicked on the query -button in a dialog caption. - -A help event is sent to the window that the user clicked on, and -is propagated up the window hierarchy until the event is -processed or there are no more event handlers. The application -should call event.GetId to check the identity of the clicked-on -window, and then either show some suitable help or call -event.Skip if the identifier is unrecognised. Calling Skip is -important because it allows wxWindows to generate further events -for ancestors of the clicked-on window. Otherwise it would be -impossible to show help for container windows, since processing -would stop after the first window found. - - Events +"A help event is sent when the user has requested context-sensitive +help. This can either be caused by the application requesting +context-sensitive help mode via wx.ContextHelp, or (on MS Windows) by +the system generating a WM_HELP message when the user pressed F1 or +clicked on the query button in a dialog caption. + +A help event is sent to the window that the user clicked on, and is +propagated up the window hierarchy until the event is processed or +there are no more event handlers. The application should call +event.GetId to check the identity of the clicked-on window, and then +either show some suitable help or call event.Skip if the identifier is +unrecognised. Calling Skip is important because it allows wxWindows to +generate further events for ancestors of the clicked-on +window. Otherwise it would be impossible to show help for container +windows, since processing would stop after the first window found.", +" + +Events +------- + ============== ========================================= EVT_HELP Sent when the user has requested context- sensitive help. EVT_HELP_RANGE Allows to catch EVT_HELP for a range of IDs + ============== ========================================= + +:see: `wx.ContextHelp`, `wx.ContextHelpButton` "); @@ -70,36 +74,36 @@ public: wxHelpEvent(wxEventType type = wxEVT_NULL, wxWindowID winid = 0, const wxPoint& pt = wxDefaultPosition), - ""); + "", ""); DocDeclStr( const wxPoint , GetPosition() const, - "Returns the left-click position of the mouse, in screen\n" - "coordinates. This allows the application to position the help\n" - "appropriately."); + "Returns the left-click position of the mouse, in screen +coordinates. This allows the application to position the help +appropriately.", ""); DocDeclStr( void , SetPosition(const wxPoint& pos), - "Sets the left-click position of the mouse, in screen coordinates."); + "Sets the left-click position of the mouse, in screen coordinates.", ""); DocDeclStr( const wxString& , GetLink() const, - "Get an optional link to further help"); + "Get an optional link to further help", ""); DocDeclStr( void , SetLink(const wxString& link), - "Set an optional link to further help"); + "Set an optional link to further help", ""); DocDeclStr( const wxString& , GetTarget() const, - "Get an optional target to display help in. E.g. a window specification"); + "Get an optional target to display help in. E.g. a window specification", ""); DocDeclStr( void , SetTarget(const wxString& target), - "Set an optional target to display help in. E.g. a window specification"); + "Set an optional target to display help in. E.g. a window specification", ""); }; @@ -107,52 +111,53 @@ public: DocStr(wxContextHelp, -"This class changes the cursor to a query and puts the application -into a 'context-sensitive help mode'. When the user left-clicks -on a window within the specified window, a EVT_HELP event is sent -to that control, and the application may respond to it by popping -up some help. +"This class changes the cursor to a query and puts the application into +a 'context-sensitive help mode'. When the user left-clicks on a window +within the specified window, a ``EVT_HELP`` event is sent to that +control, and the application may respond to it by popping up some +help. There are a couple of ways to invoke this behaviour implicitly: - * Use the wx.DIALOG_EX_CONTEXTHELP extended style for a - dialog (Windows only). This will put a question mark in the - titlebar, and Windows will put the application into - context-sensitive help mode automatically, with further - programming. + * Use the wx.DIALOG_EX_CONTEXTHELP extended style for a dialog + (Windows only). This will put a question mark in the titlebar, + and Windows will put the application into context-sensitive help + mode automatically, with further programming. + + * Create a `wx.ContextHelpButton`, whose predefined behaviour is + to create a context help object. Normally you will write your + application so that this button is only added to a dialog for + non-Windows platforms (use ``wx.DIALOG_EX_CONTEXTHELP`` on + Windows). - * Create a wx.ContextHelpButton, whose predefined behaviour - is to create a context help object. Normally you will write - your application so that this button is only added to a - dialog for non-Windows platforms (use - wx.DIALOG_EX_CONTEXTHELP on Windows). -"); +:see: `wx.ContextHelpButton` +", ""); class wxContextHelp : public wxObject { public: DocCtorStr( wxContextHelp(wxWindow* window = NULL, bool doNow = True), - "Constructs a context help object, calling BeginContextHelp if\n" - "doNow is true (the default).\n" - "\n" - "If window is None, the top window is used."); + "Constructs a context help object, calling BeginContextHelp if doNow is +true (the default). + +If window is None, the top window is used.", ""); ~wxContextHelp(); DocDeclStr( bool , BeginContextHelp(wxWindow* window = NULL), - "Puts the application into context-sensitive help mode. window is\n" - "the window which will be used to catch events; if NULL, the top\n" - "window will be used.\n" - "\n" - "Returns true if the application was successfully put into\n" - "context-sensitive help mode. This function only returns when the\n" - "event loop has finished."); + "Puts the application into context-sensitive help mode. window is the +window which will be used to catch events; if NULL, the top window +will be used. + +Returns true if the application was successfully put into +context-sensitive help mode. This function only returns when the event +loop has finished.", ""); DocDeclStr( bool , EndContextHelp(), - "Ends context-sensitive help mode. Not normally called by the\n" - "application."); + "Ends context-sensitive help mode. Not normally called by the +application.", ""); }; @@ -160,17 +165,18 @@ public: //---------------------------------------------------------------------- DocStr(wxContextHelpButton, -"Instances of this class may be used to add a question mark button -that when pressed, puts the application into context-help -mode. It does this by creating a wx.ContextHelp object which -itself generates a EVT_HELP event when the user clicks on a -window. - -On Windows, you may add a question-mark icon to a dialog by use -of the wx.DIALOG_EX_CONTEXTHELP extra style, but on other -platforms you will have to add a button explicitly, usually next -to OK, Cancel or similar buttons. -"); +"Instances of this class may be used to add a question mark button that +when pressed, puts the application into context-help mode. It does +this by creating a wx.ContextHelp object which itself generates a +``EVT_HELP`` event when the user clicks on a window. + +On Windows, you may add a question-mark icon to a dialog by use of the +``wx.DIALOG_EX_CONTEXTHELP`` extra style, but on other platforms you +will have to add a button explicitly, usually next to OK, Cancel or +similar buttons. + +:see: `wx.ContextHelp`, `wx.ContextHelpButton` +", ""); class wxContextHelpButton : public wxBitmapButton { public: @@ -181,7 +187,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW), - "Constructor, creating and showing a context help button."); + "Constructor, creating and showing a context help button.", ""); }; @@ -193,54 +199,51 @@ implementing context-sensitive help to show the help text for the given window. The current help provider must be explicitly set by the -application using wx.HelpProvider.Set()."); +application using wx.HelpProvider.Set().", ""); class wxHelpProvider { public: DocDeclStr( static wxHelpProvider *, Set(wxHelpProvider *helpProvider), - "Sset the current, application-wide help provider. Returns the\n" - "previous one. Unlike some other classes, the help provider is\n" - "not created on demand. This must be explicitly done by the\n" - "application."); + "Sset the current, application-wide help provider. Returns the previous +one. Unlike some other classes, the help provider is not created on +demand. This must be explicitly done by the application.", ""); DocDeclStr( static wxHelpProvider *, Get(), - "Return the current application-wide help provider."); + "Return the current application-wide help provider.", ""); DocDeclStr( wxString , GetHelp(const wxWindow *window), - "Gets the help string for this window. Its interpretation is\n" - "dependent on the help provider except that empty string always\n" - "means that no help is associated with the window."); + "Gets the help string for this window. Its interpretation is dependent +on the help provider except that empty string always means that no +help is associated with the window.", ""); DocDeclStr( bool , ShowHelp(wxWindow *window), - "Shows help for the given window. Uses GetHelp internally if\n" - "applicable.\n" - "\n" - "Returns true if it was done, or false if no help was available\n" - "for this window."); + "Shows help for the given window. Uses GetHelp internally if +applicable. Returns True if it was done, or False if no help was +available for this window.", ""); DocDeclStr( void , AddHelp(wxWindow *window, const wxString& text), - "Associates the text with the given window."); + "Associates the text with the given window.", ""); DocDeclStrName( void , AddHelp(wxWindowID id, const wxString& text), - "This version associates the given text with all windows with this\n" - "id. May be used to set the same help string for all Cancel\n" - "buttons in the application, for example.", + "This version associates the given text with all windows with this +id. May be used to set the same help string for all Cancel buttons in +the application, for example.", "", AddHelpById); DocDeclStr( void , RemoveHelp(wxWindow* window), - "Removes the association between the window pointer and the help\n" - "text. This is called by the wx.Window destructor. Without this,\n" - "the table of help strings will fill up and when window pointers\n" - "are reused, the wrong help string will be found."); + "Removes the association between the window pointer and the help +text. This is called by the wx.Window destructor. Without this, the +table of help strings will fill up and when window pointers are +reused, the wrong help string will be found.", ""); %extend { void Destroy() { delete self; } } @@ -250,9 +253,9 @@ public: //---------------------------------------------------------------------- DocStr(wxSimpleHelpProvider, -"wx.SimpleHelpProvider is an implementation of wx.HelpProvider -which supports only plain text help strings, and shows the string -associated with the control (if any) in a tooltip."); +"wx.SimpleHelpProvider is an implementation of `wx.HelpProvider` which +supports only plain text help strings, and shows the string associated +with the control (if any) in a tooltip.", ""); class wxSimpleHelpProvider : public wxHelpProvider { diff --git a/wxPython/src/_cursor.i b/wxPython/src/_cursor.i index b1e103f2aa..6b07a0ad67 100644 --- a/wxPython/src/_cursor.i +++ b/wxPython/src/_cursor.i @@ -17,21 +17,19 @@ DocStr(wxCursor, -"A cursor is a small bitmap usually used for denoting where the -mouse pointer is, with a picture that might indicate the -interpretation of a mouse click. +"A cursor is a small bitmap usually used for denoting where the mouse +pointer is, with a picture that might indicate the interpretation of a +mouse click. A single cursor object may be used in many windows (any subwindow -type). The wxWindows convention is to set the cursor for a -window, as in X, rather than to set it globally as in MS Windows, -although a global wx.SetCursor function is also available for use -on MS Windows."); - - -RefDoc(wxCursor::wxCursor(int id), -" - Stock Cursor IDs - +type). The wxWindows convention is to set the cursor for a window, as +in X, rather than to set it globally as in MS Windows, although a +global `wx.SetCursor` function is also available for use on MS Windows. +"," + +Stock Cursor IDs +----------------- + ======================== ====================================== wx.CURSOR_ARROW A standard arrow cursor. wx.CURSOR_RIGHT_ARROW A standard arrow cursor pointing to the right. wx.CURSOR_BLANK Transparent cursor. @@ -59,6 +57,7 @@ RefDoc(wxCursor::wxCursor(int id), wx.CURSOR_WAIT A wait cursor. wx.CURSOR_WATCH A watch cursor. wx.CURSOR_ARROWWAIT A cursor with both an arrow and an hourglass, (windows.) + ======================== ====================================== "); @@ -66,16 +65,14 @@ class wxCursor : public wxGDIObject { public: - RefDoc(wxCursor, ""); // turn it off for the ctors - %extend { DocStr(wxCursor, - "Construct a Cursor from a file. Specify the type of file using\n" - "wx.BITAMP_TYPE* constants, and specify the hotspot if not using a\n" - ".cur file.\n" - "\n" - "This cursor is not available on wxGTK, use wx.StockCursor,\n" - "wx.CursorFromImage, or wx.CursorFromBits instead."); + "Construct a Cursor from a file. Specify the type of file using +wx.BITAMP_TYPE* constants, and specify the hotspot if not using a cur +file. + +This constructor is not available on wxGTK, use ``wx.StockCursor``, +``wx.CursorFromImage``, or ``wx.CursorFromBits`` instead.", ""); wxCursor(const wxString* cursorName, long type, int hotSpotX=0, int hotSpotY=0) { %#ifdef __WXGTK__ wxCHECK_MSG(False, NULL, @@ -90,24 +87,26 @@ public: DocCtorStrName( wxCursor(int id), - "Create a cursor using one of the stock cursors. Note that not\n" - "all cursors are available on all platforms.", + "Create a cursor using one of the stock cursors. Note that not all +cursors are available on all platforms.", "", StockCursor); DocCtorStrName( wxCursor(const wxImage& image), - "Constructs a cursor from a wxImage. The cursor is monochrome,\n" - "colors with the RGB elements all greater than 127 will be\n" - "foreground, colors less than this background. The mask (if any)\n" - "will be used as transparent.\n" - "\n" - "In MSW the foreground will be white and the background black. The\n" - "cursor is resized to 32x32 In GTK, the two most frequent colors\n" - "will be used for foreground and background. The cursor will be\n" - "displayed at the size of the image. On MacOS the cursor is\n" - "resized to 16x16 and currently only shown as black/white (mask\n" - "respected).", + "Constructs a cursor from a wxImage. The cursor is monochrome, colors +with the RGB elements all greater than 127 will be foreground, colors +less than this background. The mask (if any) will be used as +transparent.", +" +In MSW the foreground will be white and the background +black. The cursor is resized to 32x32. + +In GTK, the two most frequent colors will be used for foreground and +background. The cursor will be displayed at the size of the image. + +On MacOS the cursor is resized to 16x16 and currently only shown as +black/white (mask respected).", CursorFromImage); @@ -132,11 +131,11 @@ public: #ifdef __WXMSW__ DocDeclStr( long , GetHandle(), - "Get the MS Windows handle for the cursor"); + "Get the MS Windows handle for the cursor", ""); %extend { DocStr(SetHandle, - "Set the MS Windows handle to use for the cursor"); + "Set the MS Windows handle to use for the cursor", ""); void SetHandle(long handle) { self->SetHandle((WXHANDLE)handle); } } @@ -144,7 +143,7 @@ public: DocDeclStr( bool , Ok(), - ""); + "", ""); %pythoncode { def __nonzero__(self): return self.Ok() } @@ -152,31 +151,31 @@ public: #ifdef __WXMSW__ DocDeclStr( int , GetWidth(), - ""); + "", ""); DocDeclStr( int , GetHeight(), - ""); + "", ""); DocDeclStr( int , GetDepth(), - ""); + "", ""); DocDeclStr( void , SetWidth(int w), - ""); + "", ""); DocDeclStr( void , SetHeight(int h), - ""); + "", ""); DocDeclStr( void , SetDepth(int d), - ""); + "", ""); DocDeclStr( void , SetSize(const wxSize& size), - ""); + "", ""); #endif diff --git a/wxPython/src/_dataobj.i b/wxPython/src/_dataobj.i index 3730132cb2..ad1b320dc3 100644 --- a/wxPython/src/_dataobj.i +++ b/wxPython/src/_dataobj.i @@ -50,45 +50,47 @@ enum wxDataFormatId DocStr(wxDataFormat, "A wx.DataFormat is an encapsulation of a platform-specific format -handle which is used by the system for the clipboard and drag and -drop operations. The applications are usually only interested in, -for example, pasting data from the clipboard only if the data is -in a format the program understands. A data format is is used to -uniquely identify this format. - -On the system level, a data format is usually just a number -(CLIPFORMAT under Windows or Atom under X11, for example)."); - -// The standard format IDs are - -// wx.DF_INVALID An invalid format -// wx.DF_TEXT Text format -// wx.DF_BITMAP A bitmap (wx.Bitmap) -// wx.DF_METAFILE A metafile (wx.Metafile, Windows only) -// wx.DF_FILENAME A list of filenames -// wx.DF_HTML An HTML string. This is only valid on Windows and non-unicode builds - -// Aside the standard formats, the application may also use -// custom formats which are identified by their names (strings) -// and not numeric identifiers. Although internally custom format -// must be created (or registered) first, you shouldn\'t care -// about it because it is done automatically the first time the -// wxDataFormat object corresponding to a given format name is -// created. - -// "); +handle which is used by the system for the clipboard and drag and drop +operations. The applications are usually only interested in, for +example, pasting data from the clipboard only if the data is in a +format the program understands. A data format is is used to uniquely +identify this format.", +" +On the system level, a data format is usually just a number, (which +may be the CLIPFORMAT under Windows or Atom under X11, for example.) + +The standard format IDs are: + + ================ ===================================== + wx.DF_INVALID An invalid format + wx.DF_TEXT Text format + wx.DF_BITMAP A bitmap (wx.Bitmap) + wx.DF_METAFILE A metafile (wx.Metafile, Windows only) + wx.DF_FILENAME A list of filenames + wx.DF_HTML An HTML string. This is only valid on + Windows and non-unicode builds + ================ ===================================== + +Aside the standard formats, the application may also use custom +formats which are identified by their names (strings) and not numeric +identifiers. Although internally custom format must be created (or +registered) first, you shouldn\'t care about it because it is done +automatically the first time the wxDataFormat object corresponding to +a given format name is created. + +"); class wxDataFormat { public: DocCtorStr( wxDataFormat( wxDataFormatId type ), - "Constructs a data format object for one of the standard data\n" - "formats or an empty data object (use SetType or SetId later in\n" - "this case)"); + "Constructs a data format object for one of the standard data formats +or an empty data object (use SetType or SetId later in this case)", ""); DocCtorStrName( wxDataFormat(const wxString& format), - "Constructs a data format object for a custom format identified by its name.", + "Constructs a data format object for a custom format identified by its +name.", "", CustomDataFormat); ~wxDataFormat(); @@ -104,20 +106,22 @@ public: DocDeclStr( void , SetType(wxDataFormatId format), - "Sets the format to the given value, which should be one of wx.DF_XXX constants."); + "Sets the format to the given value, which should be one of wx.DF_XXX +constants.", ""); DocDeclStr( wxDataFormatId , GetType() const, - "Returns the platform-specific number identifying the format."); + "Returns the platform-specific number identifying the format.", ""); DocDeclStr( wxString , GetId() const, - "Returns the name of a custom format (this function will fail for a standard format)."); + "Returns the name of a custom format (this function will fail for a +standard format).", ""); DocDeclStr( void , SetId(const wxString& format), - "Sets the format to be the custom format identified by the given name."); + "Sets the format to be the custom format identified by the given name.", ""); }; diff --git a/wxPython/src/_datetime.i b/wxPython/src/_datetime.i index dd08788512..e1d03a945b 100644 --- a/wxPython/src/_datetime.i +++ b/wxPython/src/_datetime.i @@ -366,7 +366,7 @@ public: DocDeclAStr( static void, GetAmPmStrings(wxString *OUTPUT, wxString *OUTPUT), "GetAmPmStrings() -> (am, pm)", - "Get the AM and PM strings in the current locale (may be empty)"); + "Get the AM and PM strings in the current locale (may be empty)", ""); // return True if the given country uses DST for this year static bool IsDSTApplicable(int year = Inv_Year, diff --git a/wxPython/src/_dc.i b/wxPython/src/_dc.i index 95dd16cf47..019e621698 100644 --- a/wxPython/src/_dc.i +++ b/wxPython/src/_dc.i @@ -302,15 +302,16 @@ public: DocDeclAStr( void, GetTextExtent(const wxString& string, wxCoord *OUTPUT, wxCoord *OUTPUT), "GetTextExtent(wxString string) -> (width, height)", - "Get the width and height of the text using the current font.\n" - "Only works for single line strings."); + "Get the width and height of the text using the current font. Only +works for single line strings.", ""); + DocDeclAStrName( void, GetTextExtent(const wxString& string, wxCoord *OUTPUT, wxCoord *OUTPUT, wxCoord *OUTPUT, wxCoord* OUTPUT, wxFont* font = NULL), "GetFullTextExtent(wxString 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.\n" - "Only works for single line strings.", + "Get the width, height, decent and leading of the text using the +current or specified font. Only works for single line strings.", "", GetFullTextExtent); @@ -320,8 +321,9 @@ public: wxCoord *OUTPUT, wxCoord *OUTPUT, wxCoord *OUTPUT, wxFont *font = NULL), "GetMultiLineTextExtent(wxString 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.\n" - "Works for single as well as multi-line strings."); + "Get the width, height, decent and leading of the text using the +current or specified font. Works for single as well as multi-line +strings.", ""); %extend { @@ -336,7 +338,7 @@ public: // size and resolution // ------------------- - DocStr(GetSize, "Get the DC size in device units."); + DocStr(GetSize, "Get the DC size in device units.", ""); wxSize GetSize(); DocDeclAName( void, GetSize( int *OUTPUT, int *OUTPUT ), @@ -344,7 +346,7 @@ public: GetSizeTuple); - DocStr(GetSizeMM, "Get the DC size in milimeters."); + DocStr(GetSizeMM, "Get the DC size in milimeters.", ""); wxSize GetSizeMM() const; DocDeclAName( void, GetSizeMM( int *OUTPUT, int *OUTPUT ) const, diff --git a/wxPython/src/_defs.i b/wxPython/src/_defs.i index c887d74f81..e384cee753 100644 --- a/wxPython/src/_defs.i +++ b/wxPython/src/_defs.i @@ -83,44 +83,74 @@ typedef unsigned char byte; -// Macros for the docstring and autodoc features of SWIG. +//---------------------------------------------------------------------- +// Macros for the docstring and autodoc features of SWIG. These will +// help make the code look more readable, and pretty, as well as help +// reduce typing in some cases. // Set the docsring for the given full or partial declaration -%define DocStr(decl, docstr) - %feature("docstring") decl docstr; - //%feature("refdoc") decl ""; -%enddef +#ifdef _DO_FULL_DOCS + %define DocStr(decl, docstr, details) + %feature("docstring") decl docstr details; + %enddef +#else + %define DocStr(decl, docstr, details) + %feature("docstring") decl docstr; + %enddef +#endif + // Set the autodoc string for a full or partial declaration %define DocA(decl, astr) %feature("autodoc") decl astr; %enddef -// Set both the autodoc and docstring for a full or partial declaration -%define DocAStr(decl, astr, docstr) - %feature("autodoc") decl astr; - %feature("docstring") decl docstr -%enddef - -// Set the detailed reference docs for full or partial declaration -#define DocRef(decl, str) %feature("docref") decl str +// Set both the autodoc and docstring for a full or partial declaration +#ifdef _DO_FULL_DOCS + %define DocAStr(decl, astr, docstr, details) + %feature("autodoc") decl astr; + %feature("docstring") decl docstr details + %enddef +#else + %define DocAStr(decl, astr, docstr, details) + %feature("autodoc") decl astr; + %feature("docstring") decl docstr + %enddef +#endif + // Set the docstring for a decl and then define the decl too. Must use the // full declaration of the item. -%define DocDeclStr(type, decl, docstr) - %feature("docstring") decl docstr; - type decl -%enddef +#ifdef _DO_FULL_DOCS + %define DocDeclStr(type, decl, docstr, details) + %feature("docstring") decl docstr details; + type decl + %enddef +#else + %define DocDeclStr(type, decl, docstr, details) + %feature("docstring") decl docstr; + type decl + %enddef +#endif + + // As above, but also give the decl a new %name -%define DocDeclStrName(type, decl, docstr, newname) - %feature("docstring") decl docstr; - %name(newname) type decl -%enddef - +#ifdef _DO_FULL_DOCS + %define DocDeclStrName(type, decl, docstr, details, newname) + %feature("docstring") decl docstr details; + %name(newname) type decl + %enddef +#else + %define DocDeclStrName(type, decl, docstr, details, newname) + %feature("docstring") decl docstr; + %name(newname) type decl + %enddef +#endif + // Set the autodoc string for a decl and then define the decl too. Must use the // full declaration of the item. @@ -139,72 +169,117 @@ typedef unsigned char byte; // Set the autodoc and the docstring for a decl and then define the decl too. // Must use the full declaration of the item. -%define DocDeclAStr(type, decl, astr, docstr) - %feature("autodoc") decl astr; - %feature("docstring") decl docstr; - type decl -%enddef +#ifdef _DO_FULL_DOCS + %define DocDeclAStr(type, decl, astr, details, docstr) + %feature("autodoc") decl astr; + %feature("docstring") decl docstr details; + type decl + %enddef +#else + %define DocDeclAStr(type, decl, astr, details, docstr) + %feature("autodoc") decl astr; + %feature("docstring") decl docstr; + type decl + %enddef +#endif + // As above, but also give the decl a new %name -%define DocDeclAStrName(type, decl, astr, docstr, newname) - %feature("autodoc") decl astr; - %feature("docstring") decl docstr; - %name(newname) type decl -%enddef - +#ifdef _DO_FULL_DOCS + %define DocDeclAStrName(type, decl, astr, docstr, details, newname) + %feature("autodoc") decl astr; + %feature("docstring") decl docstr details; + %name(newname) type decl + %enddef +#else + %define DocDeclAStrName(type, decl, astr, docstr, details, newname) + %feature("autodoc") decl astr; + %feature("docstring") decl docstr; + %name(newname) type decl + %enddef +#endif // Set the docstring for a constructor decl and then define the decl too. // Must use the full declaration of the item. -%define DocCtorStr(decl, docstr) - %feature("docstring") decl docstr; - decl -%enddef +#ifdef _DO_FULL_DOCS + %define DocCtorStr(decl, docstr, details) + %feature("docstring") decl docstr details; + decl + %enddef +#else + %define DocCtorStr(decl, docstr, details) + %feature("docstring") decl docstr; + decl + %enddef +#endif + // As above, but also give the decl a new %name -%define DocCtorStrName(decl, docstr, newname) - %feature("docstring") decl docstr; - %name(newname) decl -%enddef +#ifdef _DO_FULL_DOCS + %define DocCtorStrName(decl, docstr, details, newname) + %feature("docstring") decl docstr details; + %name(newname) decl + %enddef +#else + %define DocCtorStrName(decl, docstr, details, newname) + %feature("docstring") decl docstr; + %name(newname) decl + %enddef +#endif - -// Set the autodoc string for a decl and then define the decl too. Must use the -// full declaration of the item. + + +// Set the autodoc string for a constructor decl and then define the decl too. +// Must use the full declaration of the item. %define DocCtorA(decl, astr) %feature("autodoc") decl astr; decl %enddef // As above, but also give the decl a new %name -%define DocCtorAname(decl, astr, newname) +%define DocCtorAName(decl, astr, newname) %feature("autodoc") decl astr; %name(newname) decl %enddef -// Set the autodoc and the docstring for a decl and then define the decl too. -// Must use the full declaration of the item. -%define DocCtorAStr(decl, astr, docstr) - %feature("autodoc") decl astr; - %feature("docstring") decl docstr; - decl -%enddef +// Set the autodoc and the docstring for a constructor decl and then define +// the decl too. Must use the full declaration of the item. +#ifdef _DO_FULL_DOCS + %define DocCtorAStr(decl, astr, docstr, details) + %feature("autodoc") decl astr; + %feature("docstring") decl docstr details; + decl + %enddef +#else + %define DocCtorAStr(decl, astr, docstr, details) + %feature("autodoc") decl astr; + %feature("docstring") decl docstr; + decl + %enddef +#endif -// As above, but also give the decl a new %name -%define DocCtorAStrName(decl, astr, docstr, newname) - %feature("autodoc") decl astr; - %feature("docstring") decl docstr; - %name(newname) decl -%enddef + +// As above, but also give the decl a new %name +#ifdef _DO_FULL_DOCS + %define DocCtorAStrName(decl, astr, docstr, details, newname) + %feature("autodoc") decl astr; + %feature("docstring") decl docstr details; + %name(newname) decl + %enddef +#else + %define DocCtorAStrName(decl, astr, docstr, details, newname) + %feature("autodoc") decl astr; + %feature("docstring") decl docstr; + %name(newname) decl + %enddef +#endif -// A placeholder for the detailed reference docs. -%define RefDoc(decl, docstr) - %feature("refdoc") decl docstr; -%enddef - + %define %newgroup %pythoncode { diff --git a/wxPython/src/_dirctrl.i b/wxPython/src/_dirctrl.i index b9b7699ba4..08921efef1 100644 --- a/wxPython/src/_dirctrl.i +++ b/wxPython/src/_dirctrl.i @@ -118,9 +118,11 @@ public: DocDeclAStr( virtual wxTreeItemId, FindChild(wxTreeItemId parentId, const wxString& path, bool& OUTPUT), "FindChild(wxTreeItemId parentId, wxString path) -> (item, done)", - "Find the child that matches the first part of 'path'. E.g. if a child path is\n" - "\"/usr\" and 'path' is \"/usr/include\" then the child for /usr is returned.\n" - "If the path string has been used (we're at the leaf), done is set to True\n"); + "Find the child that matches the first part of 'path'. E.g. if a child +path is \"/usr\" and 'path' is \"/usr/include\" then the child for +/usr is returned. If the path string has been used (we're at the +leaf), done is set to True. +", ""); // Resize the components of the control diff --git a/wxPython/src/_display.i b/wxPython/src/_display.i index 433e5762cb..f0e9fbbb40 100644 --- a/wxPython/src/_display.i +++ b/wxPython/src/_display.i @@ -25,7 +25,7 @@ DocStr(wxVideoMode, - "A simple struct containing video mode parameters for a display"); + "A simple struct containing video mode parameters for a display", ""); struct wxVideoMode { @@ -34,29 +34,28 @@ struct wxVideoMode DocDeclStr( bool , Matches(const wxVideoMode& other) const, - "Returns true if this mode matches the other one in the sense that -all non zero fields of the other mode have the same value in this -one (except for refresh which is allowed to have a greater value)"); + "Returns true if this mode matches the other one in the sense that all +non zero fields of the other mode have the same value in this +one (except for refresh which is allowed to have a greater value)", ""); DocDeclStr( int , GetWidth() const, - "Returns the screen width in pixels (e.g. 640*480), 0 means -unspecified"); + "Returns the screen width in pixels (e.g. 640*480), 0 means unspecified", ""); DocDeclStr( int , GetHeight() const, "Returns the screen width in pixels (e.g. 640*480), 0 means -unspecified"); +unspecified", ""); DocDeclStr( int , GetDepth() const, - "Returns the screen's bits per pixel (e.g. 32), 1 is monochrome -and 0 means unspecified/known"); + "Returns the screen's bits per pixel (e.g. 32), 1 is monochrome and 0 +means unspecified/known", ""); DocDeclStr( bool , IsOk() const, - "returns true if the object has been initialized"); + "returns true if the object has been initialized", ""); @@ -86,7 +85,7 @@ const wxVideoMode wxDefaultVideoMode; //--------------------------------------------------------------------------- DocStr(wxDisplay, - "Represents a display/monitor attached to the system"); + "Represents a display/monitor attached to the system", ""); class wxDisplay @@ -95,26 +94,26 @@ public: // DocCtorStr( wxDisplay(size_t index = 0), - "Set up a Display instance with the specified display. The -displays are numbered from 0 to GetCount() - 1, 0 is always the -primary display and the only one which is always supported"); + "Set up a Display instance with the specified display. The displays +are numbered from 0 to GetCount() - 1, 0 is always the primary display +and the only one which is always supported", ""); virtual ~wxDisplay(); DocDeclStr( static size_t , GetCount(), - "Return the number of available displays."); + "Return the number of available displays.", ""); DocDeclStr( static int , GetFromPoint(const wxPoint& pt), - "Find the display where the given point lies, return wx.NOT_FOUND -if it doesn't belong to any display"); + "Find the display where the given point lies, return wx.NOT_FOUND if it +doesn't belong to any display", ""); DocStr(GetFromWindow, - "Find the display where the given window lies, return wx.NOT_FOUND -if it is not shown at all."); + "Find the display where the given window lies, return wx.NOT_FOUND if +it is not shown at all.", ""); #ifdef __WXMSW__ static int GetFromWindow(wxWindow *window); #else @@ -126,39 +125,38 @@ if it is not shown at all."); DocDeclStr( virtual bool , IsOk() const, - "Return true if the object was initialized successfully"); + "Return true if the object was initialized successfully", ""); %pythoncode { def __nonzero__(self): return self.IsOk() } DocDeclStr( virtual wxRect , GetGeometry() const, - "Returns the bounding rectangle of the display whose index was -passed to the constructor."); + "Returns the bounding rectangle of the display whose index was passed +to the constructor.", ""); DocDeclStr( virtual wxString , GetName() const, - "Returns the display's name. A name is not available on all platforms."); + "Returns the display's name. A name is not available on all platforms.", ""); DocDeclStr( bool , IsPrimary() const, "Returns true if the display is the primary display. The primary -display is the one whose index is 0."); +display is the one whose index is 0.", ""); %extend { DocAStr(GetModes, "GetModes(VideoMode mode=DefaultVideoMode) -> [videoMode...]", - "Enumerate all video modes supported by this display matching the -given one (in the sense of VideoMode.Match()). - -As any mode matches the default value of the argument and there -is always at least one video mode supported by display, the -returned array is only empty for the default value of the -argument if this function is not supported at all on this -platform."); + "Enumerate all video modes supported by this display matching the given +one (in the sense of VideoMode.Match()). + +As any mode matches the default value of the argument and there is +always at least one video mode supported by display, the returned +array is only empty for the default value of the argument if this +function is not supported at all on this platform.", ""); PyObject* GetModes(const wxVideoMode& mode = wxDefaultVideoMode) { PyObject* pyList = NULL; @@ -178,17 +176,17 @@ platform."); DocDeclStr( virtual wxVideoMode , GetCurrentMode() const, - "Get the current video mode."); + "Get the current video mode.", ""); DocDeclStr( virtual bool , ChangeMode(const wxVideoMode& mode = wxDefaultVideoMode), - "Change current mode, return true if succeeded, false otherwise"); + "Change current mode, return true if succeeded, false otherwise", ""); DocDeclStr( void , ResetMode(), - "Restore the default video mode (just a more readable synonym)"); + "Restore the default video mode (just a more readable synonym)", ""); }; diff --git a/wxPython/src/_event.i b/wxPython/src/_event.i index 115650bc6d..d8443aef03 100644 --- a/wxPython/src/_event.i +++ b/wxPython/src/_event.i @@ -597,7 +597,8 @@ public: DocStr(GetPosition, // sets the docstring for both - "Returns the position of the mouse in window coordinates when the event happened."); + "Returns the position of the mouse in window coordinates when the event +happened.", ""); wxPoint GetPosition(); DocDeclAName( @@ -712,7 +713,7 @@ public: DocStr(GetPosition, // sets the docstring for both - "Find the position of the event."); + "Find the position of the event.", ""); wxPoint GetPosition(); DocDeclAName( diff --git a/wxPython/src/_gbsizer.i b/wxPython/src/_gbsizer.i index 812b9ac820..c522a7cabe 100644 --- a/wxPython/src/_gbsizer.i +++ b/wxPython/src/_gbsizer.i @@ -97,7 +97,7 @@ public: } } %pythoncode { - asTuple = Get + asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") def __str__(self): return str(self.Get()) def __repr__(self): return 'wx.GBPosition'+str(self.Get()) def __len__(self): return len(self.Get()) @@ -154,7 +154,7 @@ public: } } %pythoncode { - asTuple = Get + asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") def __str__(self): return str(self.Get()) def __repr__(self): return 'wx.GBSpan'+str(self.Get()) def __len__(self): return len(self.Get()) diff --git a/wxPython/src/_gdicmn.i b/wxPython/src/_gdicmn.i index 5b86c9a6e0..860d306be4 100644 --- a/wxPython/src/_gdicmn.i +++ b/wxPython/src/_gdicmn.i @@ -112,10 +112,10 @@ enum wxStockCursor %newgroup DocStr( wxSize, -"wx.Size is a useful data structure used to represent the size of something. -It simply contians integer width and height proprtites. In most places in -wxPython where a wx.Size is expected a (width,height) tuple can be used -instead."); +"wx.Size is a useful data structure used to represent the size of +something. It simply contians integer width and height proprtites. +In most places in wxPython where a wx.Size is expected a +(width,height) tuple can be used instead.", ""); class wxSize { @@ -126,7 +126,7 @@ public: DocCtorStr( wxSize(int w=0, int h=0), - "Creates a size object."); + "Creates a size object.", ""); ~wxSize(); @@ -138,33 +138,33 @@ public: DocDeclStr( bool, operator==(const wxSize& sz), - "Test for equality of wx.Size objects."); + "Test for equality of wx.Size objects.", ""); DocDeclStr( bool, operator!=(const wxSize& sz), - "Test for inequality."); + "Test for inequality.", ""); DocDeclStr( wxSize, operator+(const wxSize& sz), - "Add sz's proprties to this and return the result."); + "Add sz's proprties to this and return the result.", ""); DocDeclStr( wxSize, operator-(const wxSize& sz), - "Subtract sz's properties from this and return the result."); + "Subtract sz's properties from this and return the result.", ""); DocDeclStr( void, IncTo(const wxSize& sz), - "Increments this object so that both of its dimensions are not less\n" - "than the corresponding dimensions of the size."); + "Increments this object so that both of its dimensions are not less +than the corresponding dimensions of the size.", ""); DocDeclStr( void, DecTo(const wxSize& sz), - "Decrements this object so that both of its dimensions are not greater\n" - "than the corresponding dimensions of the size."); + "Decrements this object so that both of its dimensions are not greater +than the corresponding dimensions of the size.", ""); DocDeclStr( void, Set(int w, int h), - "Set both width and height."); + "Set both width and height.", ""); void SetWidth(int w); void SetHeight(int h); @@ -174,14 +174,13 @@ public: DocDeclStr( bool , IsFullySpecified() const, - "Returns True if both components of the size are non-default values."); + "Returns True if both components of the size are non-default values.", ""); DocDeclStr( void , SetDefaults(const wxSize& size), - "Combine this size with the other one replacing the default -components of this object (i.e. equal to -1) with those of the -other."); + "Combine this size with the other one replacing the default components +of this object (i.e. equal to -1) with those of the other.", ""); //int GetX() const; @@ -190,7 +189,7 @@ other."); %extend { DocAStr(Get, "Get() -> (width,height)", - "Returns the width and height properties as a tuple."); + "Returns the width and height properties as a tuple.", ""); PyObject* Get() { bool blocked = wxPyBeginBlockThreads(); PyObject* tup = PyTuple_New(2); @@ -201,7 +200,7 @@ other."); } } %pythoncode { - asTuple = Get + asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") def __str__(self): return str(self.Get()) def __repr__(self): return 'wx.Size'+str(self.Get()) def __len__(self): return len(self.Get()) @@ -221,9 +220,9 @@ other."); %newgroup DocStr( wxRealPoint, -"A data structure for representing a point or position with floating point x -and y properties. In wxPython most places that expect a wx.RealPoint can also -accept a (x,y) tuple."); +"A data structure for representing a point or position with floating +point x and y properties. In wxPython most places that expect a +wx.RealPoint can also accept a (x,y) tuple.", ""); class wxRealPoint { public: @@ -232,30 +231,30 @@ public: DocCtorStr( wxRealPoint(double x=0.0, double y=0.0), - "Create a wx.RealPoint object"); + "Create a wx.RealPoint object", ""); ~wxRealPoint(); DocDeclStr( bool, operator==(const wxRealPoint& pt), - "Test for equality of wx.RealPoint objects."); + "Test for equality of wx.RealPoint objects.", ""); DocDeclStr( bool, operator!=(const wxRealPoint& pt), - "Test for inequality of wx.RealPoint objects."); + "Test for inequality of wx.RealPoint objects.", ""); DocDeclStr( wxRealPoint, operator+(const wxRealPoint& pt), - "Add pt's proprties to this and return the result."); + "Add pt's proprties to this and return the result.", ""); DocDeclStr( wxRealPoint, operator-(const wxRealPoint& pt), - "Subtract pt's proprties from this and return the result"); + "Subtract pt's proprties from this and return the result", ""); %extend { - DocStr(Set, "Set both the x and y properties"); + DocStr(Set, "Set both the x and y properties", ""); void Set(double x, double y) { self->x = x; self->y = y; @@ -263,7 +262,7 @@ public: DocAStr(Get, "Get() -> (x,y)", - "Return the x and y properties as a tuple. "); + "Return the x and y properties as a tuple. ", ""); PyObject* Get() { bool blocked = wxPyBeginBlockThreads(); PyObject* tup = PyTuple_New(2); @@ -275,7 +274,7 @@ public: } %pythoncode { - asTuple = Get + asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") def __str__(self): return str(self.Get()) def __repr__(self): return 'wx.RealPoint'+str(self.Get()) def __len__(self): return len(self.Get()) @@ -296,9 +295,9 @@ public: DocStr(wxPoint, -"A data structure for representing a point or position with integer x and y -properties. Most places in wxPython that expect a wx.Point can also accept a -(x,y) tuple."); +"A data structure for representing a point or position with integer x +and y properties. Most places in wxPython that expect a wx.Point can +also accept a (x,y) tuple.", ""); class wxPoint { @@ -307,18 +306,18 @@ public: DocCtorStr( wxPoint(int x=0, int y=0), - "Create a wx.Point object"); + "Create a wx.Point object", ""); ~wxPoint(); DocDeclStr( bool, operator==(const wxPoint& pt), - "Test for equality of wx.Point objects."); + "Test for equality of wx.Point objects.", ""); DocDeclStr( bool, operator!=(const wxPoint& pt), - "Test for inequality of wx.Point objects."); + "Test for inequality of wx.Point objects.", ""); @@ -329,46 +328,46 @@ public: DocDeclStr( wxPoint, operator+(const wxPoint& pt), - "Add pt's proprties to this and return the result."); + "Add pt's proprties to this and return the result.", ""); DocDeclStr( wxPoint, operator-(const wxPoint& pt), - "Subtract pt's proprties from this and return the result"); + "Subtract pt's proprties from this and return the result", ""); DocDeclStr( wxPoint&, operator+=(const wxPoint& pt), - "Add pt to this object."); + "Add pt to this object.", ""); DocDeclStr( wxPoint&, operator-=(const wxPoint& pt), - "Subtract pt from this object."); + "Subtract pt from this object.", ""); // DocDeclStr( // wxPoint, operator+(const wxSize& sz), -// "Add sz to this Point and return the result."); +// "Add sz to this Point and return the result.", ""); // DocDeclStr( // wxPoint, operator-(const wxSize& sz), -// "Subtract sz from this Point and return the result"); +// "Subtract sz from this Point and return the result", ""); // DocDeclStr( // wxPoint&, operator+=(const wxSize& sz), -// "Add sz to this object."); +// "Add sz to this object.", ""); // DocDeclStr( // wxPoint&, operator-=(const wxSize& sz), -// "Subtract sz from this object."); +// "Subtract sz from this object.", ""); %extend { - DocStr(Set, "Set both the x and y properties"); + DocStr(Set, "Set both the x and y properties", ""); void Set(long x, long y) { self->x = x; self->y = y; @@ -376,7 +375,7 @@ public: DocAStr(Get, "Get() -> (x,y)", - "Return the x and y properties as a tuple. "); + "Return the x and y properties as a tuple. ", ""); PyObject* Get() { bool blocked = wxPyBeginBlockThreads(); PyObject* tup = PyTuple_New(2); @@ -388,7 +387,7 @@ public: } %pythoncode { - asTuple = Get + asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") def __str__(self): return str(self.Get()) def __repr__(self): return 'wx.Point'+str(self.Get()) def __len__(self): return len(self.Get()) @@ -408,25 +407,25 @@ public: DocStr(wxRect, -"A class for representing and manipulating rectangles. It has x, y, width and -height properties. In wxPython most palces that expect a wx.Rect can also -accept a (x,y,width,height) tuple."); +"A class for representing and manipulating rectangles. It has x, y, +width and height properties. In wxPython most palces that expect a +wx.Rect can also accept a (x,y,width,height) tuple.", ""); class wxRect { public: DocCtorStr( wxRect(int x=0, int y=0, int width=0, int height=0), - "Create a new Rect object."); + "Create a new Rect object.", ""); DocCtorStrName( wxRect(const wxPoint& topLeft, const wxPoint& bottomRight), - "Create a new Rect object from Points representing two corners.", + "Create a new Rect object from Points representing two corners.", "", RectPP); DocCtorStrName( wxRect(const wxPoint& pos, const wxSize& size), - "Create a new Rect from a position and size.", + "Create a new Rect from a position and size.", "", RectPS); ~wxRect(); @@ -480,61 +479,62 @@ public: DocDeclStr( wxRect&, Inflate(wxCoord dx, wxCoord dy), - "Increase the rectangle size by dx in x direction and dy in y direction. Both\n" - "(or one of) parameters may be negative to decrease the rectangle size."); + "Increase the rectangle size by dx in x direction and dy in y +direction. Both or one of) parameters may be negative to decrease the +rectangle size.", ""); DocDeclStr( wxRect&, Deflate(wxCoord dx, wxCoord dy), - "Decrease the rectangle size by dx in x direction and dy in y direction. Both\n" - "(or one of) parameters may be negative to increase the rectngle size. This\n" - "method is the opposite of Inflate."); + "Decrease the rectangle size by dx in x direction and dy in y +direction. Both or one of) parameters may be negative to increase the +rectngle size. This method is the opposite of Inflate.", ""); DocDeclStrName( void, Offset(wxCoord dx, wxCoord dy), - "Moves the rectangle by the specified offset. If dx is positive, the rectangle\n" - "is moved to the right, if dy is positive, it is moved to the bottom, otherwise\n" - "it is moved to the left or top respectively.", + "Moves the rectangle by the specified offset. If dx is positive, the +rectangle is moved to the right, if dy is positive, it is moved to the +bottom, otherwise it is moved to the left or top respectively.", "", OffsetXY); DocDeclStr( void, Offset(const wxPoint& pt), - "Same as OffsetXY but uses dx,dy from Point"); + "Same as OffsetXY but uses dx,dy from Point", ""); DocDeclStr( wxRect&, Intersect(const wxRect& rect), - "Return the intersectsion of this rectangle and rect."); + "Return the intersectsion of this rectangle and rect.", ""); DocDeclStr( wxRect, operator+(const wxRect& rect) const, - "Add the properties of rect to this rectangle and return the result."); + "Add the properties of rect to this rectangle and return the result.", ""); DocDeclStr( wxRect&, operator+=(const wxRect& rect), - "Add the properties of rect to this rectangle, updating this rectangle."); + "Add the properties of rect to this rectangle, updating this rectangle.", ""); DocDeclStr( bool, operator==(const wxRect& rect) const, - "Test for equality."); + "Test for equality.", ""); DocDeclStr( bool, operator!=(const wxRect& rect) const, - "Test for inequality."); + "Test for inequality.", ""); - DocStr( Inside, "Return True if the point is (not strcitly) inside the rect."); + DocStr( Inside, "Return True if the point is (not strcitly) inside the rect.", ""); %name(InsideXY)bool Inside(int x, int y) const; bool Inside(const wxPoint& pt) const; DocDeclStr( bool, Intersects(const wxRect& rect) const, - "Returns True if the rectangles have a non empty intersection."); + "Returns True if the rectangles have a non empty intersection.", ""); int x, y, width, height; %extend { - DocStr(Set, "Set all rectangle properties."); + DocStr(Set, "Set all rectangle properties.", ""); void Set(int x=0, int y=0, int width=0, int height=0) { self->x = x; self->y = y; @@ -544,7 +544,7 @@ public: DocAStr(Get, "Get() -> (x,y,width,height)", - "Return the rectangle properties as a tuple."); + "Return the rectangle properties as a tuple.", ""); PyObject* Get() { bool blocked = wxPyBeginBlockThreads(); PyObject* tup = PyTuple_New(4); @@ -558,7 +558,7 @@ public: } %pythoncode { - asTuple = Get + asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") def __str__(self): return str(self.Get()) def __repr__(self): return 'wx.Rect'+str(self.Get()) def __len__(self): return len(self.Get()) @@ -578,7 +578,7 @@ public: DocAStr(wxIntersectRect, "IntersectRect(Rect r1, Rect r2) -> Rect", - "Calculate and return the intersection of r1 and r2."); + "Calculate and return the intersection of r1 and r2.", ""); %inline %{ PyObject* wxIntersectRect(wxRect* r1, wxRect* r2) { wxRegion reg1(*r1); @@ -606,12 +606,13 @@ DocAStr(wxIntersectRect, DocStr(wxPoint2D, - "wx.Point2Ds represent a point or a vector in a 2d coordinate system with floating point values."); + "wx.Point2Ds represent a point or a vector in a 2d coordinate system +with floating point values.", ""); class wxPoint2D { public: - DocStr(wxPoint2D, "Create a w.Point2D object."); + DocStr(wxPoint2D, "Create a w.Point2D object.", ""); wxPoint2D( double x=0.0 , double y=0.0 ); %name(Point2DCopy) wxPoint2D( const wxPoint2D &pt ); %name(Point2DFromPoint) wxPoint2D( const wxPoint &pt ); @@ -619,12 +620,12 @@ public: DocDeclAStr( void, GetFloor( int *OUTPUT , int *OUTPUT ) const, "GetFloor() -> (x,y)", - "Convert to integer"); + "Convert to integer", ""); DocDeclAStr( void, GetRounded( int *OUTPUT , int *OUTPUT ) const, "GetRounded() -> (x,y)", - "Convert to integer"); + "Convert to integer", ""); double GetVectorLength() const; double GetVectorAngle() const ; @@ -648,7 +649,7 @@ public: DocDeclStr( wxPoint2D, operator-(), - "the reflection of this point"); + "the reflection of this point", ""); wxPoint2D& operator+=(const wxPoint2D& pt); wxPoint2D& operator-=(const wxPoint2D& pt); @@ -658,11 +659,11 @@ public: DocDeclStr( bool, operator==(const wxPoint2D& pt) const, - "Test for equality"); + "Test for equality", ""); DocDeclStr( bool, operator!=(const wxPoint2D& pt) const, - "Test for inequality"); + "Test for inequality", ""); %name(x)double m_x; %name(y)double m_y; @@ -675,7 +676,7 @@ public: DocAStr(Get, "Get() -> (x,y)", - "Return x and y properties as a tuple."); + "Return x and y properties as a tuple.", ""); PyObject* Get() { bool blocked = wxPyBeginBlockThreads(); PyObject* tup = PyTuple_New(2); @@ -687,7 +688,7 @@ public: } %pythoncode { - asTuple = Get + asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") def __str__(self): return str(self.Get()) def __repr__(self): return 'wx.Point2D'+str(self.Get()) def __len__(self): return len(self.Get()) diff --git a/wxPython/src/_image.i b/wxPython/src/_image.i index 08d530f0eb..4f35d16f6b 100644 --- a/wxPython/src/_image.i +++ b/wxPython/src/_image.i @@ -52,7 +52,7 @@ class wxImageHistogram /* : public wxImageHistogramBase */ public: wxImageHistogram(); - DocStr(MakeKey, "Get the key in the histogram for the given RGB values"); + DocStr(MakeKey, "Get the key in the histogram for the given RGB values", ""); static unsigned long MakeKey(unsigned char r, unsigned char g, unsigned char b); @@ -65,9 +65,9 @@ public: unsigned char startG = 0, unsigned char startB = 0 ) const, "FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)", - "Find first colour that is not used in the image and has higher RGB values than\n" - "startR, startG, startB. Returns a tuple consisting of a success flag and rgb\n" - "values."); + "Find first colour that is not used in the image and has higher RGB +values than startR, startG, startB. Returns a tuple consisting of a +success flag and rgb values.", ""); }; @@ -129,9 +129,9 @@ public: bool, FindFirstUnusedColour( byte *OUTPUT, byte *OUTPUT, byte *OUTPUT, byte startR = 0, byte startG = 0, byte startB = 0 ) const, "FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)", - "Find first colour that is not used in the image and has higher RGB values than\n" - "startR, startG, startB. Returns a tuple consisting of a success flag and rgb\n" - "values."); + "Find first colour that is not used in the image and has higher RGB +values than startR, startG, startB. Returns a tuple consisting of a +success flag and rgb values.", ""); // Set image's mask to the area of 'mask' that has colour diff --git a/wxPython/src/_listctrl.i b/wxPython/src/_listctrl.i index c1619a8708..f0b4ac39c5 100644 --- a/wxPython/src/_listctrl.i +++ b/wxPython/src/_listctrl.i @@ -639,8 +639,8 @@ public: DocDeclAStr( long, HitTest(const wxPoint& point, int& OUTPUT), "HitTest(Point point) -> (item, where)", - "Determines which item (if any) is at the specified point,\n" - "giving details in the second return value (see wxLIST_HITTEST_... flags.)"); + "Determines which item (if any) is at the specified point, giving +details in the second return value (see wxLIST_HITTEST_... flags.)", ""); // Inserts an item, returning the index of the new item if successful, // -1 otherwise. diff --git a/wxPython/src/_notebook.i b/wxPython/src/_notebook.i index abb564f6b5..81c854cc62 100644 --- a/wxPython/src/_notebook.i +++ b/wxPython/src/_notebook.i @@ -196,7 +196,8 @@ public: DocDeclAStr( virtual int, HitTest(const wxPoint& pt, long* OUTPUT) const, "HitTest(Point pt) -> (tab, where)", - "Returns the tab which is hit, and flags indicating where using wx.NB_HITTEST_ flags."); + "Returns the tab which is hit, and flags indicating where using +wx.NB_HITTEST flags.", ""); // implement some base class functions virtual wxSize CalcSizeFromPage(const wxSize& sizePage) const; diff --git a/wxPython/src/_obj.i b/wxPython/src/_obj.i index 07901443ab..c0c72f124a 100644 --- a/wxPython/src/_obj.i +++ b/wxPython/src/_obj.i @@ -18,20 +18,20 @@ DocStr(wxObject, "The base class for most wx objects, although in wxPython not -much functionality is needed nor exposed."); +much functionality is needed nor exposed.", ""); class wxObject { public: %extend { DocStr(GetClassName, - "Returns the class name of the C++ class using wxRTTI."); + "Returns the class name of the C++ class using wxRTTI.", ""); wxString GetClassName() { return self->GetClassInfo()->GetClassName(); } DocStr(Destroy, - "Deletes the C++ object this Python object is a proxy for."); + "Deletes the C++ object this Python object is a proxy for.", ""); void Destroy() { delete self; } diff --git a/wxPython/src/_panel.i b/wxPython/src/_panel.i index a20389f1f6..bee9ca00fd 100644 --- a/wxPython/src/_panel.i +++ b/wxPython/src/_panel.i @@ -98,7 +98,7 @@ public: DocDeclAStr( virtual void, GetScrollPixelsPerUnit(int *OUTPUT, int *OUTPUT) const, "GetScrollPixelsPerUnit() -> (xUnit, yUnit)", - "Get the size of one logical unit in physical units."); + "Get the size of one logical unit in physical units.", ""); // Enable/disable Windows scrolling in either direction. If True, wxWindows // scrolls the canvas and only a bit of the canvas is invalidated; no @@ -111,7 +111,7 @@ public: DocDeclAStr( virtual void, GetViewStart(int *OUTPUT, int *OUTPUT) const, "GetViewStart() -> (x,y)", - "Get the view start"); + "Get the view start", ""); // Set the scale factor, used in PrepareDC void SetScale(double xs, double ys); @@ -122,14 +122,14 @@ public: %nokwargs CalcScrolledPosition; %nokwargs CalcUnscrolledPosition; - DocStr(CalcScrolledPosition, "Translate between scrolled and unscrolled coordinates."); + DocStr(CalcScrolledPosition, "Translate between scrolled and unscrolled coordinates.", ""); wxPoint CalcScrolledPosition(const wxPoint& pt) const; DocDeclA( void, CalcScrolledPosition(int x, int y, int *OUTPUT, int *OUTPUT) const, "CalcScrolledPosition(int x, int y) -> (sx, sy)"); - DocStr(CalcUnscrolledPosition, "Translate between scrolled and unscrolled coordinates."); + DocStr(CalcUnscrolledPosition, "Translate between scrolled and unscrolled coordinates.", ""); wxPoint CalcUnscrolledPosition(const wxPoint& pt) const; DocDeclA( void, CalcUnscrolledPosition(int x, int y, int *OUTPUT, int *OUTPUT) const, diff --git a/wxPython/src/_splitter.i b/wxPython/src/_splitter.i index 458abf420c..962e8e0ad9 100644 --- a/wxPython/src/_splitter.i +++ b/wxPython/src/_splitter.i @@ -49,13 +49,13 @@ enum //--------------------------------------------------------------------------- DocStr(wxSplitterWindow, -"wx.SplitterWindow manages up to two subwindows or panes, -with an optional vertical or horizontal split which can be -used with the mouse or programmatically. -"); +"wx.SplitterWindow manages up to two subwindows or panes, with an +optional vertical or horizontal split which can be used with the mouse +or programmatically.", " -RefDoc(wxSplitterWindow, " - Styles +Styles +------- + ==================== ====================================== wx.SP_3D Draws a 3D effect border and sash. wx.SP_3DSASH Draws a 3D effect sash. wx.SP_3DBORDER Synonym for wxSP_BORDER. @@ -70,39 +70,40 @@ RefDoc(wxSplitterWindow, " the minimum pane size other than zero. wx.SP_LIVE_UPDATE Don't draw XOR line but resize the child windows immediately. - - Events - - EVT_SPLITTER_SASH_POS_CHANGING - The sash position is in the - process of being changed. May be - used to modify the position of - the tracking bar to properly - reflect the position that would - be set if the drag were to be - completed at this point. + ==================== ====================================== + +Events +------ + ============================== ======================================= + EVT_SPLITTER_SASH_POS_CHANGING The sash position is in the + process of being changed. May be + used to modify the position of + the tracking bar to properly + reflect the position that would + be set if the drag were to be + completed at this point. EVT_SPLITTER_SASH_POS_CHANGED - The sash position was - changed. May be used to modify - the sash position before it is - set, or to prevent the change - from taking place. - - EVT_SPLITTER_UNSPLIT The splitter has been just unsplit. - - EVT_SPLITTER_DCLICK The sash was double clicked. The - default behaviour is to unsplit - the window when this happens - (unless the minimum pane size has - been set to a value greater than - zero.) + The sash position was + changed. May be used to modify + the sash position before it is + set, or to prevent the change + from taking place. + + EVT_SPLITTER_UNSPLIT The splitter has been just unsplit. + + EVT_SPLITTER_DCLICK The sash was double clicked. The + default behaviour is to unsplit + the window when this happens + (unless the minimum pane size has + been set to a value greater than + zero.) + ============================== ======================================= "); -// wxSplitterWindow maintains one or two panes, with an optional vertical or -// horizontal split which can be used with the mouse or programmatically. + class wxSplitterWindow: public wxWindow { public: @@ -111,19 +112,17 @@ public: %pythonAppend wxSplitterWindow "self._setOORInfo(self)" %pythonAppend wxSplitterWindow() "" - RefDoc(wxSplitterWindow, ""); // turn it off for the ctors - DocCtorStr( wxSplitterWindow(wxWindow* parent, wxWindowID id=-1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style=wxSP_3D, const wxString& name = wxPySplitterNameStr), - "Constructor. Creates and shows a SplitterWindow."); + "Constructor. Creates and shows a SplitterWindow.", ""); DocCtorStrName( wxSplitterWindow(), - "Precreate a SplitterWindow for 2-phase creation.", + "Precreate a SplitterWindow for 2-phase creation.", "", PreSplitterWindow); @@ -133,37 +132,37 @@ public: const wxSize& size = wxDefaultSize, long style=wxSP_3D, const wxString& name = wxPySplitterNameStr), - "Create the GUI part of the SplitterWindow for the 2-phase create."); + "Create the GUI part of the SplitterWindow for the 2-phase create.", ""); DocDeclStr( wxWindow *, GetWindow1() const, - "Gets the only or left/top pane."); + "Gets the only or left/top pane.", ""); DocDeclStr( wxWindow *, GetWindow2() const, - "Gets the right/bottom pane."); + "Gets the right/bottom pane.", ""); DocDeclStr( void , SetSplitMode(int mode), "Sets the split mode. The mode can be wx.SPLIT_VERTICAL or -wx.SPLIT_HORIZONTAL. This only sets the internal variable; -does not update the display."); +wx.SPLIT_HORIZONTAL. This only sets the internal variable; does not +update the display.", ""); DocDeclStr( wxSplitMode , GetSplitMode() const, - "Gets the split mode"); + "Gets the split mode", ""); DocDeclStr( void , Initialize(wxWindow *window), - "Initializes the splitter window to have one pane. This -should be called if you wish to initially view only a single -pane in the splitter window."); + "Initializes the splitter window to have one pane. This should be +called if you wish to initially view only a single pane in the +splitter window.", ""); // Associates the given window with window 2, drawing the appropriate sash @@ -177,159 +176,155 @@ pane in the splitter window."); virtual bool , SplitVertically(wxWindow *window1, wxWindow *window2, int sashPosition = 0), - "Initializes the left and right panes of the splitter window. - - window1 The left pane. - window2 The right pane. - sashPosition The initial position of the sash. If this - value is positive, it specifies the size - of the left pane. If it is negative, it is - absolute value gives the size of the right - pane. Finally, specify 0 (default) to - choose the default position (half of the - total window width). - -Returns True if successful, False otherwise (the window was -already split). - -SplitVertically should be called if you wish to initially -view two panes. It can also be called at any subsequent -time, but the application should check that the window is -not currently split using IsSplit."); + "Initializes the left and right panes of the splitter window.", + " + :param window1: The left pane. + :param window2: The right pane. + :param sashPosition: The initial position of the sash. If this + value is positive, it specifies the size of the left + pane. If it is negative, it is absolute value gives + the size of the right pane. Finally, specify 0 + (default) to choose the default position (half of + the total window width). + +Returns True if successful, False otherwise (the window was already +split). + +SplitVertically should be called if you wish to initially view two +panes. It can also be called at any subsequent time, but the +application should check that the window is not currently split using +IsSplit. +"); DocDeclStr( virtual bool , SplitHorizontally(wxWindow *window1, wxWindow *window2, int sashPosition = 0), - "Initializes the top and bottom panes of the splitter window. - - window1 The top pane. - window2 The bottom pane. - sashPosition The initial position of the sash. If this - value is positive, it specifies the size - of the upper pane. If it is negative, it - is absolute value gives the size of the - lower pane. Finally, specify 0 (default) - to choose the default position (half of + "Initializes the top and bottom panes of the splitter window.", + " + :param window1: The top pane. + :param window2: The bottom pane. + :param sashPosition: The initial position of the sash. If this + value is positive, it specifies the size of the + upper pane. If it is negative, it is absolute value + gives the size of the lower pane. Finally, specify 0 + (default) to choose the default position (half of the total window height). -Returns True if successful, False otherwise (the window was -already split). +Returns True if successful, False otherwise (the window was already +split). -SplitHorizontally should be called if you wish to initially -view two panes. It can also be called at any subsequent -time, but the application should check that the window is -not currently split using IsSplit."); +SplitHorizontally should be called if you wish to initially view two +panes. It can also be called at any subsequent time, but the +application should check that the window is not currently split using +IsSplit. +"); DocDeclStr( bool , Unsplit(wxWindow *toRemove = NULL), - "Unsplits the window. Pass the pane to remove, or None to -remove the right or bottom pane. Returns True if -successful, False otherwise (the window was not split). + "Unsplits the window. Pass the pane to remove, or None to remove the +right or bottom pane. Returns True if successful, False otherwise (the +window was not split). This function will not actually delete the pane being removed; it sends EVT_SPLITTER_UNSPLIT which can be handled for the desired behaviour. By default, the pane being -removed is only hidden."); +removed is only hidden.", ""); DocDeclStr( bool , ReplaceWindow(wxWindow *winOld, wxWindow *winNew), "This function replaces one of the windows managed by the -SplitterWindow with another one. It is in general better to -use it instead of calling Unsplit() and then resplitting the -window back because it will provoke much less flicker. It is -valid to call this function whether the splitter has two -windows or only one. - -Both parameters should be non-None and winOld must specify -one of the windows managed by the splitter. If the -parameters are incorrect or the window couldn't be replaced, -False is returned. Otherwise the function will return True, -but please notice that it will not Destroy the replaced -window and you may wish to do it yourself."); +SplitterWindow with another one. It is in general better to use it +instead of calling Unsplit() and then resplitting the window back +because it will provoke much less flicker. It is valid to call this +function whether the splitter has two windows or only one. + +Both parameters should be non-None and winOld must specify one of the +windows managed by the splitter. If the parameters are incorrect or +the window couldn't be replaced, False is returned. Otherwise the +function will return True, but please notice that it will not Destroy +the replaced window and you may wish to do it yourself.", ""); DocDeclStr( void , UpdateSize(), - "Causes any pending sizing of the sash and child panes to -take place immediately. + "Causes any pending sizing of the sash and child panes to take place +immediately. -Such resizing normally takes place in idle time, in order to -wait for layout to be completed. However, this can cause -unacceptable flicker as the panes are resized after the -window has been shown. To work around this, you can perform -window layout (for example by sending a size event to the -parent window), and then call this function, before showing -the top-level window."); +Such resizing normally takes place in idle time, in order to wait for +layout to be completed. However, this can cause unacceptable flicker +as the panes are resized after the window has been shown. To work +around this, you can perform window layout (for example by sending a +size event to the parent window), and then call this function, before +showing the top-level window.", ""); DocDeclStr( bool , IsSplit() const, - "Is the window split?"); + "Is the window split?", ""); DocDeclStr( void , SetSashSize(int width), - "Sets the sash size"); + "Sets the sash size", ""); DocDeclStr( void , SetBorderSize(int width), - "Sets the border size"); + "Sets the border size", ""); DocDeclStr( int , GetSashSize() const, - "Gets the sash size"); + "Gets the sash size", ""); DocDeclStr( int , GetBorderSize() const, - "Gets the border size"); + "Gets the border size", ""); DocDeclStr( void , SetSashPosition(int position, bool redraw = True), - "Sets the sash position, in pixels. If redraw is Ttrue then -the panes are resized and the sash and border are redrawn."); + "Sets the sash position, in pixels. If redraw is Ttrue then the panes +are resized and the sash and border are redrawn.", ""); DocDeclStr( int , GetSashPosition() const, - "Returns the surrent sash position."); + "Returns the surrent sash position.", ""); DocDeclStr( void , SetMinimumPaneSize(int min), "Sets the minimum pane size in pixels. -The default minimum pane size is zero, which means that -either pane can be reduced to zero by dragging the sash, -thus removing one of the panes. To prevent this behaviour (and -veto out-of-range sash dragging), set a minimum size, -for example 20 pixels. If the wx.SP_PERMIT_UNSPLIT style is -used when a splitter window is created, the window may be -unsplit even if minimum size is non-zero."); +The default minimum pane size is zero, which means that either pane +can be reduced to zero by dragging the sash, thus removing one of the +panes. To prevent this behaviour (and veto out-of-range sash +dragging), set a minimum size, for example 20 pixels. If the +wx.SP_PERMIT_UNSPLIT style is used when a splitter window is created, +the window may be unsplit even if minimum size is non-zero.", ""); DocDeclStr( int , GetMinimumPaneSize() const, - "Gets the minimum pane size in pixels."); + "Gets the minimum pane size in pixels.", ""); DocDeclStr( virtual bool , SashHitTest(int x, int y, int tolerance = 5), - "Tests for x, y over the sash"); + "Tests for x, y over the sash", ""); DocDeclStr( virtual void , SizeWindows(), - "Resizes subwindows"); + "Resizes subwindows", ""); void SetNeedUpdating(bool needUpdating); @@ -342,7 +337,7 @@ unsplit even if minimum size is non-zero."); DocStr(wxSplitterEvent, - "This class represents the events generated by a splitter control."); + "This class represents the events generated by a splitter control.", ""); class wxSplitterEvent : public wxNotifyEvent { @@ -353,37 +348,34 @@ public: DocDeclStr( void , SetSashPosition(int pos), - "This funciton is only meaningful during -EVT_SPLITTER_SASH_POS_CHANGING and -EVT_SPLITTER_SASH_POS_CHANGED events. In the case of -_CHANGED events, sets the the new sash position. In the case -of _CHANGING events, sets the new tracking bar position so -visual feedback during dragging will represent that change -that will actually take place. Set to -1 from the event -handler code to prevent repositioning."); + "This funciton is only meaningful during EVT_SPLITTER_SASH_POS_CHANGING +and EVT_SPLITTER_SASH_POS_CHANGED events. In the case of _CHANGED +events, sets the the new sash position. In the case of _CHANGING +events, sets the new tracking bar position so visual feedback during +dragging will represent that change that will actually take place. Set +to -1 from the event handler code to prevent repositioning.", ""); DocDeclStr( int , GetSashPosition() const, - "Returns the new sash position while in -EVT_SPLITTER_SASH_POS_CHANGING and -EVT_SPLITTER_SASH_POS_CHANGED events."); + "Returns the new sash position while in EVT_SPLITTER_SASH_POS_CHANGING +and EVT_SPLITTER_SASH_POS_CHANGED events.", ""); DocDeclStr( wxWindow *, GetWindowBeingRemoved() const, - "Returns a pointer to the window being removed when a -splitter window is unsplit."); + "Returns a pointer to the window being removed when a splitter window +is unsplit.", ""); DocDeclStr( int , GetX() const, "Returns the x coordinate of the double-click point in a -EVT_SPLITTER_DCLICK event."); +EVT_SPLITTER_DCLICK event.", ""); DocDeclStr( int , GetY() const, "Returns the y coordinate of the double-click point in a -EVT_SPLITTER_DCLICK event."); +EVT_SPLITTER_DCLICK event.", ""); }; diff --git a/wxPython/src/_textctrl.i b/wxPython/src/_textctrl.i index be3b7727a8..7110d61466 100644 --- a/wxPython/src/_textctrl.i +++ b/wxPython/src/_textctrl.i @@ -204,7 +204,7 @@ public: DocDeclAStr( virtual void, GetSelection(long* OUTPUT, long* OUTPUT) const, "GetSelection() -> (from, to)", - "If the return values from and to are the same, there is no selection."); + "If the return values from and to are the same, there is no selection.", ""); virtual wxString GetStringSelection() const; @@ -258,9 +258,8 @@ public: virtual wxTextCtrlHitTestResult, HitTest(const wxPoint& pt, long* OUTPUT, long* OUTPUT) const, "HitTest(Point pt) -> (result, row, col)", - "Find the character at position given in pixels.\n" - "NB: pt is in device coords (not adjusted for the client area\n" - "origin nor scrolling)"); + "Find the character at position given in pixels. NB: pt is in device +coords but is not adjusted for the client area origin nor scrolling", ""); // Clipboard operations diff --git a/wxPython/src/_treectrl.i b/wxPython/src/_treectrl.i index fe91fc9e05..4341ad5cf7 100644 --- a/wxPython/src/_treectrl.i +++ b/wxPython/src/_treectrl.i @@ -685,10 +685,10 @@ public: DocDeclAStr( wxTreeItemId, HitTest(const wxPoint& point, int& OUTPUT), "HitTest(Point point) -> (item, where)", - "Determine which item (if any) belongs the given point. The\n" - "coordinates specified are relative to the client area of tree ctrl\n" - "and the where return value is set to a bitmask of wxTREE_HITTEST_xxx\n" - "constants.\n"); + "Determine which item (if any) belongs the given point. The coordinates +specified are relative to the client area of tree ctrl and the where return +value is set to a bitmask of wxTREE_HITTEST_xxx constants. +", ""); %extend { diff --git a/wxPython/src/_window.i b/wxPython/src/_window.i index 8802ae8895..af73418c9a 100644 --- a/wxPython/src/_window.i +++ b/wxPython/src/_window.i @@ -25,7 +25,7 @@ MAKE_CONST_WXSTRING(PanelNameStr); DocStr(wxVisualAttributes, - "struct containing all the visual attributes of a control"); + "struct containing all the visual attributes of a control", ""); struct wxVisualAttributes { @@ -59,91 +59,93 @@ enum wxWindowVariant DocStr(wxWindow, -" -wx.Window is the base class for all windows and represents any visible +"wx.Window is the base class for all windows and represents any visible object on the screen. All controls, top level windows and so on are wx.Windows. Sizers and device contexts are not however, as they don't appear on screen themselves. -"); - -RefDoc(wxWindow, " - Styles - - wx.SIMPLE_BORDER: Displays a thin border around the window. - - wx.DOUBLE_BORDER: Displays a double border. Windows and Mac only. - - wx.SUNKEN_BORDER: Displays a sunken border. - - wx.RAISED_BORDER: Displays a raised border. - - wx.STATIC_BORDER: Displays a border suitable for a static - control. Windows only. - - wx.NO_BORDER: Displays no border, overriding the default - border style for the window. - - wx.TRANSPARENT_WINDOW: The window is transparent, that is, it - will not receive paint events. Windows only. - - wx.TAB_TRAVERSAL: Use this to enable tab traversal for - non-dialog windows. - - wx.WANTS_CHARS: Use this to indicate that the window - wants to get all char/key events for - all keys - even for keys like TAB or - ENTER which are usually used for - dialog navigation and which wouldn't - be generated without this style. If - you need to use this style in order to - get the arrows or etc., but would - still like to have normal keyboard - navigation take place, you should - create and send a wxNavigationKeyEvent - in response to the key events for Tab - and Shift-Tab. - - wx.NO_FULL_REPAINT_ON_RESIZE: Disables repainting the window - completely when its size is changed - - you will have to repaint the new - window area manually if you use this - style. As of version 2.5.1 this - style is on by default. Use - wx.FULL_REPAINT_ON_RESIZE to - deactivate it. - - wx.VSCROLL: Use this style to enable a vertical scrollbar. - - wx.HSCROLL: Use this style to enable a horizontal scrollbar. - - wx.ALWAYS_SHOW_SB: If a window has scrollbars, disable them - instead of hiding them when they are - not needed (i.e. when the size of the - window is big enough to not require - the scrollbars to navigate it). This - style is currently only implemented - for wxMSW and wxUniversal and does - nothing on the other platforms. - - wx.CLIP_CHILDREN: Use this style to eliminate flicker caused by - the background being repainted, then - children being painted over - them. Windows only. - - wx.FULL_REPAINT_ON_RESIZE: Use this style to force a complete - redraw of the window whenever it is - resized instead of redrawing just the - part of the window affected by - resizing. Note that this was the - behaviour by default before 2.5.1 - release and that if you experience - redraw problems with the code which - previously used to work you may want - to try this. - - Extra Styles - - wx.WS_EX_VALIDATE_RECURSIVELY: By default, +", +" +Styles +------- + ============================= ===================================== + wx.SIMPLE_BORDER Displays a thin border around the window. + + wx.DOUBLE_BORDER Displays a double border. Windows and Mac only. + + wx.SUNKEN_BORDER Displays a sunken border. + + wx.RAISED_BORDER Displays a raised border. + + wx.STATIC_BORDER Displays a border suitable for a static + control. Windows only. + + wx.NO_BORDER Displays no border, overriding the default + border style for the window. + + wx.TRANSPARENT_WINDOW The window is transparent, that is, it + will not receive paint events. Windows only. + + wx.TAB_TRAVERSAL Use this to enable tab traversal for + non-dialog windows. + + wx.WANTS_CHARS Use this to indicate that the window + wants to get all char/key events for + all keys - even for keys like TAB or + ENTER which are usually used for + dialog navigation and which wouldn't + be generated without this style. If + you need to use this style in order to + get the arrows or etc., but would + still like to have normal keyboard + navigation take place, you should + create and send a wxNavigationKeyEvent + in response to the key events for Tab + and Shift-Tab. + + wx.NO_FULL_REPAINT_ON_RESIZE Disables repainting the window + completely when its size is changed. + You will have to repaint the new + window area manually if you use this + style. As of version 2.5.1 this + style is on by default. Use + wx.FULL_REPAINT_ON_RESIZE to + deactivate it. + + wx.VSCROLL Use this style to enable a vertical scrollbar. + + wx.HSCROLL Use this style to enable a horizontal scrollbar. + + wx.ALWAYS_SHOW_SB If a window has scrollbars, disable them + instead of hiding them when they are + not needed (i.e. when the size of the + window is big enough to not require + the scrollbars to navigate it). This + style is currently only implemented + for wxMSW and wxUniversal and does + nothing on the other platforms. + + wx.CLIP_CHILDREN Use this style to eliminate flicker caused by + the background being repainted, then + children being painted over + them. Windows only. + + wx.FULL_REPAINT_ON_RESIZE Use this style to force a complete + redraw of the window whenever it is + resized instead of redrawing just the + part of the window affected by + resizing. Note that this was the + behaviour by default before 2.5.1 + release and that if you experience + redraw problems with the code which + previously used to work you may want + to try this. + ============================= ===================================== + + +Extra Styles +------------ + ============================= ===================================== + wx.WS_EX_VALIDATE_RECURSIVELY By default, Validate/TransferDataTo/FromWindow() only work on direct children of the window (compatible @@ -151,7 +153,7 @@ RefDoc(wxWindow, " them recursively descend into all subwindows. - wx.WS_EX_BLOCK_EVENTS: wx.CommandEvents and the objects of the + wx.WS_EX_BLOCK_EVENTS wx.CommandEvents and the objects of the derived classes are forwarded to the parent window and so on recursively by default. Using this @@ -171,7 +173,7 @@ RefDoc(wxWindow, " lead to a crash if the parent is destroyed before the child. - wx.WS_EX_PROCESS_IDLE: This window should always process idle + wx.WS_EX_PROCESS_IDLE This window should always process idle events, even if the mode set by wx.IdleEvent.SetMode is wx.IDLE_PROCESS_SPECIFIED. @@ -180,6 +182,7 @@ RefDoc(wxWindow, " update events, even if the mode set by wxUpdateUIEvent::SetMode is wxUPDATE_UI_PROCESS_SPECIFIED. + ============================= ===================================== "); @@ -191,19 +194,17 @@ public: %pythonAppend wxWindow "self._setOORInfo(self)" %pythonAppend wxWindow() "" - RefDoc(wxWindow, ""); // turn it off for the ctors - DocCtorStr( wxWindow(wxWindow* parent, const wxWindowID id=-1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxPyPanelNameStr), - "Construct and show a generic Window."); + "Construct and show a generic Window.", ""); DocCtorStrName( wxWindow(), - "Precreate a Window for 2-phase creation.", + "Precreate a Window for 2-phase creation.", "", PreWindow); @@ -213,7 +214,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxPyPanelNameStr), - "Create the GUI part of the Window for 2-phase creation mode."); + "Create the GUI part of the Window for 2-phase creation mode.", ""); // deleting the window @@ -225,8 +226,8 @@ public: "This function simply generates a EVT_CLOSE event whose handler usually tries to close the window. It doesn't close the window itself, however. If force is False (the default) then the window's close -handler will be allowed to veto the destruction of the window. - +handler will be allowed to veto the destruction of the window.", +" Usually Close is only used with the top level windows (wx.Frame and wx.Dialog classes) as the others are not supposed to have any special EVT_CLOSE logic. @@ -257,17 +258,18 @@ have been processed. This prevents problems with events being sent to non-existent windows. Returns True if the window has either been successfully deleted, or it -has been added to the list of windows pending real deletion."); +has been added to the list of windows pending real deletion.", ""); DocDeclStr( bool , DestroyChildren(), - "Destroys all children of a window. Called automatically by the destructor."); + "Destroys all children of a window. Called automatically by the +destructor.", ""); DocDeclStr( bool , IsBeingDeleted() const, - "Is the window in the process of being deleted?"); + "Is the window in the process of being deleted?", ""); @@ -276,54 +278,57 @@ has been added to the list of windows pending real deletion."); DocDeclStr( virtual void , SetTitle( const wxString& title), - "Sets the window's title. Applicable only to frames and dialogs."); + "Sets the window's title. Applicable only to frames and dialogs.", ""); DocDeclStr( virtual wxString , GetTitle() const, - "Gets the window's title. Applicable only to frames and dialogs."); + "Gets the window's title. Applicable only to frames and dialogs.", ""); DocDeclStr( virtual void , SetLabel(const wxString& label), - "Set the text which the window shows in its label if applicable."); + "Set the text which the window shows in its label if applicable.", ""); DocDeclStr( virtual wxString , GetLabel() const, - "Generic way of getting a label from any window, for -identification purposes. The interpretation of this function -differs from class to class. For frames and dialogs, the value -returned is the title. For buttons or static text controls, it is -the button text. This function can be useful for meta-programs -such as testing tools or special-needs access programs)which -need to identify windows by name."); + "Generic way of getting a label from any window, for identification +purposes. The interpretation of this function differs from class to +class. For frames and dialogs, the value returned is the title. For +buttons or static text controls, it is the button text. This function +can be useful for meta-programs such as testing tools or special-needs +access programs)which need to identify windows by name.", ""); DocDeclStr( virtual void , SetName( const wxString &name ), - "Sets the window's name. The window name is used for ressource -setting in X, it is not the same as the window title/label"); + "Sets the window's name. The window name is used for ressource setting +in X, it is not the same as the window title/label", ""); DocDeclStr( virtual wxString , GetName() const, - "Returns the windows name. This name is not guaranteed to be -unique; it is up to the programmer to supply an appropriate name -in the window constructor or via wx.Window.SetName."); + "Returns the windows name. This name is not guaranteed to be unique; +it is up to the programmer to supply an appropriate name in the window +constructor or via wx.Window.SetName.", ""); DocDeclStr( void , SetWindowVariant( wxWindowVariant variant ), - "Sets the variant of the window/font size to use for this window, -if the platform supports variants, for example, wxMac. Variant values are: + "Sets the variant of the window/font size to use for this window, if +the platform supports variants, for example, wxMac.", + " +Variant values are: + ======================== ======================================= wx.WINDOW_VARIANT_NORMAL Normal size wx.WINDOW_VARIANT_SMALL Smaller size (about 25 % smaller than normal) wx.WINDOW_VARIANT_MINI Mini size (about 33 % smaller than normal) wx.WINDOW_VARIANT_LARGE Large size (about 25 % larger than normal) + ======================== ======================================= "); DocDeclStr( wxWindowVariant , GetWindowVariant() const, - ""); + "", ""); DocDeclStr( @@ -331,31 +336,31 @@ if the platform supports variants, for example, wxMac. Variant values are: "Sets the identifier of the window. Each window has an integer identifier. If the application has not provided one, an identifier will be generated. Normally, the identifier should be provided on -creation and should not be modified subsequently."); +creation and should not be modified subsequently.", ""); DocDeclStr( wxWindowID , GetId() const, "Returns the identifier of the window. Each window has an integer identifier. If the application has not provided one (or the default Id -1 is used) then an unique identifier with a negative value will be -generated."); +generated.", ""); DocDeclStr( static int , NewControlId(), - "Generate a control id for the controls which were not given one."); + "Generate a control id for the controls which were not given one.", ""); DocDeclStr( static int , NextControlId(int winid), - "Get the id of the control following the one with the given\n" - "(autogenerated) id"); + "Get the id of the control following the one with the given +autogenerated) id", ""); DocDeclStr( static int , PrevControlId(int winid), - "Get the id of the control preceding the one with the given\n" - "(autogenerated) id"); + "Get the id of the control preceding the one with the given +autogenerated) id", ""); @@ -366,7 +371,7 @@ generated."); DocDeclStr( void , SetSize( const wxSize& size ), - "Sets the size of the window in pixels."); + "Sets the size of the window in pixels.", ""); DocDeclStrName( @@ -378,32 +383,32 @@ parameter indicates the interpretation of the other params if they are shoudl be used. wx.SIZE_USE_EXISTING: existing dimensions should be used if -1 values are supplied. wxSIZE_ALLOW_MINUS_ONE: allow dimensions of -1 and less to be interpreted as real dimensions, not -default values.", +default values.", "", SetDimensions); DocDeclStrName( void , SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO), - "Sets the position and size of the window in pixels using a wx.Rect.", + "Sets the position and size of the window in pixels using a wx.Rect.", "", SetRect); DocDeclStrName( void , SetSize( int width, int height ), - "Sets the size of the window in pixels.", + "Sets the size of the window in pixels.", "", SetSizeWH); DocDeclStr( void , Move(const wxPoint& pt, int flags = wxSIZE_USE_EXISTING), - "Moves the window to the given position."); + "Moves the window to the given position.", ""); %pythoncode { SetPosition = Move } DocDeclStrName( void , Move(int x, int y, int flags = wxSIZE_USE_EXISTING), - "Moves the window to the given position.", + "Moves the window to the given position.", "", MoveXY); @@ -411,12 +416,12 @@ default values.", DocDeclStr( virtual void , Raise(), "Raises the window to the top of the window hierarchy if it is a -managed window (dialog or frame)."); +managed window (dialog or frame).", ""); DocDeclStr( virtual void , Lower(), "Lowers the window to the bottom of the window hierarchy if it is a -managed window (dialog or frame)."); +managed window (dialog or frame).", ""); @@ -426,14 +431,14 @@ managed window (dialog or frame)."); function to size a window tends to be more device-independent than wx.Window.SetSize, since the application need not worry about what dimensions the border or title bar have when trying to fit the window -around panel items, for example."); +around panel items, for example.", ""); void SetClientSize( const wxSize& size ); %name(SetClientSizeWH) void SetClientSize( int width, int height ); %name(SetClientRect) void SetClientSize(const wxRect& rect); DocStr(GetPosition, // sets the docstring for both - "Get the window's position."); + "Get the window's position.", ""); wxPoint GetPosition(); DocDeclAName( @@ -442,7 +447,7 @@ around panel items, for example."); GetPositionTuple); - DocStr(GetSize, "Get the window size."); + DocStr(GetSize, "Get the window size.", ""); wxSize GetSize() const; DocDeclAName( void, GetSize( int *OUTPUT, int *OUTPUT ) const, @@ -453,13 +458,13 @@ around panel items, for example."); DocDeclStr( wxRect , GetRect() const, - "Returns the size and position of the window as a wx.Rect object."); + "Returns the size and position of the window as a wx.Rect object.", ""); DocStr(GetClientSize, "This gets the size of the window's 'client area' in pixels. The client area is the area which may be drawn on by the programmer, excluding -title bar, border, scrollbars, etc."); +title bar, border, scrollbars, etc.", ""); wxSize GetClientSize() const; DocDeclAName( void, GetClientSize( int *OUTPUT, int *OUTPUT ) const, @@ -472,22 +477,22 @@ title bar, border, scrollbars, etc."); virtual wxPoint , GetClientAreaOrigin() const, "Get the origin of the client area of the window relative to the window's top left corner (the client area may be shifted because of -the borders, scrollbars, other decorations...)"); +the borders, scrollbars, other decorations...)", ""); DocDeclStr( wxRect , GetClientRect() const, - "Get the client area position and size as a wx.Rect object."); + "Get the client area position and size as a wx.Rect object.", ""); DocStr(GetBestSize, "This functions returns the best acceptable minimal size for the -window, if applicable. For example, for a static text control, it will be -the minimal size such that the control label is not truncated. For -windows containing subwindows (suzh aswx.Panel), the size returned -by this function will be the same as the size the window would have -had after calling Fit."); +window, if applicable. For example, for a static text control, it will +be the minimal size such that the control label is not truncated. For +windows containing subwindows (suzh aswx.Panel), the size returned by +this function will be the same as the size the window would have had +after calling Fit.", ""); wxSize GetBestSize() const; DocDeclAName( void, GetBestSize(int *OUTPUT, int *OUTPUT) const, @@ -502,7 +507,7 @@ thing. GetBestSize should return the minimum untruncated size of the window, while this method will return the largest of BestSize and any user specified minimum size. ie. it is the minimum size the window should currently be drawn at, not the minimal size it can possibly -tolerate."); +tolerate.", ""); @@ -514,20 +519,20 @@ cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may also include wx.CENTER_ON_SCREEN flag if you want to center the window on the entire screen and not on its parent window. If it is a top-level window and has no parent then it will always be centered -relative to the screen."); +relative to the screen.", ""); %pythoncode { Centre = Center } DocDeclStr( void , CenterOnScreen(int dir = wxBOTH), - "Center on screen (only works for top level windows)"); + "Center on screen (only works for top level windows)", ""); %pythoncode { CentreOnScreen = CenterOnScreen } DocDeclStr( void , CenterOnParent(int dir = wxBOTH), - "Center with respect to the the parent window"); + "Center with respect to the the parent window", ""); %pythoncode { CentreOnParent = CenterOnParent } @@ -540,7 +545,7 @@ correctly if sizers are used for the subwindows layout. Also, if the window has exactly one subwindow it is better (faster and the result is more precise as Fit adds some margin to account for fuzziness of its calculations) to call window.SetClientSize(child.GetSize()) -instead of calling Fit."); +instead of calling Fit.", ""); DocDeclStr( @@ -549,7 +554,7 @@ instead of calling Fit."); window. Mainly useful with scrolled windows to reset scrollbars after sizing changes that do not trigger a size event, and/or scrolled windows without an interior sizer. This function similarly won't do -anything if there are no subwindows."); +anything if there are no subwindows.", ""); @@ -559,7 +564,7 @@ anything if there are no subwindows."); size increments. If a pair of values is not set (or set to -1), the default values will be used. If this function is called, the user will not be able to size the window outside the given bounds. The -resizing increments are only significant under Motif or Xt."); +resizing increments are only significant under Motif or Xt.", ""); virtual void SetSizeHints( int minW, int minH, int maxW = -1, int maxH = -1, int incW = -1, int incH = -1 ); @@ -573,7 +578,7 @@ resizing increments are only significant under Motif or Xt."); "Allows specification of minimum and maximum virtual window sizes. If a pair of values is not set (or set to -1), the default values will be used. If this function is called, the user will not be able to size -the virtual area of the window outside the given bounds."); +the virtual area of the window outside the given bounds.", ""); virtual void SetVirtualSizeHints( int minW, int minH, int maxW = -1, int maxH = -1 ); void SetVirtualSizeHints( const wxSize& minSize, @@ -581,35 +586,35 @@ the virtual area of the window outside the given bounds."); DocDeclStr( virtual int , GetMinWidth() const, - ""); + "", ""); DocDeclStr( virtual int , GetMinHeight() const, - ""); + "", ""); DocDeclStr( int , GetMaxWidth() const, - ""); + "", ""); DocDeclStr( int , GetMaxHeight() const, - ""); + "", ""); DocDeclStr( virtual wxSize , GetMaxSize() const, - ""); + "", ""); DocDeclStr( virtual wxSize , GetMinSize() const, - ""); + "", ""); DocStr(SetVirtualSize, "Set the the virtual size of a window in pixels. For most windows this is just the client area of the window, but for some like scrolled -windows it is more or less independent of the screen window size."); +windows it is more or less independent of the screen window size.", ""); void SetVirtualSize(const wxSize& size ); %name(SetVirtualSizeWH) void SetVirtualSize( int w, int h ); @@ -617,7 +622,7 @@ windows it is more or less independent of the screen window size."); DocStr(GetVirtualSize, "Get the the virtual size of the window in pixels. For most windows this is just the client area of the window, but for some like scrolled -windows it is more or less independent of the screen window size."); +windows it is more or less independent of the screen window size.", ""); wxSize GetVirtualSize() const; DocDeclAName( void, GetVirtualSize( int *OUTPUT, int *OUTPUT ) const, @@ -636,7 +641,7 @@ windows it is more or less independent of the screen window size."); DocDeclStr( virtual wxSize , GetBestVirtualSize() const, "Return the largest of ClientSize and BestSize (as determined by a -sizer, interior children, or other means)"); +sizer, interior children, or other means)", ""); @@ -649,11 +654,11 @@ sizer, interior children, or other means)"); window if you want to bring it to top, although this is not needed if Show is called immediately after the frame creation. Returns True if the window has been shown or hidden or False if nothing was done -because it already was in the requested state."); +because it already was in the requested state.", ""); DocDeclStr( bool , Hide(), - "Equivalent to calling Show(False)."); + "Equivalent to calling Show(False).", ""); DocDeclStr( @@ -662,48 +667,48 @@ because it already was in the requested state."); window is disabled, all of its children are disabled as well and they are reenabled again when the parent is. Returns true if the window has been enabled or disabled, false if nothing was done, i.e. if the -window had already been in the specified state."); +window had already been in the specified state.", ""); DocDeclStr( bool , Disable(), - "Disables the window, same as Enable(false)."); + "Disables the window, same as Enable(false).", ""); DocDeclStr( bool , IsShown() const, - "Returns true if the window is shown, false if it has been hidden."); + "Returns true if the window is shown, false if it has been hidden.", ""); DocDeclStr( bool , IsEnabled() const, - "Returns true if the window is enabled for input, false otherwise."); + "Returns true if the window is enabled for input, false otherwise.", ""); DocDeclStr( virtual void , SetWindowStyleFlag( long style ), - "Sets the style of the window. Please note that some styles cannot -be changed after the window creation and that Refresh() might -need to be called after changing the others for the change to -take place immediately."); + "Sets the style of the window. Please note that some styles cannot be +changed after the window creation and that Refresh() might need to be +called after changing the others for the change to take place +immediately.", ""); DocDeclStr( virtual long , GetWindowStyleFlag() const, "Gets the window style that was passed to the constructor or Create -method."); +method.", ""); %pythoncode { SetWindowStyle = SetWindowStyleFlag; GetWindowStyle = GetWindowStyleFlag } DocDeclStr( bool , HasFlag(int flag) const, - "Test if the given style is set for this window."); + "Test if the given style is set for this window.", ""); DocDeclStr( virtual bool , IsRetained() const, "Returns true if the window is retained, false otherwise. Retained -windows are only available on X platforms."); +windows are only available on X platforms.", ""); @@ -711,11 +716,11 @@ windows are only available on X platforms."); virtual void , SetExtraStyle(long exStyle), "Sets the extra style bits for the window. Extra styles are the less often used style bits which can't be set with the constructor or with -SetWindowStyleFlag()"); +SetWindowStyleFlag()", ""); DocDeclStr( long , GetExtraStyle() const, - "Returns the extra style bits for the window."); + "Returns the extra style bits for the window.", ""); @@ -723,7 +728,7 @@ SetWindowStyleFlag()"); virtual void , MakeModal(bool modal = True), "Disables all other windows in the application so that the user can only interact with this window. Passing False will reverse this -effect."); +effect.", ""); @@ -737,11 +742,11 @@ effect."); user's selected theme. Dialogs, notebook pages and the status bar have this flag set to true -by default so that the default look and feel is simulated best."); +by default so that the default look and feel is simulated best.", ""); DocDeclStr( virtual bool , GetThemeEnabled() const, - "Return the themeEnabled flag."); + "Return the themeEnabled flag.", ""); // TODO with directors @@ -760,31 +765,31 @@ by default so that the default look and feel is simulated best."); DocDeclStr( virtual void , SetFocus(), - "Set's the focus to this window, allowing it to receive keyboard input."); + "Set's the focus to this window, allowing it to receive keyboard input.", ""); DocDeclStr( virtual void , SetFocusFromKbd(), "Set focus to this window as the result of a keyboard action. Normally -only called internally."); +only called internally.", ""); DocDeclStr( static wxWindow *, FindFocus(), "Returns the window or control that currently has the keyboard focus, -or None."); +or None.", ""); DocDeclStr( virtual bool , AcceptsFocus() const, - "Can this window have focus?"); + "Can this window have focus?", ""); DocDeclStr( virtual bool , AcceptsFocusFromKeyboard() const, "Can this window be given focus by keyboard navigation? if not, the only way to give it focus (provided it accepts it at all) is to click -it."); +it.", ""); @@ -792,15 +797,15 @@ it."); DocDeclStr( virtual wxWindow *, GetDefaultItem() const, "Get the default child of this parent, i.e. the one which is activated -by pressing such as the OK button on a wx.Dialog."); +by pressing such as the OK button on a wx.Dialog.", ""); DocDeclStr( virtual wxWindow *, SetDefaultItem(wxWindow * child), - "Set this child as default, return the old default."); + "Set this child as default, return the old default.", ""); DocDeclStr( virtual void , SetTmpDefaultItem(wxWindow * win), - "Set this child as temporary default"); + "Set this child as temporary default", ""); @@ -816,7 +821,7 @@ by pressing such as the OK button on a wx.Dialog."); "Returns a list of the window's children. NOTE: Currently this is a copy of the child window list maintained by the window, so the return value of this function is only valid as long as the window's children -do not change."); +do not change.", ""); PyObject* GetChildren() { wxWindowList& list = self->GetChildren(); return wxPy_ConvertList(&list); @@ -825,11 +830,12 @@ do not change."); DocDeclStr( wxWindow *, GetParent() const, - "Returns the parent window of this window, or None if there isn't one."); + "Returns the parent window of this window, or None if there isn't one.", ""); DocDeclStr( wxWindow *, GetGrandParent() const, - "Returns the parent of the parent of this window, or None if there isn't one."); + "Returns the parent of the parent of this window, or None if there +isn't one.", ""); @@ -837,7 +843,7 @@ do not change."); virtual bool , IsTopLevel() const, "Returns true if the given window is a top-level one. Currently all frames and dialogs are always considered to be top-level windows (even -if they have a parent window)."); +if they have a parent window).", ""); // change the real parent of this window, return True if the parent @@ -848,19 +854,19 @@ if they have a parent window)."); parent window (e.g. a non-standard toolbar in a wxFrame) and then re-inserted into another. Available on Windows and GTK. Returns True if the parent was changed, False otherwise (error or newParent == -oldParent)"); +oldParent)", ""); DocDeclStr( virtual void , AddChild( wxWindow *child ), "Adds a child window. This is called automatically by window creation -functions so should not be required by the application programmer."); +functions so should not be required by the application programmer.", ""); DocDeclStr( virtual void , RemoveChild( wxWindow *child ), "Removes a child window. This is called automatically by window deletion functions so should not be required by the application -programmer."); +programmer.", ""); @@ -870,12 +876,12 @@ programmer."); DocDeclStrName( wxWindow *, FindWindow( long winid ), - "Find a chld of this window by window ID", + "Find a chld of this window by window ID", "", FindWindowById); DocDeclStrName( wxWindow *, FindWindow( const wxString& name ), - "Find a child of this window by name", + "Find a child of this window by name", "", FindWindowByName); @@ -886,7 +892,7 @@ programmer."); DocDeclStr( wxEvtHandler *, GetEventHandler() const, "Returns the event handler for this window. By default, the window is -its own event handler."); +its own event handler.", ""); DocDeclStr( @@ -897,9 +903,9 @@ the window is its own event handler, but an application may wish to substitute another, for example to allow central implementation of event-handling for a variety of different window classes. -It is usually better to use wx.Window.PushEventHandler since this sets +It is usually better to use `wx.Window.PushEventHandler` since this sets up a chain of event handlers, where an event not handled by one event -handler is handed to the next one in the chain."); +handler is handed to the next one in the chain.", ""); DocDeclStr( @@ -913,24 +919,24 @@ window classes. wx.Window.PushEventHandler allows an application to set up a chain of event handlers, where an event not handled by one event handler is -handed to the next one in the chain. Use wx.Window.PopEventHandler to -remove the event handler."); +handed to the next one in the chain. Use `wx.Window.PopEventHandler` to +remove the event handler.", ""); DocDeclStr( wxEvtHandler *, PopEventHandler( bool deleteHandler = False ), "Removes and returns the top-most event handler on the event handler stack. If deleteHandler is True then the wx.EvtHandler object will be -destroyed after it is popped."); +destroyed after it is popped.", ""); DocDeclStr( bool , RemoveEventHandler(wxEvtHandler *handler), - "Find the given handler in the event handler chain and remove (but -not delete) it from the event handler chain, return True if it was -found and False otherwise (this also results in an assert failure so -this function should only be called when the handler is supposed to -be there.)"); + "Find the given handler in the event handler chain and remove (but not +delete) it from the event handler chain, return True if it was found +and False otherwise (this also results in an assert failure so this +function should only be called when the handler is supposed to be +there.)", ""); @@ -944,42 +950,41 @@ be there.)"); virtual void , SetValidator( const wxValidator &validator ), "Deletes the current validator (if any) and sets the window validator, having called wx.Validator.Clone to create a new validator of this -type."); +type.", ""); DocDeclStr( virtual wxValidator *, GetValidator(), "Returns a pointer to the current validator for the window, or None if -there is none."); +there is none.", ""); DocDeclStr( virtual bool , Validate(), "Validates the current values of the child controls using their -validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY -extra style flag set, the method will also call Validate() of all -child windows. Returns false if any of the validations failed."); +validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra +style flag set, the method will also call Validate() of all child +windows. Returns false if any of the validations failed.", ""); DocDeclStr( virtual bool , TransferDataToWindow(), - "Transfers values to child controls from data areas specified by -their validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY -extra style flag set, the method will also call -TransferDataToWindow() of all child windows."); + "Transfers values to child controls from data areas specified by their +validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra +style flag set, the method will also call TransferDataToWindow() of +all child windows.", ""); DocDeclStr( virtual bool , TransferDataFromWindow(), - "Transfers values from child controls to data areas specified by -their validators. Returns false if a transfer failed. If the -window has wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the -method will also call TransferDataFromWindow() of all child -windows."); + "Transfers values from child controls to data areas specified by their +validators. Returns false if a transfer failed. If the window has +wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will +also call TransferDataFromWindow() of all child windows.", ""); DocDeclStr( virtual void , InitDialog(), - "Sends an EVT_INIT_DIALOG event, whose handler usually transfers -data to the dialog via validators."); + "Sends an EVT_INIT_DIALOG event, whose handler usually transfers data +to the dialog via validators.", ""); @@ -989,11 +994,11 @@ data to the dialog via validators."); DocDeclStr( virtual void , SetAcceleratorTable( const wxAcceleratorTable& accel ), - "Sets the accelerator table for this window."); + "Sets the accelerator table for this window.", ""); DocDeclStr( wxAcceleratorTable *, GetAcceleratorTable(), - "Gets the accelerator table for this window."); + "Gets the accelerator table for this window.", ""); @@ -1009,7 +1014,7 @@ receive the event even if the application is in the background and does not have the input focus because the user is working with some other application. To bind an event handler function to this hotkey use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the -hotkey was registered successfully."); +hotkey was registered successfully.", ""); bool RegisterHotKey(int hotkeyId, int modifiers, int keycode) { %#if wxUSE_HOTKEY return self->RegisterHotKey(hotkeyId, modifiers, keycode); @@ -1020,7 +1025,7 @@ hotkey was registered successfully."); DocStr(UnregisterHotKey, - "Unregisters a system wide hotkey."); + "Unregisters a system wide hotkey.", ""); bool UnregisterHotKey(int hotkeyId) { #if wxUSE_HOTKEY return self->UnregisterHotKey(hotkeyId); @@ -1041,7 +1046,7 @@ are used for maintaining a dialog's proportions even if the font changes. For the x dimension, the dialog units are multiplied by the average character width and then divided by 4. For the y dimension, the dialog units are multiplied by the average character height and -then divided by 8."); +then divided by 8.", ""); %name(ConvertDialogPointToPixels) wxPoint ConvertDialogToPixels(const wxPoint& pt); %name(ConvertDialogSizeToPixels) wxSize ConvertDialogToPixels(const wxSize& sz); %name(DLG_PNT) wxPoint ConvertDialogToPixels(const wxPoint& pt); @@ -1054,7 +1059,7 @@ are used for maintaining a dialog's proportions even if the font changes. For the x dimension, the dialog units are multiplied by the average character width and then divided by 4. For the y dimension, the dialog units are multiplied by the average character height and -then divided by 8."); +then divided by 8.", ""); %name(ConvertPixelPointToDialog) wxPoint ConvertPixelsToDialog(const wxPoint& pt); %name(ConvertPixelSizeToDialog) wxSize ConvertPixelsToDialog(const wxSize& sz); @@ -1068,7 +1073,7 @@ then divided by 8."); "Moves the pointer to the given position on the window. NOTE: This function is not supported under Mac because Apple Human -Interface Guidelines forbid moving the mouse cursor programmatically."); +Interface Guidelines forbid moving the mouse cursor programmatically.", ""); DocDeclStr( @@ -1080,21 +1085,21 @@ Note that wxWindows maintains the stack of windows having captured the mouse and when the mouse is released the capture returns to the window which had had captured it previously and it is only really released if there were no previous window. In particular, this means that you must -release the mouse as many times as you capture it."); +release the mouse as many times as you capture it.", ""); DocDeclStr( void , ReleaseMouse(), - "Releases mouse input captured with wx.Window.CaptureMouse."); + "Releases mouse input captured with wx.Window.CaptureMouse.", ""); DocDeclStr( static wxWindow *, GetCapture(), - "Returns the window which currently captures the mouse or None"); + "Returns the window which currently captures the mouse or None", ""); DocDeclStr( virtual bool , HasCapture() const, - "Returns true if this window has the current mouse capture."); + "Returns true if this window has the current mouse capture.", ""); @@ -1108,13 +1113,13 @@ release the mouse as many times as you capture it."); const wxRect *rect = NULL ), "Mark the specified rectangle (or the whole window) as \"dirty\" so it will be repainted. Causes an EVT_PAINT event to be generated and sent -to the window."); +to the window.", ""); DocDeclStr( void , RefreshRect(const wxRect& rect), "Redraws the contents of the given rectangle: the area inside it will -be repainted. This is the same as Refresh but has a nicer syntax."); +be repainted. This is the same as Refresh but has a nicer syntax.", ""); DocDeclStr( @@ -1125,60 +1130,61 @@ this would usually only happen when the flow of control returns to the event loop.) Notice that this function doesn't refresh the window and does nothing if the window has been already repainted. Use Refresh first if you want to immediately redraw the window (or some portion of -it) unconditionally."); +it) unconditionally.", ""); DocDeclStr( virtual void , ClearBackground(), "Clears the window by filling it with the current background -colour. Does not cause an erase background event to be generated."); +colour. Does not cause an erase background event to be generated.", ""); DocDeclStr( virtual void , Freeze(), - "Freezes the window or, in other words, prevents any updates from taking place -on screen, the window is not redrawn at all. Thaw must be called to reenable -window redrawing. Calls to Freeze/Thaw may be nested, with the actual Thaw -being delayed until all the nesting has been undone. + "Freezes the window or, in other words, prevents any updates from +taking place on screen, the window is not redrawn at all. Thaw must be +called to reenable window redrawing. Calls to Freeze/Thaw may be +nested, with the actual Thaw being delayed until all the nesting has +been undone. This method is useful for visual appearance optimization (for example, it is a good idea to use it before inserting large amount of text into a wxTextCtrl under wxGTK) but is not implemented on all platforms nor for all controls so it is mostly just a hint to wxWindows and not a -mandatory directive."); +mandatory directive.", ""); DocDeclStr( virtual void , Thaw(), "Reenables window updating after a previous call to Freeze. Calls to -Freeze/Thaw may be nested, so Thaw must be called the same number of times -that Freeze was before the window will be updated."); +Freeze/Thaw may be nested, so Thaw must be called the same number of +times that Freeze was before the window will be updated.", ""); DocDeclStr( virtual void , PrepareDC( wxDC & dc ), "Call this function to prepare the device context for drawing a scrolled image. It sets the device origin according to the current -scroll position."); +scroll position.", ""); DocDeclStr( wxRegion& , GetUpdateRegion(), "Returns the region specifying which parts of the window have been -damaged. Should only be called within an EVT_PAINT handler."); +damaged. Should only be called within an EVT_PAINT handler.", ""); DocDeclStr( wxRect , GetUpdateClientRect() const, - "Get the update rectangle region bounding box in client coords."); + "Get the update rectangle region bounding box in client coords.", ""); DocStr(IsExposed, "Returns true if the given point or rectangle area has been exposed since the last repaint. Call this in an paint event handler to optimize redrawing by only redrawing those areas, which have been -exposed."); +exposed.", ""); bool IsExposed( int x, int y, int w=1, int h=1 ) const; %name(IsExposedPoint) bool IsExposed( const wxPoint& pt ) const; %name(IsExposedRect) bool IsExposed( const wxRect& rect ) const; @@ -1191,26 +1197,25 @@ exposed."); DocDeclStr( virtual wxVisualAttributes , GetDefaultAttributes() const, - "Get the default attributes for an instance of this class. This -is useful if you want to use the same font or colour in your own -control as in a standard control -- which is a much better idea -than hard coding specific colours or fonts which might look -completely out of place on the users system, especially if it -uses themes."); + "Get the default attributes for an instance of this class. This is +useful if you want to use the same font or colour in your own control +as in a standard control -- which is a much better idea than hard +coding specific colours or fonts which might look completely out of +place on the users system, especially if it uses themes.", ""); DocDeclStr( static wxVisualAttributes , GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL), - "Get the default attributes for this class. This is useful if -you want to use the same font or colour in your own control as -in a standard control -- which is a much better idea than hard -coding specific colours or fonts which might look completely out -of place on the users system, especially if it uses themes. + "Get the default attributes for this class. This is useful if you want +to use the same font or colour in your own control as in a standard +control -- which is a much better idea than hard coding specific +colours or fonts which might look completely out of place on the users +system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is -ignore under other platforms. Under Mac, it will change the size of the -returned font. See SetWindowVariant for more about this."); +ignore under other platforms. Under Mac, it will change the size of +the returned font. See SetWindowVariant for more about this.", ""); DocDeclStr( @@ -1227,11 +1232,11 @@ calling this function. Use this function with care under GTK+ as the new appearance of the window might not look equally well when used with themes, i.e GTK+'s ability to change its look as the user wishes with run-time loadable -modules."); +modules.", ""); DocDeclStr( void , SetDefaultBackgroundColour(const wxColour& colour), - ""); + "", ""); @@ -1240,23 +1245,23 @@ modules."); "Sets the foreground colour of the window. Returns True is the colour was changed. The interpretation of foreground colour is dependent on the window class; it may be the text colour or other colour, or it may -not be used at all."); +not be used at all.", ""); DocDeclStr( void , SetDefaultForegroundColour(const wxColour& colour), - ""); + "", ""); DocDeclStr( wxColour , GetBackgroundColour() const, - "Returns the background colour of the window."); + "Returns the background colour of the window.", ""); DocDeclStr( wxColour , GetForegroundColour() const, "Returns the foreground colour of the window. The interpretation of foreground colour is dependent on the window class; it may be the text -colour or other colour, or it may not be used at all."); +colour or other colour, or it may not be used at all.", ""); @@ -1267,61 +1272,61 @@ colour or other colour, or it may not be used at all."); for the children of the window implicitly. The cursor may be wx.NullCursor in which case the window cursor will -be reset back to default."); +be reset back to default.", ""); DocDeclStr( wxCursor& , GetCursor(), - "Return the cursor associated with this window."); + "Return the cursor associated with this window.", ""); DocDeclStr( virtual bool , SetFont( const wxFont &font ), - "Sets the font for this window."); + "Sets the font for this window.", ""); DocDeclStr( void , SetDefaultFont(const wxFont& font), - ""); + "", ""); DocDeclStr( wxFont& , GetFont(), - "Returns the default font used for this window."); + "Returns the default font used for this window.", ""); DocDeclStr( void , SetCaret(wxCaret *caret), - "Sets the caret associated with the window."); + "Sets the caret associated with the window.", ""); DocDeclStr( wxCaret *, GetCaret() const, - "Returns the caret associated with the window."); + "Returns the caret associated with the window.", ""); DocDeclStr( virtual int , GetCharHeight() const, - "Get the (average) character size for the current font."); + "Get the (average) character size for the current font.", ""); DocDeclStr( virtual int , GetCharWidth() const, - "Get the (average) character size for the current font."); + "Get the (average) character size for the current font.", ""); DocDeclAStr( void, GetTextExtent(const wxString& string, int *OUTPUT, int *OUTPUT), "GetTextExtent(String string) -> (width, height)", - "Get the width and height of the text using the current font."); + "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(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.", +current or specified font.", "", GetFullTextExtent); @@ -1335,34 +1340,34 @@ current or specified font.", DocDeclAStrName( void , ClientToScreen( int *x, int *y ) const, "ClientToScreenXY(int x, int y) -> (x,y)", - "Converts to screen coordinates from coordinates relative to this window.", + "Converts to screen coordinates from coordinates relative to this window.", "", ClientToScreenXY); DocDeclAStrName( void , ScreenToClient( int *x, int *y ) const, "ScreenToClientXY(int x, int y) -> (x,y)", - "Converts from screen to client window coordinates.", + "Converts from screen to client window coordinates.", "", ScreenToClientXY); DocDeclStr( wxPoint , ClientToScreen(const wxPoint& pt) const, - "Converts to screen coordinates from coordinates relative to this window."); + "Converts to screen coordinates from coordinates relative to this window.", ""); DocDeclStr( wxPoint , ScreenToClient(const wxPoint& pt) const, - "Converts from screen to client window coordinates."); + "Converts from screen to client window coordinates.", ""); DocDeclStrName( wxHitTest , HitTest(wxCoord x, wxCoord y) const, - "Test where the given (in client coords) point lies", + "Test where the given (in client coords) point lies", "", HitTestXY); DocDeclStr( wxHitTest , HitTest(const wxPoint& pt) const, - "Test where the given (in client coords) point lies"); + "Test where the given (in client coords) point lies", ""); @@ -1377,11 +1382,11 @@ current or specified font.", from simply doing flags & wxBORDER_MASK because it uses GetDefaultBorder() to translate wxBORDER_DEFAULT to something reasonable. -"); +", ""); DocDeclStr( wxBorder , GetBorder() const, - "Get border for the flags of this window"); + "Get border for the flags of this window", ""); @@ -1397,20 +1402,22 @@ a particular point in time (as far as your EVT_UPDATE_UI handlers are concerned). This may be necessary if you have called wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to limit the overhead that wxWindows incurs by sending update UI events -in idle time. - +in idle time.", +" The flags should be a bitlist of one or more of the following values: + ===================== ============================== wx.UPDATE_UI_NONE No particular value wx.UPDATE_UI_RECURSE Call the function for descendants wx.UPDATE_UI_FROMIDLE Invoked from OnIdle + ===================== ============================== If you are calling this function from an OnIdle function, make sure -you pass the wx.UPDATE_UI_FROMIDLE flag, since this tells the window to -only update the UI elements that need to be updated in idle time. Some -windows update their elements only when necessary, for example when a -menu is about to be shown. The following is an example of how to call -UpdateWindowUI from an idle function. +you pass the wx.UPDATE_UI_FROMIDLE flag, since this tells the window +to only update the UI elements that need to be updated in idle +time. Some windows update their elements only when necessary, for +example when a menu is about to be shown. The following is an example +of how to call UpdateWindowUI from an idle function:: def OnIdle(self, evt): if wx.UpdateUIEvent.CanUpdate(self): @@ -1427,7 +1434,7 @@ UpdateWindowUI from an idle function. "Pops up the given menu at the specified coordinates, relative to this window, and returns control when the user has dismissed the menu. If a menu item is selected, the corresponding menu event is generated and -will be processed as usual."); +will be processed as usual.", ""); %name(PopupMenuXY) bool PopupMenu(wxMenu *menu, int x, int y); bool PopupMenu(wxMenu *menu, const wxPoint& pos); @@ -1438,7 +1445,7 @@ will be processed as usual."); DocStr(GetHandle, "Returns the platform-specific handle (as a long integer) of the physical window. Currently on wxMac it returns the handle of the -toplevel parent of the window."); +toplevel parent of the window.", ""); long GetHandle() { return wxPyGetWinHandle(self); } @@ -1459,45 +1466,46 @@ toplevel parent of the window."); DocDeclStr( bool , HasScrollbar(int orient) const, - "Does the window have the scrollbar for this orientation?"); + "Does the window have the scrollbar for this orientation?", ""); // configure the window scrollbars DocDeclStr( virtual void , SetScrollbar( int orientation, - int pos, - int thumbvisible, + int position, + int thumbSize, int range, bool refresh = True ), - "Sets the scrollbar properties of a built-in scrollbar. + "Sets the scrollbar properties of a built-in scrollbar.", + " + :param orientation: Determines the scrollbar whose page size is to + be set. May be wx.HORIZONTAL or wx.VERTICAL. - orientation: Determines the scrollbar whose page size is to be - set. May be wx.HORIZONTAL or wx.VERTICAL. + :param position: The position of the scrollbar in scroll units. - position: The position of the scrollbar in scroll units. - - thumbSize: The size of the thumb, or visible portion of the + :param thumbSize: The size of the thumb, or visible portion of the scrollbar, in scroll units. - range: The maximum position of the scrollbar. + :param range: The maximum position of the scrollbar. - refresh: True to redraw the scrollbar, false otherwise."); + :param refresh: True to redraw the scrollbar, false otherwise. +"); DocDeclStr( virtual void , SetScrollPos( int orientation, int pos, bool refresh = True ), - "Sets the position of one of the built-in scrollbars."); + "Sets the position of one of the built-in scrollbars.", ""); DocDeclStr( virtual int , GetScrollPos( int orientation ) const, - "Returns the built-in scrollbar position."); + "Returns the built-in scrollbar position.", ""); DocDeclStr( virtual int , GetScrollThumb( int orientation ) const, - "Returns the built-in scrollbar thumb size."); + "Returns the built-in scrollbar thumb size.", ""); DocDeclStr( virtual int , GetScrollRange( int orientation ) const, - "Returns the built-in scrollbar range."); + "Returns the built-in scrollbar range.", ""); @@ -1508,16 +1516,16 @@ toplevel parent of the window."); "Physically scrolls the pixels in the window and move child windows accordingly. Use this function to optimise your scrolling implementations, to minimise the area that must be redrawn. Note that -it is rarely required to call this function from a user program. - - dx: Amount to scroll horizontally. +it is rarely required to call this function from a user program.", +" + :param dx: Amount to scroll horizontally. - dy: Amount to scroll vertically. + :param dy: Amount to scroll vertically. - rect: Rectangle to invalidate. If this is None, the whole window - is invalidated. If you pass a rectangle corresponding to the - area of the window exposed by the scroll, your painting - handler can optimize painting by checking for the + :param rect: Rectangle to invalidate. If this is None, the whole + window is invalidated. If you pass a rectangle corresponding + to the area of the window exposed by the scroll, your + painting handler can optimize painting by checking for the invalidated region."); @@ -1526,31 +1534,31 @@ it is rarely required to call this function from a user program. "If the platform and window class supports it, scrolls the window by the given number of lines down, if lines is positive, or up if lines is negative. Returns True if the window was scrolled, False if it was -already on top/bottom and nothing was done."); +already on top/bottom and nothing was done.", ""); DocDeclStr( virtual bool , ScrollPages(int pages), - "If the platform and window class supports it, scrolls the window by + "If the platform and window class supports it, scrolls the window by the given number of pages down, if pages is positive, or up if pages is negative. Returns True if the window was scrolled, False if it was -already on top/bottom and nothing was done."); +already on top/bottom and nothing was done.", ""); DocDeclStr( bool , LineUp(), - "This is just a wrapper for ScrollLines(-1)."); + "This is just a wrapper for ScrollLines(-1).", ""); DocDeclStr( bool , LineDown(), - "This is just a wrapper for ScrollLines(1)."); + "This is just a wrapper for ScrollLines(1).", ""); DocDeclStr( bool , PageUp(), - "This is just a wrapper for ScrollPages(-1)."); + "This is just a wrapper for ScrollPages(-1).", ""); DocDeclStr( bool , PageDown(), - "This is just a wrapper for ScrollPages(1)."); + "This is just a wrapper for ScrollPages(1).", ""); @@ -1562,20 +1570,20 @@ already on top/bottom and nothing was done."); void , SetHelpText(const wxString& text), "Sets the help text to be used as context-sensitive help for this window. Note that the text is actually stored by the current -wxHelpProvider implementation, and not in the window object itself."); +wxHelpProvider implementation, and not in the window object itself.", ""); DocDeclStr( void , SetHelpTextForId(const wxString& text), "Associate this help text with all windows with the same id as this -one."); +one.", ""); DocDeclStr( wxString , GetHelpText() const, "Gets the help text to be used as context-sensitive help for this window. Note that the text is actually stored by the current -wxHelpProvider implementation, and not in the window object itself."); +wxHelpProvider implementation, and not in the window object itself.", ""); @@ -1584,13 +1592,13 @@ wxHelpProvider implementation, and not in the window object itself."); // -------- DocStr(SetToolTip, - "Attach a tooltip to the window."); + "Attach a tooltip to the window.", ""); %name(SetToolTipString) void SetToolTip( const wxString &tip ); void SetToolTip( wxToolTip *tip ); DocDeclStr( wxToolTip* , GetToolTip() const, - "get the associated tooltip or None if none"); + "get the associated tooltip or None if none", ""); // LINK ERROR --> wxString GetToolTipText() const; #endif @@ -1608,21 +1616,21 @@ wxHelpProvider implementation, and not in the window object itself."); DocDeclStr( virtual void , SetDropTarget( wxPyDropTarget *dropTarget ), "Associates a drop target with this window. If the window already has -a drop target, it is deleted."); +a drop target, it is deleted.", ""); %clear wxPyDropTarget *dropTarget; DocDeclStr( virtual wxPyDropTarget *, GetDropTarget() const, - "Returns the associated drop target, which may be None."); + "Returns the associated drop target, which may be None.", ""); #ifdef __WXMSW__ // TODO: should I drop-kick this? DocDeclStr( void , DragAcceptFiles(bool accept), "Enables or disables eligibility for drop file events, EVT_DROP_FILES. -Only available on Windows."); +Only available on Windows.", ""); #endif #endif @@ -1642,12 +1650,12 @@ You must call SetAutoLayout to tell a window to use the constraints automatically in its default EVT_SIZE handler; otherwise, you must handle EVT_SIZE yourself and call Layout() explicitly. When setting both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have -effect."); +effect.", ""); DocDeclStr( wxLayoutConstraints *, GetConstraints() const, "Returns a pointer to the window's layout constraints, or None if there -are none."); +are none.", ""); DocDeclStr( @@ -1655,11 +1663,11 @@ are none."); "Determines whether the Layout function will be called automatically when the window is resized. It is called implicitly by SetSizer but if you use SetConstraints you should call it manually or otherwise the -window layout won't be correctly updated when its size changes."); +window layout won't be correctly updated when its size changes.", ""); DocDeclStr( bool , GetAutoLayout() const, - "Returns the current autoLayout setting"); + "Returns the current autoLayout setting", ""); DocDeclStr( @@ -1667,7 +1675,7 @@ window layout won't be correctly updated when its size changes."); "Invokes the constraint-based layout algorithm or the sizer-based algorithm for this window. See SetAutoLayout: when auto layout is on, this function gets called automatically by the default EVT_SIZE -handler when the window is resized."); +handler when the window is resized.", ""); DocDeclStr( @@ -1677,18 +1685,18 @@ own the object, and will take care of its deletion. If an existing layout sizer object is already owned by the window, it will be deleted if the deleteOld parameter is true. Note that this function will also call SetAutoLayout implicitly with a True parameter if the sizer is -non-NoneL and False otherwise."); +non-NoneL and False otherwise.", ""); DocDeclStr( void , SetSizerAndFit( wxSizer *sizer, bool deleteOld = True ), "The same as SetSizer, except it also sets the size hints for the -window based on the sizer's minimum size."); +window based on the sizer's minimum size.", ""); DocDeclStr( wxSizer *, GetSizer() const, "Return the sizer associated with the window by a previous call to -SetSizer or None if there isn't one."); +SetSizer or None if there isn't one.", ""); // Track if this window is a member of a sizer @@ -1696,11 +1704,11 @@ SetSizer or None if there isn't one."); void , SetContainingSizer(wxSizer* sizer), "This normally does not need to be called by application code. It is called internally when a window is added to a sizer, and is used so -the window can remove itself from the sizer when it is destroyed."); +the window can remove itself from the sizer when it is destroyed.", ""); DocDeclStr( wxSizer *, GetContainingSizer() const, - "Return the sizer that this window is a member of, if any, otherwise None."); + "Return the sizer that this window is a member of, if any, otherwise None.", ""); @@ -1726,41 +1734,41 @@ the window can remove itself from the sizer when it is destroyed."); DocDeclStr( virtual void , InheritAttributes(), - "This function is (or should be, in case of custom controls) -called during window creation to intelligently set up the window -visual attributes, that is the font and the foreground and -background colours. - -By 'intelligently' the following is meant: by default, all -windows use their own default attributes. However if some of the -parent's attributes are explicitly changed (that is, using -SetFont and not SetDefaultFont) and if the corresponding -attribute hadn't been explicitly set for this window itself, then -this window takes the same value as used by the parent. In -addition, if the window overrides ShouldInheritColours to return -false, the colours will not be changed no matter what and only -the font might. - -This rather complicated logic is necessary in order to accomodate -the different usage scenarius. The most common one is when all -default attributes are used and in this case, nothing should be -inherited as in modern GUIs different controls use different -fonts (and colours) than their siblings so they can't inherit the -same value from the parent. However it was also deemed desirable -to allow to simply change the attributes of all children at once -by just changing the font or colour of their common parent, hence -in this case we do inherit the parents attributes."); + "This function is (or should be, in case of custom controls) called +during window creation to intelligently set up the window visual +attributes, that is the font and the foreground and background +colours. + +By 'intelligently' the following is meant: by default, all windows use +their own default attributes. However if some of the parent's +attributes are explicitly changed (that is, using SetFont and not +SetDefaultFont) and if the corresponding attribute hadn't been +explicitly set for this window itself, then this window takes the same +value as used by the parent. In addition, if the window overrides +ShouldInheritColours to return false, the colours will not be changed +no matter what and only the font might. + +This rather complicated logic is necessary in order to accomodate the +different usage scenarius. The most common one is when all default +attributes are used and in this case, nothing should be inherited as +in modern GUIs different controls use different fonts (and colours) +than their siblings so they can't inherit the same value from the +parent. However it was also deemed desirable to allow to simply change +the attributes of all children at once by just changing the font or +colour of their common parent, hence in this case we do inherit the +parents attributes. +", ""); // TODO: Virtualize this with directors DocDeclStr( virtual bool , ShouldInheritColours() const, "Return true from here to allow the colours of this window to be -changed by InheritAttributes, returning false forbids inheriting -them from the parent window. +changed by InheritAttributes, returning false forbids inheriting them +from the parent window. -The base class version returns false, but this method is -overridden in wxControl where it returns true."); +The base class version returns false, but this method is overridden in +wxControl where it returns true.", ""); @@ -1822,7 +1830,7 @@ DocStr(wxFindWindowById, "Find the first window in the application with the given id. If parent is None, the search will start from all top-level frames and dialog boxes; if non-None, the search will be limited to the given window -hierarchy. The search is recursive in both cases."); +hierarchy. The search is recursive in both cases.", ""); DocStr(wxFindWindowByName, "Find a window by its name (as given in a window constructor or Create @@ -1831,14 +1839,14 @@ top-level frames and dialog boxes; if non-None, the search will be limited to the given window hierarchy. The search is recursive in both cases. -If no window with such name is found, wx.FindWindowByLabel is called."); +If no window with such name is found, wx.FindWindowByLabel is called.", ""); DocStr(wxFindWindowByLabel, "Find a window by its label. Depending on the type of window, the label may be a window title or panel item label. If parent is None, the search will start from all top-level frames and dialog boxes; if non-None, the search will be limited to the given window -hierarchy. The search is recursive in both cases."); +hierarchy. The search is recursive in both cases.", ""); %inline %{ diff --git a/wxPython/src/calendar.i b/wxPython/src/calendar.i index c046cd14f4..07364284c1 100644 --- a/wxPython/src/calendar.i +++ b/wxPython/src/calendar.i @@ -63,13 +63,13 @@ enum wxCalendarDateBorder DocStr(wxCalendarDateAttr, "A set of customization attributes for a calendar date, which can be -used to control the look of the Calendar object."); +used to control the look of the Calendar object.", ""); class wxCalendarDateAttr { public: DocStr(wxCalendarDateAttr, - "Create a CalendarDateAttr."); + "Create a CalendarDateAttr.", ""); wxCalendarDateAttr(const wxColour& colText = wxNullColour, const wxColour& colBack = wxNullColour, const wxColour& colBorder = wxNullColour, @@ -165,7 +165,7 @@ recognized as one by wx.DateTime) by using the SetHoliday method. As the attributes are specified for each day, they may change when the month is changed, so you will often want to update them in an -EVT_CALENDAR_MONTH event handler. +EVT_CALENDAR_MONTH event handler.", " Window Styles ------------- @@ -212,8 +212,6 @@ public: %pythonAppend wxCalendarCtrl "self._setOORInfo(self)" %pythonAppend wxCalendarCtrl() "" - RefDoc(wxCalendarCtrl, ""); // turn it off for the ctors - DocCtorStr( wxCalendarCtrl(wxWindow *parent, wxWindowID id=-1, @@ -222,11 +220,11 @@ public: const wxSize& size = wxDefaultSize, long style = wxCAL_SHOW_HOLIDAYS | wxWANTS_CHARS, const wxString& name = wxPyCalendarNameStr), - "Create and show a calendar control."); + "Create and show a calendar control.", ""); DocCtorStrName( wxCalendarCtrl(), - "Precreate a CalendarCtrl for 2-phase creation.", + "Precreate a CalendarCtrl for 2-phase creation.", "", PreCalendarCtrl); DocDeclStr( @@ -238,40 +236,40 @@ public: long style = wxCAL_SHOW_HOLIDAYS | wxWANTS_CHARS, const wxString& name = wxPyCalendarNameStr), "Acutally create the GUI portion of the CalendarCtrl for 2-phase -creation."); +creation.", ""); DocDeclStr( void, SetDate(const wxDateTime& date), - "Sets the current date."); + "Sets the current date.", ""); DocDeclStr( const wxDateTime&, GetDate() const, - "Gets the currently selected date."); + "Gets the currently selected date.", ""); DocDeclStr( bool, SetLowerDateLimit(const wxDateTime& date = wxDefaultDateTime), - "set the range in which selection can occur"); + "set the range in which selection can occur", ""); DocDeclStr( bool, SetUpperDateLimit(const wxDateTime& date = wxDefaultDateTime), - "set the range in which selection can occur"); + "set the range in which selection can occur", ""); DocDeclStr( const wxDateTime&, GetLowerDateLimit() const, - "get the range in which selection can occur"); + "get the range in which selection can occur", ""); DocDeclStr( const wxDateTime&, GetUpperDateLimit() const, - "get the range in which selection can occur"); + "get the range in which selection can occur", ""); DocDeclStr( bool, SetDateRange(const wxDateTime& lowerdate = wxDefaultDateTime, const wxDateTime& upperdate = wxDefaultDateTime), - "set the range in which selection can occur"); + "set the range in which selection can occur", ""); @@ -280,87 +278,87 @@ creation."); void, EnableYearChange(bool enable = True), "This function should be used instead of changing CAL_NO_YEAR_CHANGE style bit directly. It allows or disallows the user to change the year -interactively."); +interactively.", ""); DocDeclStr( void, EnableMonthChange(bool enable = True), "This function should be used instead of changing CAL_NO_MONTH_CHANGE style bit. It allows or disallows the user to change the month interactively. Note that if the month can not be changed, the year can -not be changed either."); +not be changed either.", ""); DocDeclStr( void, EnableHolidayDisplay(bool display = True), "This function should be used instead of changing CAL_SHOW_HOLIDAYS style bit directly. It enables or disables the special highlighting of -the holidays."); +the holidays.", ""); DocDeclStr( void, SetHeaderColours(const wxColour& colFg, const wxColour& colBg), - "Header colours are used for painting the weekdays at the top."); + "Header colours are used for painting the weekdays at the top.", ""); DocDeclStr( wxColour, GetHeaderColourFg() const, - "Header colours are used for painting the weekdays at the top."); + "Header colours are used for painting the weekdays at the top.", ""); DocDeclStr( wxColour, GetHeaderColourBg() const, - "Header colours are used for painting the weekdays at the top."); + "Header colours are used for painting the weekdays at the top.", ""); DocDeclStr( void, SetHighlightColours(const wxColour& colFg, const wxColour& colBg), - "Highlight colour is used for the currently selected date."); + "Highlight colour is used for the currently selected date.", ""); DocDeclStr( wxColour, GetHighlightColourFg() const, - "Highlight colour is used for the currently selected date."); + "Highlight colour is used for the currently selected date.", ""); DocDeclStr( wxColour, GetHighlightColourBg() const, - "Highlight colour is used for the currently selected date."); + "Highlight colour is used for the currently selected date.", ""); DocDeclStr( void, SetHolidayColours(const wxColour& colFg, const wxColour& colBg), "Holiday colour is used for the holidays (if CAL_SHOW_HOLIDAYS style is -used)."); +used).", ""); DocDeclStr( wxColour, GetHolidayColourFg() const, "Holiday colour is used for the holidays (if CAL_SHOW_HOLIDAYS style is -used)."); +used).", ""); DocDeclStr( wxColour, GetHolidayColourBg() const, "Holiday colour is used for the holidays (if CAL_SHOW_HOLIDAYS style is -used)."); +used).", ""); DocDeclStr( wxCalendarDateAttr*, GetAttr(size_t day) const, "Returns the attribute for the given date (should be in the range -1...31). The returned value may be None"); +1...31). The returned value may be None", ""); DocDeclStr( void, SetAttr(size_t day, wxCalendarDateAttr *attr), "Associates the attribute with the specified date (in the range 1...31). If the attribute passed is None, the items attribute is -cleared."); +cleared.", ""); DocDeclStr( void, SetHoliday(size_t day), - "Marks the specified day as being a holiday in the current month."); + "Marks the specified day as being a holiday in the current month.", ""); DocDeclStr( void, ResetAttr(size_t day), "Clears any attributes associated with the given day (in the range -1...31)."); +1...31).", ""); @@ -368,8 +366,9 @@ cleared."); "HitTest(Point pos) -> (result, date, weekday)", "Returns 3-tuple with information about the given position on the calendar control. The first value of the tuple is a result code and -determines the validity of the remaining two values. The result codes -are: +determines the validity of the remaining two values.", +" +The result codes are: =================== ============================================ CAL_HITTEST_NOWHERE hit outside of anything @@ -394,11 +393,11 @@ are: DocDeclStr( wxControl*, GetMonthControl() const, - "Get the currently shown control for month."); + "Get the currently shown control for month.", ""); DocDeclStr( wxControl*, GetYearControl() const, - "Get the currently shown control for year."); + "Get the currently shown control for year.", ""); static wxVisualAttributes GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); diff --git a/wxPython/src/grid.i b/wxPython/src/grid.i index 51f571f8e4..c6b0867727 100644 --- a/wxPython/src/grid.i +++ b/wxPython/src/grid.i @@ -1505,7 +1505,7 @@ public: bool operator!=( const wxGridCellCoords& other ) const; %extend { - PyObject* asTuple() { + PyObject* Get() { PyObject* tup = PyTuple_New(2); PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->GetRow())); PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(self->GetCol())); @@ -1513,9 +1513,10 @@ public: } } %pythoncode { - def __str__(self): return str(self.asTuple()) - def __repr__(self): return 'wxGridCellCoords'+str(self.asTuple()) - def __len__(self): return len(self.asTuple()) + asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") + def __str__(self): return str(self.Get()) + def __repr__(self): return 'wxGridCellCoords'+str(self.Get()) + def __len__(self): return len(self.Get()) def __getitem__(self, index): return self.asTuple()[index] def __setitem__(self, index, val): if index == 0: self.SetRow(val) diff --git a/wxPython/src/html.i b/wxPython/src/html.i index ea61500113..5dcc2c635a 100644 --- a/wxPython/src/html.i +++ b/wxPython/src/html.i @@ -858,7 +858,7 @@ public: DocDeclStr( void, SetTitle(const wxString& title), - ""); + "", ""); // Sets space between text and window borders. void SetBorders(int b); -- 2.45.2