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
This commit is contained in:
Robin Dunn
2004-05-12 00:17:48 +00:00
parent 0b9c95225e
commit d07d2bc9d0
41 changed files with 1657 additions and 1537 deletions

View File

@@ -101,6 +101,11 @@ SWIG = "swig" # The swig executable to use.
BUILD_RENAMERS = 1 # Should we build the renamer modules too? 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 UNICODE = 0 # This will pass the 'wxUSE_UNICODE' flag to SWIG and
# will ensure that the right headers are found and the # will ensure that the right headers are found and the
# right libs are linked. # 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', 'BUILD_GIZMOS', 'BUILD_DLLWIDGET', 'BUILD_IEWIN', 'BUILD_ACTIVEX',
'CORE_ONLY', 'PREP_ONLY', 'USE_SWIG', 'UNICODE', 'CORE_ONLY', 'PREP_ONLY', 'USE_SWIG', 'UNICODE',
'UNDEF_NDEBUG', 'NO_SCRIPTS', 'NO_HEADERS', 'BUILD_RENAMERS', 'UNDEF_NDEBUG', 'NO_SCRIPTS', 'NO_HEADERS', 'BUILD_RENAMERS',
'FULL_DOCS',
'FINAL', 'HYBRID', ]: 'FINAL', 'HYBRID', ]:
for x in range(len(sys.argv)): for x in range(len(sys.argv)):
if sys.argv[x].find(flag) == 0: if sys.argv[x].find(flag) == 0:
@@ -741,6 +747,10 @@ swig_args = ['-c++',
if UNICODE: if UNICODE:
swig_args.append('-DwxUSE_UNICODE') swig_args.append('-DwxUSE_UNICODE')
if FULL_DOCS:
swig_args.append('-D_DO_FULL_DOCS')
swig_deps = [ 'src/my_typemaps.i', swig_deps = [ 'src/my_typemaps.i',
'src/common.swg', 'src/common.swg',
'src/pyrun.swg', 'src/pyrun.swg',

View File

@@ -246,13 +246,10 @@ def doDocStrings(parentNode, srcNode):
autodoc = getAttr(srcNode, "python_autodoc") autodoc = getAttr(srcNode, "python_autodoc")
docstr = getAttr(srcNode, "feature_docstring") docstr = getAttr(srcNode, "feature_docstring")
refdoc = getAttr(srcNode, "feature_refdoc")
if autodoc: if autodoc:
parentNode.addChild(makeDocElement("autodoc", autodoc)) parentNode.addChild(makeDocElement("autodoc", autodoc))
if docstr: if docstr:
parentNode.addChild(makeDocElement("docstring", docstr)) parentNode.addChild(makeDocElement("docstring", docstr))
if refdoc:
parentNode.addChild(makeDocElement("refdoc", refdoc))

View File

@@ -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 list of 3-tuple of integers (flags, keyCode, cmdID) usually works just
as well. See `__init__` for details of the tuple values. as well. See `__init__` for details of the tuple values.
:see: `wx.AcceleratorTable`"); :see: `wx.AcceleratorTable`", "");
class wxAcceleratorEntry { class wxAcceleratorEntry {
public: public:
DocCtorStr( DocCtorStr(
wxAcceleratorEntry(int flags = 0, int keyCode = 0, int cmdID = 0/*, wxMenuItem *menuitem = NULL*/), wxAcceleratorEntry(int flags = 0, int keyCode = 0, int cmdID = 0/*, wxMenuItem *menuitem = NULL*/),
"Construct a wx.AcceleratorEntry. "Construct a wx.AcceleratorEntry.",
"
:param flags: A bitmask of wx.ACCEL_ALT, wx.ACCEL_SHIFT, :param flags: A bitmask of wx.ACCEL_ALT, wx.ACCEL_SHIFT,
wx.ACCEL_CTRL or wx.ACCEL_NORMAL used to specify wx.ACCEL_CTRL or wx.ACCEL_NORMAL used to specify
which modifier keys are held down. which modifier keys are held down.
:param keyCode: The keycode to be detected :param keyCode: The keycode to be detected
:param cmdID: The menu or control command ID to use for the :param cmdID: The menu or control command ID to use for the
accellerator event. accellerator event.
"); ");
~wxAcceleratorEntry(); ~wxAcceleratorEntry();
@@ -56,7 +56,7 @@ public:
DocDeclStr( DocDeclStr(
void , Set(int flags, int keyCode, int cmd/*, wxMenuItem *menuItem = NULL*/), void , Set(int flags, int keyCode, int cmd/*, wxMenuItem *menuItem = NULL*/),
"(Re)set the attributes of a wx.AcceleratorEntry. "(Re)set the attributes of a wx.AcceleratorEntry.
:see `__init__`"); :see `__init__`", "");
// void SetMenuItem(wxMenuItem *item); // void SetMenuItem(wxMenuItem *item);
@@ -64,15 +64,15 @@ public:
DocDeclStr( DocDeclStr(
int , GetFlags(), int , GetFlags(),
"Get the AcceleratorEntry's flags."); "Get the AcceleratorEntry's flags.", "");
DocDeclStr( DocDeclStr(
int , GetKeyCode(), int , GetKeyCode(),
"Get the AcceleratorEntry's keycode."); "Get the AcceleratorEntry's keycode.", "");
DocDeclStr( DocDeclStr(
int , GetCommand(), 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 "An accelerator table allows the application to specify a table of
keyboard shortcuts for menus or other commands. On Windows, menu or keyboard shortcuts for menus or other commands. On Windows, menu or
button commands are supported; on GTK, only menu commands are button commands are supported; on GTK, only menu commands are
supported. supported.", "
The object ``wx.NullAcceleratorTable`` is defined to be a table with The object ``wx.NullAcceleratorTable`` is defined to be a table with
no data, and is the initial accelerator table for a window. 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` "Construct an AcceleratorTable from a list of `wx.AcceleratorEntry`
items or or of 3-tuples (flags, keyCode, cmdID) items or or of 3-tuples (flags, keyCode, cmdID)
:see: `wx.AcceleratorEntry`"); :see: `wx.AcceleratorEntry`", "");
wxAcceleratorTable(int n, const wxAcceleratorEntry* entries); wxAcceleratorTable(int n, const wxAcceleratorEntry* entries);
~wxAcceleratorTable(); ~wxAcceleratorTable();

View File

@@ -42,7 +42,7 @@ enum
DocStr(wxPyApp, DocStr(wxPyApp,
"The ``wx.PyApp`` class is an *implementation detail*, please use the "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 { class wxPyApp : public wxEvtHandler {
public: public:
@@ -52,7 +52,7 @@ public:
self._setOORInfo(self)"; self._setOORInfo(self)";
DocStr(wxPyApp, DocStr(wxPyApp,
"Create a new application object, starting the bootstrap process."); "Create a new application object, starting the bootstrap process.", "");
%extend { %extend {
wxPyApp() { wxPyApp() {
wxPythonApp = new wxPyApp(); wxPythonApp = new wxPyApp();
@@ -67,27 +67,27 @@ public:
DocDeclStr( DocDeclStr(
wxString, GetAppName() const, wxString, GetAppName() const,
"Get the application name."); "Get the application name.", "");
DocDeclStr( DocDeclStr(
void, SetAppName(const wxString& name), void, SetAppName(const wxString& name),
"Set the application name. This value may be used automatically by "Set the application name. This value may be used automatically by
`wx.Config` and such."); `wx.Config` and such.", "");
DocDeclStr( DocDeclStr(
wxString, GetClassName() const, wxString, GetClassName() const,
"Get the application's class name."); "Get the application's class name.", "");
DocDeclStr( DocDeclStr(
void, SetClassName(const wxString& name), void, SetClassName(const wxString& name),
"Set the application's class name. This value may be used for "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( DocDeclStr(
const wxString&, GetVendorName() const, const wxString&, GetVendorName() const,
"Get the application's vendor name."); "Get the application's vendor name.", "");
DocDeclStr( DocDeclStr(
void, SetVendorName(const wxString& name), void, SetVendorName(const wxString& name),
"Set the application's vendor name. This value may be used "Set the application's vendor name. This value may be used
automatically by `wx.Config` and such."); automatically by `wx.Config` and such.", "");
DocDeclStr( 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 GUI/console dependent as then wx.AppTraits allows us to abstract the
differences behind the common facade. differences behind the common facade.
:todo: Add support for overriding CreateAppTraits in wxPython."); :todo: Add support for overriding CreateAppTraits in wxPython.", "");
DocDeclStr( DocDeclStr(
virtual void, ProcessPendingEvents(), virtual void, ProcessPendingEvents(),
"Process all events in the Pending Events list -- it is necessary to "Process all events in the Pending Events list -- it is necessary to
call this function to process posted events. This normally happens call this function to process posted events. This normally happens
during each event loop iteration."); during each event loop iteration.", "");
DocDeclStr( 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. recursively unless the value of ``onlyIfNeeded`` is True.
:warning: This function is dangerous as it can lead to unexpected :warning: This function is dangerous as it can lead to unexpected
reentrancies (i.e. when called from an event handler it may reentrancies (i.e. when called from an event handler it may
result in calling the same event handler again), use with result in calling the same event handler again), use with
_extreme_ care or, better, don't use at all! extreme care or, better, don't use at all!
:see: `wx.Yield`, `wx.YieldIfNeeded`, `wx.SafeYield`"); :see: `wx.Yield`, `wx.YieldIfNeeded`, `wx.SafeYield`
", "");
DocDeclStr( DocDeclStr(
virtual void, WakeUpIdle(), virtual void, WakeUpIdle(),
"Make sure that idle events are sent again. "Make sure that idle events are sent again.
:see: `wx.WakeUpIdle`"); :see: `wx.WakeUpIdle`", "");
DocDeclStr( DocDeclStr(
virtual int, MainLoop(), virtual int, MainLoop(),
"Execute the main GUI loop, the function doesn't normally return until "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( DocDeclStr(
virtual void, Exit(), virtual void, Exit(),
"Exit the main loop thus terminating the application. "Exit the main loop thus terminating the application.
:see: `wx.Exit`"); :see: `wx.Exit`", "");
DocDeclStr( DocDeclStr(
virtual void, ExitMainLoop(), virtual void, ExitMainLoop(),
"Exit the main GUI loop during the next iteration of the main "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( DocDeclStr(
virtual bool, Pending(), 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( DocDeclStr(
virtual bool, Dispatch(), virtual bool, Dispatch(),
"Process the first event in the event queue (blocks until an event "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( DocDeclStr(
virtual bool, ProcessIdle(), virtual bool, ProcessIdle(),
"Called from the MainLoop when the application becomes idle (there are "Called from the MainLoop when the application becomes idle (there are
no pending events) and sends a `wx.IdleEvent` to all interested 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( DocDeclStr(
virtual bool, SendIdleEvents(wxWindow* win, wxIdleEvent& event), virtual bool, SendIdleEvents(wxWindow* win, wxIdleEvent& event),
"Send idle event to window and all subwindows. Returns True if more "Send idle event to window and all subwindows. Returns True if more
idle time is requested."); idle time is requested.", "");
DocDeclStr( DocDeclStr(
virtual bool, IsActive() const, virtual bool, IsActive() const,
"Return True if our app has focus."); "Return True if our app has focus.", "");
DocDeclStr( DocDeclStr(
void, SetTopWindow(wxWindow *win), void, SetTopWindow(wxWindow *win),
"Set the *main* top level window"); "Set the *main* top level window", "");
DocDeclStr( DocDeclStr(
virtual wxWindow*, GetTopWindow() const, virtual wxWindow*, GetTopWindow() const,
"Return the *main* top level window (if it hadn't been set previously "Return the *main* top level window (if it hadn't been set previously
with SetTopWindow(), will return just some top level window and, if with SetTopWindow(), will return just some top level window and, if
there not any, will return None)"); there not any, will return None)", "");
DocDeclStr( DocDeclStr(
@@ -193,12 +194,12 @@ there not any, will return None)");
loop (and so, usually, terminate) when the last top-level program loop (and so, usually, terminate) when the last top-level program
window is deleted. Beware that if you disable this behaviour (with window is deleted. Beware that if you disable this behaviour (with
SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop() SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop()
explicitly from somewhere."); explicitly from somewhere.", "");
DocDeclStr( DocDeclStr(
bool, GetExitOnFrameDelete() const, bool, GetExitOnFrameDelete() const,
"Get the current exit behaviour setting."); "Get the current exit behaviour setting.", "");
#if 0 #if 0
// Get display mode that is in use. This is only used in framebuffer // Get display mode that is in use. This is only used in framebuffer
@@ -215,11 +216,11 @@ explicitly from somewhere.");
DocDeclStr( DocDeclStr(
void, SetUseBestVisual( bool flag ), void, SetUseBestVisual( bool flag ),
"Set whether the app should try to use the best available visual on "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( DocDeclStr(
bool, GetUseBestVisual() const, bool, GetUseBestVisual() const,
"Get current UseBestVisual setting."); "Get current UseBestVisual setting.", "");
// set/get printing mode: see wxPRINT_XXX constants. // 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( DocDeclStr(
void, SetAssertMode(int mode), void, SetAssertMode(int mode),
"Set the OnAssert behaviour for debug and hybrid builds. The following "Set the OnAssert behaviour for debug and hybrid builds.",
flags may be or'd together: "The following flags may be or'd together:
========================= ======================================= ========================= =======================================
wx.PYAPP_ASSERT_SUPPRESS Don't do anything wx.PYAPP_ASSERT_SUPPRESS Don't do anything
@@ -247,7 +248,7 @@ flags may be or'd together:
DocDeclStr( DocDeclStr(
int, GetAssertMode(), int, GetAssertMode(),
"Get the current OnAssert behaviour setting."); "Get the current OnAssert behaviour setting.", "");
static bool GetMacSupportPCMenuShortcuts(); static bool GetMacSupportPCMenuShortcuts();
@@ -265,11 +266,11 @@ flags may be or'd together:
DocDeclStr( DocDeclStr(
void, _BootstrapApp(), void, _BootstrapApp(),
"For internal use only"); "For internal use only", "");
DocStr(GetComCtl32Version, DocStr(GetComCtl32Version,
"Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if "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__ #ifdef __WXMSW__
static int GetComCtl32Version(); static int GetComCtl32Version();
#else #else
@@ -288,16 +289,16 @@ it wasn't found at all. Raises an exception on non-Windows platforms.");
DocDeclStr( DocDeclStr(
void, wxExit(), 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( DocDeclStr(
bool, wxYield(), bool, wxYield(),
"Yield to other apps/messages. Convenience for wx.GetApp().Yield()"); "Yield to other apps/messages. Convenience for wx.GetApp().Yield()", "");
DocDeclStr( DocDeclStr(
bool, wxYieldIfNeeded(), 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( 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 will remain enabled, allowing the implementation of some limited user
interaction. interaction.
:Returns: the result of the call to `wx.Yield`."); :Returns: the result of the call to `wx.Yield`.", "");
DocDeclStr( DocDeclStr(
void, wxWakeUpIdle(), void, wxWakeUpIdle(),
"Cause the message queue to become empty again, so idle events will be "Cause the message queue to become empty again, so idle events will be
sent."); sent.", "");
DocDeclStr( DocDeclStr(
void, wxPostEvent(wxEvtHandler *dest, wxEvent& event), void, wxPostEvent(wxEvtHandler *dest, wxEvent& event),
"Send an event to a window or other wx.EvtHandler to be processed "Send an event to a window or other wx.EvtHandler to be processed
later."); later.", "");
DocStr(wxApp_CleanUp, DocStr(wxApp_CleanUp,
"For internal use only, it is used to cleanup after wxWindows when "For internal use only, it is used to cleanup after wxWidgets when
Python shuts down."); Python shuts down.", "");
%inline %{ %inline %{
void wxApp_CleanUp() { void wxApp_CleanUp() {
__wxPyCleanup(); __wxPyCleanup();
@@ -334,7 +335,7 @@ Python shuts down.");
DocStr(wxGetApp, DocStr(wxGetApp,
"Return a reference to the current wx.App object."); "Return a reference to the current wx.App object.", "");
%inline %{ %inline %{
wxPyApp* wxGetApp() { wxPyApp* wxGetApp() {
return (wxPyApp*)wxTheApp; return (wxPyApp*)wxTheApp;

View File

@@ -86,7 +86,7 @@ class App(wx.PyApp):
``self.SetTopWindow(frame)``. ``self.SetTopWindow(frame)``.
:see: `wx.PySimpleApp` for a simpler app class that can be used :see: `wx.PySimpleApp` for a simpler app class that can be used
directly. directly.
""" """
outputWindowClass = PyOnDemandOutputWindow outputWindowClass = PyOnDemandOutputWindow

View File

@@ -122,7 +122,7 @@ method and register the provider with wx.ArtProvider.PushProvider::
def CreateBitmap(self, artid, client, size): def CreateBitmap(self, artid, client, size):
... ...
return bmp return bmp
", "
Identifying art resources Identifying art resources
------------------------- -------------------------
@@ -197,18 +197,18 @@ public:
DocDeclStr( DocDeclStr(
static void , PushProvider(wxPyArtProvider *provider), static void , PushProvider(wxPyArtProvider *provider),
"Add new provider to the top of providers stack."); "Add new provider to the top of providers stack.", "");
DocDeclStr( DocDeclStr(
static bool , PopProvider(), static bool , PopProvider(),
"Remove latest added provider and delete it."); "Remove latest added provider and delete it.", "");
DocDeclStr( DocDeclStr(
static bool , RemoveProvider(wxPyArtProvider *provider), static bool , RemoveProvider(wxPyArtProvider *provider),
"Remove provider. The provider must have been added previously! The "Remove provider. The provider must have been added previously! The
provider is _not_ deleted."); provider is _not_ deleted.", "");
DocDeclStr( DocDeclStr(
@@ -216,7 +216,7 @@ provider is _not_ deleted.");
const wxString& client = wxPyART_OTHER, const wxString& client = wxPyART_OTHER,
const wxSize& size = wxDefaultSize), const wxSize& size = wxDefaultSize),
"Query the providers for bitmap with given ID and return it. Return "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( DocDeclStr(
@@ -224,7 +224,7 @@ wx.NullBitmap if no provider provides it.");
const wxString& client = wxPyART_OTHER, const wxString& client = wxPyART_OTHER,
const wxSize& size = wxDefaultSize), const wxSize& size = wxDefaultSize),
"Query the providers for icon with given ID and return it. Return "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; }} %extend { void Destroy() { delete self; }}

View File

@@ -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 a file or created dynamically. A bitmap can be selected into a memory
device context (instance of `wx.MemoryDC`). This enables the bitmap to 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 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 The BMP and XMP image file formats are supported on all platforms by
wx.Bitmap. Other formats are automatically loaded by `wx.Image` and wx.Bitmap. Other formats are automatically loaded by `wx.Image` and
@@ -70,12 +70,12 @@ class wxBitmap : public wxGDIObject
public: public:
DocCtorStr( DocCtorStr(
wxBitmap(const wxString& name, wxBitmapType type=wxBITMAP_TYPE_ANY), wxBitmap(const wxString& name, wxBitmapType type=wxBITMAP_TYPE_ANY),
"Loads a bitmap from a file. "Loads a bitmap from a file.",
"
:param name: Name of the file to load the bitmap from. :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 :param type: The type of image to expect. Can be one of the following
constants (assuming that the neccessary `wx.Image` handlers are constants (assuming that the neccessary `wx.Image` handlers are
loaded): loaded):
* wx.BITMAP_TYPE_ANY * wx.BITMAP_TYPE_ANY
* wx.BITMAP_TYPE_BMP * wx.BITMAP_TYPE_BMP
@@ -105,12 +105,12 @@ public:
wxBitmap(int width, int height, int depth=-1), wxBitmap(int width, int height, int depth=-1),
"Creates a new bitmap of the given size. A depth of -1 indicates the "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 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); EmptyBitmap);
DocCtorStrName( DocCtorStrName(
wxBitmap(const wxIcon& icon), wxBitmap(const wxIcon& icon),
"Create a new bitmap from a `wx.Icon` object.", "Create a new bitmap from a `wx.Icon` object.", "",
BitmapFromIcon); BitmapFromIcon);
DocCtorStrName( 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 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 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 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); BitmapFromImage);
%extend { %extend {
DocStr(wxBitmap(PyObject* listOfStrings), 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) { %name(BitmapFromXPMData) wxBitmap(PyObject* listOfStrings) {
char** cArray = NULL; char** cArray = NULL;
wxBitmap* bmp; 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 "Creates a bitmap from an array of bits. You should only use this
function for monochrome bitmaps (depth 1) in portable programs: in function for monochrome bitmaps (depth 1) in portable programs: in
this case the bits parameter should contain an XBM image. For other 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 ) { %name(BitmapFromBits) wxBitmap(PyObject* bits, int width, int height, int depth=1 ) {
char* buf; char* buf;
int length; int length;
@@ -168,23 +168,23 @@ bit depths, the behaviour is platform dependent.");
DocDeclStr( DocDeclStr(
int , GetWidth(), int , GetWidth(),
"Gets the width of the bitmap in pixels."); "Gets the width of the bitmap in pixels.", "");
DocDeclStr( DocDeclStr(
int , GetHeight(), int , GetHeight(),
"Gets the height of the bitmap in pixels."); "Gets the height of the bitmap in pixels.", "");
DocDeclStr( DocDeclStr(
int , GetDepth(), int , GetDepth(),
"Gets the colour depth of the bitmap. A value of 1 indicates a "Gets the colour depth of the bitmap. A value of 1 indicates a
monochrome bitmap."); monochrome bitmap.", "");
%extend { %extend {
DocStr(GetSize, "Get the size of the bitmap."); DocStr(GetSize, "Get the size of the bitmap.", "");
wxSize GetSize() { wxSize GetSize() {
wxSize size(self->GetWidth(), self->GetHeight()); wxSize size(self->GetWidth(), self->GetHeight());
return size; return size;
@@ -196,7 +196,7 @@ monochrome bitmap.");
virtual wxImage , ConvertToImage() const, virtual wxImage , ConvertToImage() const,
"Creates a platform-independent image from a platform-dependent "Creates a platform-independent image from a platform-dependent
bitmap. This preserves mask information so that bitmaps and images can 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( DocDeclStr(
@@ -205,7 +205,7 @@ be converted back and forth without loss in that respect.");
file or explpicitly set for the bitmap. file or explpicitly set for the bitmap.
:see: `SetMask`, `wx.Mask` :see: `SetMask`, `wx.Mask`
"); ", "");
DocDeclStr( DocDeclStr(
@@ -213,12 +213,12 @@ file or explpicitly set for the bitmap.
"Sets the mask for this bitmap. "Sets the mask for this bitmap.
:see: `GetMask`, `wx.Mask` :see: `GetMask`, `wx.Mask`
"); ", "");
%extend { %extend {
DocStr(SetMaskColour, 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) { void SetMaskColour(const wxColour& colour) {
wxMask *mask = new wxMask(*self, colour); wxMask *mask = new wxMask(*self, colour);
self->SetMask(mask); self->SetMask(mask);
@@ -230,20 +230,20 @@ file or explpicitly set for the bitmap.
virtual wxBitmap , GetSubBitmap(const wxRect& rect) const, virtual wxBitmap , GetSubBitmap(const wxRect& rect) const,
"Returns a sub-bitmap of the current one as long as the rect belongs "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 entirely to the bitmap. This function preserves bit depth and mask
information."); information.", "");
DocDeclStr( DocDeclStr(
virtual bool , SaveFile(const wxString &name, wxBitmapType type, virtual bool , SaveFile(const wxString &name, wxBitmapType type,
wxPalette *palette = NULL), wxPalette *palette = NULL),
"Saves a bitmap in the named file. See `__init__` for a description of "Saves a bitmap in the named file. See `__init__` for a description of
the ``type`` parameter."); the ``type`` parameter.", "");
DocDeclStr( DocDeclStr(
virtual bool , LoadFile(const wxString &name, wxBitmapType type), virtual bool , LoadFile(const wxString &name, wxBitmapType type),
"Loads a bitmap from a file. See `__init__` for a description of the "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( DocDeclStr(
virtual void , SetHeight(int height), 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( DocDeclStr(
virtual void , SetWidth(int width), 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( DocDeclStr(
virtual void , SetDepth(int depth), 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 { %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) { void SetSize(const wxSize& size) {
self->SetWidth(size.x); self->SetWidth(size.x);
self->SetHeight(size.y); 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 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.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 `wx.MemoryDC` with a `wx.Bitmap` selected into it that contains a
mask. mask.", "");
");
class wxMask : public wxObject { class wxMask : public wxObject {
public: 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 portions of the mask. If no ``colour`` or an invalid ``colour`` is
passed then BLACK is used. passed then BLACK is used.
:see: `wx.Bitmap`, `wx.Colour`"); :see: `wx.Bitmap`, `wx.Colour`", "");
%extend { %extend {
wxMask(const wxBitmap& bitmap, const wxColour& colour = wxNullColour) { wxMask(const wxBitmap& bitmap, const wxColour& colour = wxNullColour) {

View File

@@ -19,7 +19,7 @@
DocStr(wxBrush, DocStr(wxBrush,
"A brush is a drawing tool for filling in areas. It is used for "A brush is a drawing tool for filling in areas. It is used for
painting the background of rectangles, ellipses, etc. when drawing on 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` :warning: Do not create instances of wx.Brush before the `wx.App`
object has been created because, depending on the platform, object has been created because, depending on the platform,
@@ -37,8 +37,8 @@ class wxBrush : public wxGDIObject {
public: public:
DocCtorStr( DocCtorStr(
wxBrush(const wxColour& colour, int style=wxSOLID), wxBrush(const wxColour& colour, int style=wxSOLID),
"Constructs a brush from a `wx.Colour` object and a style. The style "Constructs a brush from a `wx.Colour` object and a style.",
parameter may be one of the following: "The style parameter may be one of the following:
=================== ============================= =================== =============================
Style Meaning Style Meaning
@@ -61,36 +61,36 @@ parameter may be one of the following:
DocDeclStr( DocDeclStr(
virtual void , SetColour(const wxColour& col), virtual void , SetColour(const wxColour& col),
"Set the brush's `wx.Colour`."); "Set the brush's `wx.Colour`.", "");
DocDeclStr( DocDeclStr(
virtual void , SetStyle(int style), 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( DocDeclStr(
virtual void , SetStipple(const wxBitmap& stipple), virtual void , SetStipple(const wxBitmap& stipple),
"Sets the stipple `wx.Bitmap`."); "Sets the stipple `wx.Bitmap`.", "");
DocDeclStr( DocDeclStr(
wxColour , GetColour() const, wxColour , GetColour() const,
"Returns the `wx.Colour` of the brush."); "Returns the `wx.Colour` of the brush.", "");
DocDeclStr( DocDeclStr(
int , GetStyle() const, int , GetStyle() const,
"Returns the style of the brush. See `__init__` for a listing of "Returns the style of the brush. See `__init__` for a listing of
styles."); styles.", "");
DocDeclStr( DocDeclStr(
wxBitmap *, GetStipple() const, wxBitmap *, GetStipple() const,
"Returns the stiple `wx.Bitmap` of the brush. If the brush does not "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 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( DocDeclStr(
bool , Ok(), bool , Ok(),
"Returns True if the brush is initialised and valid."); "Returns True if the brush is initialised and valid.", "");
#ifdef __WXMAC__ #ifdef __WXMAC__

View File

@@ -33,7 +33,7 @@ enum {
DocStr(wxButton, DocStr(wxButton,
"A button is a control that contains a text string, and is one of the most "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 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 Window Styles
------------- -------------
@@ -65,7 +65,6 @@ public:
%pythonAppend wxButton() "" %pythonAppend wxButton() ""
RefDoc(wxButton, "");
DocCtorStr( DocCtorStr(
wxButton(wxWindow* parent, wxWindowID id, const wxString& label, wxButton(wxWindow* parent, wxWindowID id, const wxString& label,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
@@ -73,11 +72,11 @@ public:
long style = 0, long style = 0,
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxPyButtonNameStr), const wxString& name = wxPyButtonNameStr),
"Create and show a button."); "Create and show a button.", "");
DocCtorStrName( DocCtorStrName(
wxButton(), wxButton(),
"Precreate a Button for 2-phase creation.", "Precreate a Button for 2-phase creation.", "",
PreButton); PreButton);
DocDeclStr( DocDeclStr(
@@ -87,18 +86,18 @@ public:
long style = 0, long style = 0,
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxPyButtonNameStr), const wxString& name = wxPyButtonNameStr),
"Acutally create the GUI Button for 2-phase creation."); "Acutally create the GUI Button for 2-phase creation.", "");
DocDeclStr( DocDeclStr(
void , SetDefault(), 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( DocDeclStr(
static wxSize , GetDefaultSize(), static wxSize , GetDefaultSize(),
"Returns the default button size for this platform."); "Returns the default button size for this platform.", "");
static wxVisualAttributes static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); 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 "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 single bitmap, and wxWidgets will draw all button states using this bitmap. If
the application needs more control, additional bitmaps for the selected state, 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 Window Styles
------------- -------------
@@ -150,8 +149,6 @@ public:
%pythonAppend wxBitmapButton "self._setOORInfo(self)" %pythonAppend wxBitmapButton "self._setOORInfo(self)"
%pythonAppend wxBitmapButton() "" %pythonAppend wxBitmapButton() ""
RefDoc(wxBitmapButton, ""); // turn it off for the ctors
DocCtorStr( DocCtorStr(
wxBitmapButton(wxWindow* parent, wxWindowID id, const wxBitmap& bitmap, wxBitmapButton(wxWindow* parent, wxWindowID id, const wxBitmap& bitmap,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
@@ -159,11 +156,11 @@ public:
long style = wxBU_AUTODRAW, long style = wxBU_AUTODRAW,
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxPyButtonNameStr), 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( DocCtorStrName(
wxBitmapButton(), wxBitmapButton(),
"Precreate a BitmapButton for 2-phase creation.", "Precreate a BitmapButton for 2-phase creation.", "",
PreBitmapButton); PreBitmapButton);
DocDeclStr( DocDeclStr(
@@ -173,46 +170,46 @@ public:
long style = wxBU_AUTODRAW, long style = wxBU_AUTODRAW,
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxPyButtonNameStr), const wxString& name = wxPyButtonNameStr),
"Acutally create the GUI BitmapButton for 2-phase creation."); "Acutally create the GUI BitmapButton for 2-phase creation.", "");
DocDeclStr( DocDeclStr(
wxBitmap , GetBitmapLabel(), wxBitmap , GetBitmapLabel(),
"Returns the label bitmap (the one passed to the constructor)."); "Returns the label bitmap (the one passed to the constructor).", "");
DocDeclStr( DocDeclStr(
wxBitmap , GetBitmapDisabled(), wxBitmap , GetBitmapDisabled(),
"Returns the bitmap for the disabled state."); "Returns the bitmap for the disabled state.", "");
DocDeclStr( DocDeclStr(
wxBitmap , GetBitmapFocus(), wxBitmap , GetBitmapFocus(),
"Returns the bitmap for the focused state."); "Returns the bitmap for the focused state.", "");
DocDeclStr( DocDeclStr(
wxBitmap , GetBitmapSelected(), wxBitmap , GetBitmapSelected(),
"Returns the bitmap for the selected state."); "Returns the bitmap for the selected state.", "");
DocDeclStr( DocDeclStr(
void , SetBitmapDisabled(const wxBitmap& bitmap), void , SetBitmapDisabled(const wxBitmap& bitmap),
"Sets the bitmap for the disabled button appearance."); "Sets the bitmap for the disabled button appearance.", "");
DocDeclStr( DocDeclStr(
void , SetBitmapFocus(const wxBitmap& bitmap), 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( DocDeclStr(
void , SetBitmapSelected(const wxBitmap& bitmap), void , SetBitmapSelected(const wxBitmap& bitmap),
"Sets the bitmap for the selected (depressed) button appearance."); "Sets the bitmap for the selected (depressed) button appearance.", "");
DocDeclStr( DocDeclStr(
void , SetBitmapLabel(const wxBitmap& bitmap), void , SetBitmapLabel(const wxBitmap& bitmap),
"Sets the bitmap label for the button. This is the bitmap used for the "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); void SetMargins(int x, int y);

View File

@@ -49,7 +49,7 @@ DocStr(wxCheckBox,
checkmark is visible) or off (no checkmark). Optionally (When the 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 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 mixed or undetermined state. Often this is used as a \"Does Not
Apply\" state. Apply\" state.", "
Window Styles Window Styles
------------- -------------
@@ -84,8 +84,6 @@ public:
%pythonAppend wxCheckBox "self._setOORInfo(self)" %pythonAppend wxCheckBox "self._setOORInfo(self)"
%pythonAppend wxCheckBox() "" %pythonAppend wxCheckBox() ""
RefDoc(wxCheckBox, ""); // turn it off for the ctors
DocCtorStr( DocCtorStr(
wxCheckBox(wxWindow* parent, wxWindowID id, const wxString& label, wxCheckBox(wxWindow* parent, wxWindowID id, const wxString& label,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
@@ -93,11 +91,11 @@ public:
long style = 0, long style = 0,
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxPyCheckBoxNameStr), const wxString& name = wxPyCheckBoxNameStr),
"Creates and shows a CheckBox control"); "Creates and shows a CheckBox control", "");
DocCtorStrName( DocCtorStrName(
wxCheckBox(), wxCheckBox(),
"Precreate a CheckBox for 2-phase creation.", "Precreate a CheckBox for 2-phase creation.", "",
PreCheckBox); PreCheckBox);
@@ -108,30 +106,30 @@ public:
long style = 0, long style = 0,
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxPyCheckBoxNameStr), const wxString& name = wxPyCheckBoxNameStr),
"Actually create the GUI CheckBox for 2-phase creation."); "Actually create the GUI CheckBox for 2-phase creation.", "");
DocDeclStr( DocDeclStr(
bool, GetValue(), bool, GetValue(),
"Gets the state of a 2-state CheckBox. Returns True if it is checked, "Gets the state of a 2-state CheckBox. Returns True if it is checked,
False otherwise."); False otherwise.", "");
DocDeclStr( DocDeclStr(
bool, IsChecked(), bool, IsChecked(),
"Similar to GetValue, but raises an exception if it is not a 2-state "Similar to GetValue, but raises an exception if it is not a 2-state
CheckBox."); CheckBox.", "");
DocDeclStr( DocDeclStr(
void, SetValue(const bool state), void, SetValue(const bool state),
"Set the state of a 2-state CheckBox. Pass True for checked, False for "Set the state of a 2-state CheckBox. Pass True for checked, False for
unchecked."); unchecked.", "");
DocDeclStr( DocDeclStr(
wxCheckBoxState, Get3StateValue() const, wxCheckBoxState, Get3StateValue() const,
"Returns wx.CHK_UNCHECKED when the CheckBox is unchecked, "Returns wx.CHK_UNCHECKED when the CheckBox is unchecked,
wx.CHK_CHECKED when it is checked and wx.CHK_UNDETERMINED when it's in 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 the undetermined state. Raises an exceptiion when the function is
used with a 2-state CheckBox."); used with a 2-state CheckBox.", "");
DocDeclStr( DocDeclStr(
void, Set3StateValue(wxCheckBoxState state), 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 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 Check is on) or wx.CHK_UNDETERMINED (Check is mixed). Raises an
exception when the CheckBox is a 2-state checkbox and setting the exception when the CheckBox is a 2-state checkbox and setting the
state to wx.CHK_UNDETERMINED."); state to wx.CHK_UNDETERMINED.", "");
DocDeclStr( DocDeclStr(
bool, Is3State() const, 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( DocDeclStr(
bool, Is3rdStateAllowedForUser() const, bool, Is3rdStateAllowedForUser() const,
"Returns whether or not the user can set the CheckBox to the third "Returns whether or not the user can set the CheckBox to the third
state."); state.", "");
static wxVisualAttributes static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);

View File

@@ -24,7 +24,7 @@ MAKE_CONST_WXSTRING(ChoiceNameStr);
DocStr(wxChoice, DocStr(wxChoice,
"A Choice control is used to select one of a list of strings. "A Choice control is used to select one of a list of strings.
Unlike a `wx.ListBox`, only the selection is visible until the 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 Events
------ ------
@@ -40,8 +40,6 @@ public:
%pythonAppend wxChoice "self._setOORInfo(self)" %pythonAppend wxChoice "self._setOORInfo(self)"
%pythonAppend wxChoice() "" %pythonAppend wxChoice() ""
RefDoc(wxChoice, ""); // turn it off for the ctors
DocCtorAStr( DocCtorAStr(
wxChoice(wxWindow *parent, wxWindowID id=-1, wxChoice(wxWindow *parent, wxWindowID id=-1,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
@@ -53,11 +51,11 @@ public:
"__init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, "__init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
List choices=[], long style=0, Validator validator=DefaultValidator, List choices=[], long style=0, Validator validator=DefaultValidator,
String name=ChoiceNameStr) -> Choice", String name=ChoiceNameStr) -> Choice",
"Create and show a Choice control"); "Create and show a Choice control", "");
DocCtorStrName( DocCtorStrName(
wxChoice(), wxChoice(),
"Precreate a Choice control for 2-phase creation.", "Precreate a Choice control for 2-phase creation.", "",
PreChoice); PreChoice);
@@ -72,7 +70,7 @@ public:
"Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, "Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
List choices=[], long style=0, Validator validator=DefaultValidator, List choices=[], long style=0, Validator validator=DefaultValidator,
String name=ChoiceNameStr) -> bool", 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... // // These are only meaningful on wxMotif...
@@ -82,15 +80,15 @@ public:
DocDeclStr( DocDeclStr(
void , SetSelection(const int n), 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( DocDeclStr(
bool , SetStringSelection(const wxString& string), bool , SetStringSelection(const wxString& string),
"Select the item with the specifed string"); "Select the item with the specifed string", "");
DocDeclStr( DocDeclStr(
void , SetString(int n, const wxString& string), 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 } %pythoncode { Select = SetSelection }

View File

@@ -33,7 +33,7 @@ clipboard and relinquish ownership. You should keep the clipboard open
only momentarily. only momentarily.
:see: `wx.DataObject` :see: `wx.DataObject`
"); ", "");
@@ -41,7 +41,7 @@ class wxClipboard : public wxObject {
public: public:
DocCtorStr( DocCtorStr(
wxClipboard(), wxClipboard(),
""); "", "");
~wxClipboard(); ~wxClipboard();
@@ -51,17 +51,17 @@ public:
"Call this function to open the clipboard before calling SetData and "Call this function to open the clipboard before calling SetData and
GetData. Call Close when you have finished with the clipboard. You GetData. Call Close when you have finished with the clipboard. You
should keep the clipboard open for only a very short time. Returns should keep the clipboard open for only a very short time. Returns
True on success."); True on success.", "");
DocDeclStr( DocDeclStr(
virtual void , Close(), virtual void , Close(),
"Closes the clipboard."); "Closes the clipboard.", "");
DocDeclStr( DocDeclStr(
virtual bool , IsOpened() const, 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 After this function has been called, the clipboard owns the data, so
do not delete the data explicitly. do not delete the data explicitly.
:see: `wx.DataObject`"); :see: `wx.DataObject`", "");
DocDeclStr( DocDeclStr(
@@ -82,7 +82,7 @@ do not delete the data explicitly.
"Set the clipboard data, this is the same as `Clear` followed by "Set the clipboard data, this is the same as `Clear` followed by
`AddData`. `AddData`.
:see: `wx.DataObject`"); :see: `wx.DataObject`", "");
%clear wxDataObject *data; %clear wxDataObject *data;
@@ -90,18 +90,18 @@ do not delete the data explicitly.
DocDeclStr( DocDeclStr(
virtual bool , IsSupported( const wxDataFormat& format ), virtual bool , IsSupported( const wxDataFormat& format ),
"Returns True if the given format is available in the data object(s) on "Returns True if the given format is available in the data object(s) on
the clipboard."); the clipboard.", "");
DocDeclStr( DocDeclStr(
virtual bool , GetData( wxDataObject& data ), virtual bool , GetData( wxDataObject& data ),
"Call this function to fill data with data on the clipboard, if "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( DocDeclStr(
virtual void , Clear(), virtual void , Clear(),
"Clears data from the clipboard object and also the system's clipboard "Clears data from the clipboard object and also the system's clipboard
if possible."); if possible.", "");
DocDeclStr( DocDeclStr(
@@ -109,14 +109,14 @@ if possible.");
"Flushes the clipboard: this means that the data which is currently on "Flushes the clipboard: this means that the data which is currently on
clipboard will stay available even after the application exits, clipboard will stay available even after the application exits,
possibly eating memory, otherwise the clipboard will be emptied on 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( DocDeclStr(
virtual void , UsePrimarySelection( bool primary = True ), virtual void , UsePrimarySelection( bool primary = True ),
"On platforms supporting it (the X11 based platforms), selects the "On platforms supporting it (the X11 based platforms), selects the
so called PRIMARY SELECTION as the clipboard as opposed to 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, DocStr(wxClipboardLocker,
"A helpful class for opening the clipboard and automatically "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 class wxClipboardLocker
{ {
@@ -141,7 +141,7 @@ public:
DocStr(__nonzero__, DocStr(__nonzero__,
"A ClipboardLocker instance evaluates to True if the clipboard was "A ClipboardLocker instance evaluates to True if the clipboard was
successfully opened.") successfully opened.", "");
%extend { %extend {
bool __nonzero__() { return !!(*self); } bool __nonzero__() { return !!(*self); }
} }

View File

@@ -29,13 +29,13 @@ MAKE_CONST_WXSTRING(MessageBoxCaptionStr);
DocStr(wxColourData, DocStr(wxColourData,
"This class holds a variety of information related to the colour "This class holds a variety of information related to the colour
chooser dialog, used to transfer settings and results to and from the chooser dialog, used to transfer settings and results to and from the
`wx.ColourDialog`."); `wx.ColourDialog`.", "");
class wxColourData : public wxObject { class wxColourData : public wxObject {
public: public:
DocCtorStr( DocCtorStr(
wxColourData(), wxColourData(),
"Constructor, sets default values."); "Constructor, sets default values.", "");
~wxColourData(); ~wxColourData();
@@ -44,33 +44,33 @@ public:
bool , GetChooseFull(), bool , GetChooseFull(),
"Under Windows, determines whether the Windows colour dialog will "Under Windows, determines whether the Windows colour dialog will
display the full dialog with custom colour selection controls. Has no 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( DocDeclStr(
wxColour , GetColour(), wxColour , GetColour(),
"Gets the colour (pre)selected by the dialog."); "Gets the colour (pre)selected by the dialog.", "");
DocDeclStr( DocDeclStr(
wxColour , GetCustomColour(int i), wxColour , GetCustomColour(int i),
"Gets the i'th custom colour associated with the colour dialog. 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 should be an integer between 0 and 15. The default custom colours are
all white."); all white.", "");
DocDeclStr( DocDeclStr(
void , SetChooseFull(int flag), void , SetChooseFull(int flag),
"Under Windows, tells the Windows colour dialog to display the full "Under Windows, tells the Windows colour dialog to display the full
dialog with custom colour selection controls. Under other platforms, 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( DocDeclStr(
void , SetColour(const wxColour& colour), void , SetColour(const wxColour& colour),
"Sets the default colour for the colour dialog. The default colour is "Sets the default colour for the colour dialog. The default colour is
black."); black.", "");
DocDeclStr( DocDeclStr(
void , SetCustomColour(int i, const wxColour& colour), void , SetCustomColour(int i, const wxColour& colour),
"Sets the i'th custom colour for the colour dialog. i should be an "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, DocStr(wxColourDialog,
"This class represents the colour chooser dialog."); "This class represents the colour chooser dialog.", "");
class wxColourDialog : public wxDialog { class wxColourDialog : public wxDialog {
public: public:
@@ -88,11 +88,11 @@ public:
wxColourDialog(wxWindow* parent, wxColourData* data = NULL), wxColourDialog(wxWindow* parent, wxColourData* data = NULL),
"Constructor. Pass a parent window, and optionally a `wx.ColourData`, "Constructor. Pass a parent window, and optionally a `wx.ColourData`,
which will be copied to the colour dialog's internal ColourData which will be copied to the colour dialog's internal ColourData
instance."); instance.", "");
DocDeclStr( DocDeclStr(
wxColourData& , GetColourData(), 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, DocStr(wxDirDialog,
"wx.DirDialog allows the user to select a directory by browising the "wx.DirDialog allows the user to select a directory by browising the
file system. file system.", "
Window Styles Window Styles
-------------- --------------
@@ -118,8 +117,6 @@ class wxDirDialog : public wxDialog {
public: public:
%pythonAppend wxDirDialog "self._setOORInfo(self)" %pythonAppend wxDirDialog "self._setOORInfo(self)"
RefDoc(wxDirDialog, ""); // turn it off for the ctors
DocCtorStr( DocCtorStr(
wxDirDialog(wxWindow* parent, wxDirDialog(wxWindow* parent,
const wxString& message = wxPyDirSelectorPromptStr, const wxString& message = wxPyDirSelectorPromptStr,
@@ -128,28 +125,28 @@ public:
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
const wxString& name = wxPyDirDialogNameStr), const wxString& name = wxPyDirDialogNameStr),
"Constructor. Use ShowModal method to show the dialog."); "Constructor. Use ShowModal method to show the dialog.", "");
DocDeclStr( DocDeclStr(
wxString , GetPath(), wxString , GetPath(),
"Returns the default or user-selected path."); "Returns the default or user-selected path.", "");
DocDeclStr( DocDeclStr(
wxString , GetMessage(), wxString , GetMessage(),
"Returns the message that will be displayed on the dialog."); "Returns the message that will be displayed on the dialog.", "");
DocDeclStr( DocDeclStr(
long , GetStyle(), long , GetStyle(),
"Returns the dialog style."); "Returns the dialog style.", "");
DocDeclStr( DocDeclStr(
void , SetMessage(const wxString& message), 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( DocDeclStr(
void , SetPath(const wxString& path), void , SetPath(const wxString& path),
"Sets the default path."); "Sets the default path.", "");
}; };
@@ -158,7 +155,7 @@ public:
DocStr(wxFileDialog, DocStr(wxFileDialog,
"wx.FileDialog allows the user to select one or more files from the "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 In Windows, this is the common file selector dialog. On X based
platforms a generic alternative is used. The path and filename are 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. extension for the required filename.
Both the X and Windows versions implement a wildcard filter. Typing a 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 clicking on Ok, will result in only those files matching the pattern
being displayed. The wildcard may be a specification for multiple being displayed. The wildcard may be a specification for multiple
types of file with a description for each, such as:: 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 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 wx.HIDE_READONLY For open dialog only: hide the checkbox
allowing to open the file in read-only mode. allowing to open the file in read-only mode.
wx.OVERWRITE_PROMPT For save dialog only: prompt for a confirmation wx.OVERWRITE_PROMPT For save dialog only: prompt for a confirmation
if a file will be overwritten. if a file will be overwritten.
wx.MULTIPLE For open dialog only: allows selecting multiple wx.MULTIPLE For open dialog only: allows selecting multiple
files. files.
wx.CHANGE_DIR Change the current working directory to the wx.CHANGE_DIR Change the current working directory to the
directory where the file(s) chosen by the user directory where the file(s) chosen by the user
are. are.
================== ========================================== =================== ==========================================
"); ");
@@ -205,8 +202,6 @@ class wxFileDialog : public wxDialog {
public: public:
%pythonAppend wxFileDialog "self._setOORInfo(self)" %pythonAppend wxFileDialog "self._setOORInfo(self)"
RefDoc(wxFileDialog, ""); // turn it off for the ctors
DocCtorStr( DocCtorStr(
wxFileDialog(wxWindow* parent, wxFileDialog(wxWindow* parent,
const wxString& message = wxPyFileSelectorPromptStr, const wxString& message = wxPyFileSelectorPromptStr,
@@ -215,25 +210,25 @@ public:
const wxString& wildcard = wxPyFileSelectorDefaultWildcardStr, const wxString& wildcard = wxPyFileSelectorDefaultWildcardStr,
long style = 0, long style = 0,
const wxPoint& pos = wxDefaultPosition), const wxPoint& pos = wxDefaultPosition),
"Constructor. Use ShowModal method to show the dialog."); "Constructor. Use ShowModal method to show the dialog.", "");
DocDeclStr( DocDeclStr(
void , SetMessage(const wxString& message), 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( DocDeclStr(
void , SetPath(const wxString& path), void , SetPath(const wxString& path),
"Sets the path (the combined directory and filename that will be "Sets the path (the combined directory and filename that will be
returned when the dialog is dismissed)."); returned when the dialog is dismissed).", "");
DocDeclStr( DocDeclStr(
void , SetDirectory(const wxString& dir), void , SetDirectory(const wxString& dir),
"Sets the default directory."); "Sets the default directory.", "");
DocDeclStr( DocDeclStr(
void , SetFilename(const wxString& name), void , SetFilename(const wxString& name),
"Sets the default filename."); "Sets the default filename.", "");
DocDeclStr( DocDeclStr(
void , SetWildcard(const wxString& wildCard), void , SetWildcard(const wxString& wildCard),
@@ -241,58 +236,58 @@ returned when the dialog is dismissed).");
example:: example::
\"BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif\" \"BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif\"
"); ", "");
DocDeclStr( DocDeclStr(
void , SetStyle(long style), void , SetStyle(long style),
"Sets the dialog style."); "Sets the dialog style.", "");
DocDeclStr( DocDeclStr(
void , SetFilterIndex(int filterIndex), void , SetFilterIndex(int filterIndex),
"Sets the default filter index, starting from zero."); "Sets the default filter index, starting from zero.", "");
DocDeclStr( DocDeclStr(
wxString , GetMessage() const, wxString , GetMessage() const,
"Returns the message that will be displayed on the dialog."); "Returns the message that will be displayed on the dialog.", "");
DocDeclStr( DocDeclStr(
wxString , GetPath() const, 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( DocDeclStr(
wxString , GetDirectory() const, wxString , GetDirectory() const,
"Returns the default directory."); "Returns the default directory.", "");
DocDeclStr( DocDeclStr(
wxString , GetFilename() const, wxString , GetFilename() const,
"Returns the default filename."); "Returns the default filename.", "");
DocDeclStr( DocDeclStr(
wxString , GetWildcard() const, wxString , GetWildcard() const,
"Returns the file dialog wildcard."); "Returns the file dialog wildcard.", "");
DocDeclStr( DocDeclStr(
long , GetStyle() const, long , GetStyle() const,
"Returns the dialog style."); "Returns the dialog style.", "");
DocDeclStr( DocDeclStr(
int , GetFilterIndex() const, int , GetFilterIndex() const,
"Returns the index into the list of filters supplied, optionally, in "Returns the index into the list of filters supplied, optionally, in
the wildcard parameter. Before the dialog is shown, this is the index the wildcard parameter. Before the dialog is shown, this is the index
which will be used when the dialog is first displayed. After the 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, DocStr(GetFilenames,
"Returns a list of filenames chosen in the dialog. This function "Returns a list of filenames chosen in the dialog. This function
should only be used with the dialogs which have wx.MULTIPLE style, use should only be used with the dialogs which have wx.MULTIPLE style, use
GetFilename for the others."); GetFilename for the others.", "");
DocStr(GetPaths, DocStr(GetPaths,
"Fills the array paths with the full paths of the files chosen. This "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 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 { %extend {
PyObject* GetFilenames() { PyObject* GetFilenames() {
@@ -337,7 +332,7 @@ enum { wxCHOICEDLG_STYLE };
DocStr(wxMultiChoiceDialog, DocStr(wxMultiChoiceDialog,
"A simple dialog with a multi selection listbox."); "A simple dialog with a multi selection listbox.", "");
class wxMultiChoiceDialog : public wxDialog class wxMultiChoiceDialog : public wxDialog
{ {
@@ -354,18 +349,18 @@ public:
"__init__(Window parent, String message, String caption, "__init__(Window parent, String message, String caption,
List choices=[], long style=CHOICEDLG_STYLE, List choices=[], long style=CHOICEDLG_STYLE,
Point pos=DefaultPosition) -> MultiChoiceDialog", Point pos=DefaultPosition) -> MultiChoiceDialog",
"Constructor. Use ShowModal method to show the dialog."); "Constructor. Use ShowModal method to show the dialog.", "");
DocDeclAStr( DocDeclAStr(
void, SetSelections(const wxArrayInt& selections), void, SetSelections(const wxArrayInt& selections),
"SetSelections(List selections)", "SetSelections(List selections)",
"Specify the items in the list that should be selected, using a list of "Specify the items in the list that should be selected, using a list of
integers."); integers.", "");
DocAStr(GetSelections, DocAStr(GetSelections,
"GetSelections() -> [selections]", "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 { %extend {
PyObject* GetSelections() { PyObject* GetSelections() {
return wxArrayInt2PyList_helper(self->GetSelections()); return wxArrayInt2PyList_helper(self->GetSelections());
@@ -377,7 +372,7 @@ integers.");
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
DocStr(wxSingleChoiceDialog, DocStr(wxSingleChoiceDialog,
"A simple dialog with a single selection listbox."); "A simple dialog with a single selection listbox.", "");
class wxSingleChoiceDialog : public wxDialog { class wxSingleChoiceDialog : public wxDialog {
public: public:
@@ -387,7 +382,7 @@ public:
"__init__(Window parent, String message, String caption, "__init__(Window parent, String message, String caption,
List choices=[], long style=CHOICEDLG_STYLE, List choices=[], long style=CHOICEDLG_STYLE,
Point pos=DefaultPosition) -> SingleChoiceDialog", Point pos=DefaultPosition) -> SingleChoiceDialog",
"Constructor. Use ShowModal method to show the dialog."); "Constructor. Use ShowModal method to show the dialog.", "");
%extend { %extend {
// TODO: ignoring clientData for now... FIX THIS // TODO: ignoring clientData for now... FIX THIS
@@ -406,22 +401,22 @@ public:
DocDeclStr( DocDeclStr(
int , GetSelection(), int , GetSelection(),
"Get the index of teh currently selected item."); "Get the index of teh currently selected item.", "");
DocDeclStr( DocDeclStr(
wxString , GetStringSelection(), wxString , GetStringSelection(),
"Returns the string value of the currently selected item"); "Returns the string value of the currently selected item", "");
DocDeclStr( DocDeclStr(
void , SetSelection(int sel), void , SetSelection(int sel),
"Set the current selected item to sel"); "Set the current selected item to sel", "");
}; };
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
DocStr(wxTextEntryDialog, DocStr(wxTextEntryDialog,
"A dialog with text control, [ok] and [cancel] buttons"); "A dialog with text control, [ok] and [cancel] buttons", "");
class wxTextEntryDialog : public wxDialog { class wxTextEntryDialog : public wxDialog {
public: public:
@@ -434,16 +429,16 @@ public:
const wxString& defaultValue = wxPyEmptyString, const wxString& defaultValue = wxPyEmptyString,
long style = wxOK | wxCANCEL | wxCENTRE, long style = wxOK | wxCANCEL | wxCENTRE,
const wxPoint& pos = wxDefaultPosition), const wxPoint& pos = wxDefaultPosition),
"Constructor. Use ShowModal method to show the dialog."); "Constructor. Use ShowModal method to show the dialog.", "");
DocDeclStr( DocDeclStr(
wxString , GetValue(), wxString , GetValue(),
"Returns the text that the user has entered if the user has pressed OK, "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( DocDeclStr(
void , SetValue(const wxString& value), 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, DocStr(wxFontData,
"This class holds a variety of information related to font dialogs and "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 { class wxFontData : public wxObject {
@@ -463,65 +458,65 @@ public:
void , EnableEffects(bool enable), void , EnableEffects(bool enable),
"Enables or disables 'effects' under MS Windows only. This refers to "Enables or disables 'effects' under MS Windows only. This refers to
the controls for manipulating colour, strikeout and underline the controls for manipulating colour, strikeout and underline
properties. The default value is true."); properties. The default value is true.", "");
DocDeclStr( DocDeclStr(
bool , GetAllowSymbols(), bool , GetAllowSymbols(),
"Under MS Windows, returns a flag determining whether symbol fonts can "Under MS Windows, returns a flag determining whether symbol fonts can
be selected. Has no effect on other platforms. The default value is be selected. Has no effect on other platforms. The default value is
true."); true.", "");
DocDeclStr( DocDeclStr(
wxColour , GetColour(), wxColour , GetColour(),
"Gets the colour associated with the font dialog. The default value is "Gets the colour associated with the font dialog. The default value is
black."); black.", "");
DocDeclStr( DocDeclStr(
wxFont , GetChosenFont(), wxFont , GetChosenFont(),
"Gets the font chosen by the user."); "Gets the font chosen by the user.", "");
DocDeclStr( DocDeclStr(
bool , GetEnableEffects(), bool , GetEnableEffects(),
"Determines whether 'effects' are enabled under Windows."); "Determines whether 'effects' are enabled under Windows.", "");
DocDeclStr( DocDeclStr(
wxFont , GetInitialFont(), wxFont , GetInitialFont(),
"Gets the font that will be initially used by the font dialog. This "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( DocDeclStr(
bool , GetShowHelp(), bool , GetShowHelp(),
"Returns true if the Help button will be shown (Windows only). The "Returns true if the Help button will be shown (Windows only). The
default value is false."); default value is false.", "");
DocDeclStr( DocDeclStr(
void , SetAllowSymbols(bool allowSymbols), void , SetAllowSymbols(bool allowSymbols),
"Under MS Windows, determines whether symbol fonts can be selected. Has "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( DocDeclStr(
void , SetChosenFont(const wxFont& font), void , SetChosenFont(const wxFont& font),
"Sets the font that will be returned to the user (normally for internal "Sets the font that will be returned to the user (normally for internal
use only)."); use only).", "");
DocDeclStr( DocDeclStr(
void , SetColour(const wxColour& colour), void , SetColour(const wxColour& colour),
"Sets the colour that will be used for the font foreground colour. The "Sets the colour that will be used for the font foreground colour. The
default colour is black."); default colour is black.", "");
DocDeclStr( DocDeclStr(
void , SetInitialFont(const wxFont& font), 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( DocDeclStr(
void , SetRange(int min, int max), void , SetRange(int min, int max),
"Sets the valid range for the font point size (Windows only). The "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( DocDeclStr(
void , SetShowHelp(bool showHelp), void , SetShowHelp(bool showHelp),
"Determines whether the Help button will be displayed in the font "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. "wx.FontDialog allows the user to select a system font and its attributes.
:see: `wx.FontData` :see: `wx.FontData`
"); ", "");
class wxFontDialog : public wxDialog { class wxFontDialog : public wxDialog {
public: public:
@@ -541,14 +536,14 @@ public:
"Constructor. Pass a parent window and the `wx.FontData` object to be "Constructor. Pass a parent window and the `wx.FontData` object to be
used to initialize the dialog controls. Call `ShowModal` to display used to initialize the dialog controls. Call `ShowModal` to display
the dialog. If ShowModal returns ``wx.ID_OK`` then you can fetch the 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); wxFontDialog(wxWindow* parent, const wxFontData& data);
DocDeclStr( DocDeclStr(
wxFontData& , GetFontData(), wxFontData& , GetFontData(),
"Returns a reference to the internal `wx.FontData` used by the "Returns a reference to the internal `wx.FontData` used by the
wx.FontDialog."); wx.FontDialog.", "");
}; };
@@ -557,27 +552,26 @@ wx.FontDialog.");
DocStr(wxMessageDialog, DocStr(wxMessageDialog,
"This class provides a simple dialog that shows a single or multi-line "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 Window Styles
-------------- --------------
================= ============================================= =================== =============================================
wx.OK Show an OK button. wx.OK Show an OK button.
wx.CANCEL Show a Cancel button. wx.CANCEL Show a Cancel button.
wx.YES_NO Show Yes and No buttons. wx.YES_NO Show Yes and No buttons.
wx.YES_DEFAULT Used with wxYES_NO, makes Yes button the wx.YES_DEFAULT Used with wxYES_NO, makes Yes button the
default - which is the default behaviour. default - which is the default behaviour.
wx.NO_DEFAULT Used with wxYES_NO, makes No button the default. wx.NO_DEFAULT Used with wxYES_NO, makes No button the default.
wx.ICON_EXCLAMATION Shows an exclamation mark icon. wx.ICON_EXCLAMATION Shows an exclamation mark icon.
wx.ICON_HAND Shows an error icon. wx.ICON_HAND Shows an error icon.
wx.ICON_ERROR Shows an error icon - the same as wxICON_HAND. wx.ICON_ERROR Shows an error icon - the same as wxICON_HAND.
wx.ICON_QUESTION Shows a question mark icon. wx.ICON_QUESTION Shows a question mark icon.
wx.ICON_INFORMATION Shows an information (i) icon. wx.ICON_INFORMATION Shows an information (i) icon.
wx.STAY_ON_TOP The message box stays on top of all other wx.STAY_ON_TOP The message box stays on top of all other
window, even those of the other applications window, even those of the other applications
(Windows only). (Windows only).
================= ============================================= =================== =============================================
"); ");
@@ -585,15 +579,13 @@ class wxMessageDialog : public wxDialog {
public: public:
%pythonAppend wxMessageDialog "self._setOORInfo(self)" %pythonAppend wxMessageDialog "self._setOORInfo(self)"
RefDoc(wxMessageDialog, ""); // turn it off for the ctors
DocCtorStr( DocCtorStr(
wxMessageDialog(wxWindow* parent, wxMessageDialog(wxWindow* parent,
const wxString& message, const wxString& message,
const wxString& caption = wxPyMessageBoxCaptionStr, const wxString& caption = wxPyMessageBoxCaptionStr,
long style = wxOK | wxCANCEL | wxCENTRE, long style = wxOK | wxCANCEL | wxCENTRE,
const wxPoint& pos = wxDefaultPosition), 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, DocStr(wxProgressDialog,
"A dialog that shows a short message and a progress bar. Optionally, it "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 Window Styles
-------------- --------------
================= ============================================= ==================== =============================================
wx.PD_APP_MODAL Make the progress dialog modal. If this flag is wx.PD_APP_MODAL Make the progress dialog modal. If this flag is
not given, it is only \"locally\" modal - not given, it is only \"locally\" modal -
that is the input to the parent window is that is the input to the parent window is
disabled, but not to the other ones. disabled, but not to the other ones.
wx.PD_AUTO_HIDE Causes the progress dialog to disappear from wx.PD_AUTO_HIDE Causes the progress dialog to disappear from
screen as soon as the maximum value of the screen as soon as the maximum value of the
progress meter has been reached. progress meter has been reached.
wx.PD_CAN_ABORT This flag tells the dialog that it should have wx.PD_CAN_ABORT This flag tells the dialog that it should have
a \"Cancel\" button which the user may press. If a \"Cancel\" button which the user may press. If
this happens, the next call to Update() will this happens, the next call to Update() will
return false. return false.
wx.PD_ELAPSED_TIME This flag tells the dialog that it should show wx.PD_ELAPSED_TIME This flag tells the dialog that it should show
elapsed time (since creating the dialog). elapsed time (since creating the dialog).
wx.PD_ESTIMATED_TIME This flag tells the dialog that it should show wx.PD_ESTIMATED_TIME This flag tells the dialog that it should show
estimated time. estimated time.
wx.PD_REMAINING_TIME This flag tells the dialog that it should show wx.PD_REMAINING_TIME This flag tells the dialog that it should show
remaining time. remaining time.
================= ============================================= ==================== =============================================
"); ");
@@ -637,8 +629,6 @@ class wxProgressDialog : public wxFrame {
public: public:
%pythonAppend wxProgressDialog "self._setOORInfo(self)" %pythonAppend wxProgressDialog "self._setOORInfo(self)"
RefDoc(wxProgressDialog, ""); // turn it off for the ctors
DocCtorStr( DocCtorStr(
wxProgressDialog(const wxString& title, wxProgressDialog(const wxString& title,
const wxString& message, const wxString& message,
@@ -647,7 +637,7 @@ public:
int style = wxPD_AUTO_HIDE | wxPD_APP_MODAL ), int style = wxPD_AUTO_HIDE | wxPD_APP_MODAL ),
"Constructor. Creates the dialog, displays it and disables user input "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 for other windows, or, if wx.PD_APP_MODAL flag is not given, for its
parent window only."); parent window only.", "");
DocDeclStr( DocDeclStr(
virtual bool , Update(int value, const wxString& newmsg = wxPyEmptyString), 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 If false is returned, the application can either immediately destroy
the dialog or ask the user for the confirmation and if the abort is 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( DocDeclStr(
void , Resume(), void , Resume(),
"Can be used to continue with the dialog, after the user had chosen to "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, DocStr(wxFindDialogEvent,
"Events for the FindReplaceDialog"); "Events for the FindReplaceDialog", "");
class wxFindDialogEvent : public wxCommandEvent class wxFindDialogEvent : public wxCommandEvent
{ {
@@ -732,32 +722,32 @@ public:
DocDeclStr( DocDeclStr(
int , GetFlags(), int , GetFlags(),
"Get the currently selected flags: this is the combination of "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( DocDeclStr(
const wxString& , GetFindString(), const wxString& , GetFindString(),
"Return the string to find (never empty)."); "Return the string to find (never empty).", "");
DocDeclStr( DocDeclStr(
const wxString& , GetReplaceString(), const wxString& , GetReplaceString(),
"Return the string to replace the search string with (only for replace "Return the string to replace the search string with (only for replace
and replace all events)."); and replace all events).", "");
DocDeclStr( DocDeclStr(
wxFindReplaceDialog *, GetDialog(), wxFindReplaceDialog *, GetDialog(),
"Return the pointer to the dialog which generated this event."); "Return the pointer to the dialog which generated this event.", "");
DocDeclStr( DocDeclStr(
void , SetFlags(int flags), void , SetFlags(int flags),
""); "", "");
DocDeclStr( DocDeclStr(
void , SetFindString(const wxString& str), void , SetFindString(const wxString& str),
""); "", "");
DocDeclStr( DocDeclStr(
void , SetReplaceString(const wxString& str), 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. `wx.FindDialogEvent` methods you can also directly query this object.
Note that all SetXXX() methods may only be called before showing the 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 Flags
----- -----
@@ -793,34 +783,34 @@ class wxFindReplaceData : public wxObject
public: public:
DocCtorStr( DocCtorStr(
wxFindReplaceData(int flags=0), wxFindReplaceData(int flags=0),
"Constuctor initializes the flags to default value (0)."); "Constuctor initializes the flags to default value (0).", "");
~wxFindReplaceData(); ~wxFindReplaceData();
DocDeclStr( DocDeclStr(
const wxString& , GetFindString(), const wxString& , GetFindString(),
"Get the string to find."); "Get the string to find.", "");
DocDeclStr( DocDeclStr(
const wxString& , GetReplaceString(), const wxString& , GetReplaceString(),
"Get the replacement string."); "Get the replacement string.", "");
DocDeclStr( DocDeclStr(
int , GetFlags(), int , GetFlags(),
"Get the combination of flag values."); "Get the combination of flag values.", "");
DocDeclStr( DocDeclStr(
void , SetFlags(int flags), 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( DocDeclStr(
void , SetFindString(const wxString& str), 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( DocDeclStr(
void , SetReplaceString(const wxString& str), 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 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 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 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 Window Styles
@@ -856,35 +846,33 @@ public:
%pythonAppend wxFindReplaceDialog "self._setOORInfo(self)" %pythonAppend wxFindReplaceDialog "self._setOORInfo(self)"
%pythonAppend wxFindReplaceDialog() "" %pythonAppend wxFindReplaceDialog() ""
RefDoc(wxFindReplaceDialog, ""); // turn it off for the ctors
DocCtorStr( DocCtorStr(
wxFindReplaceDialog(wxWindow *parent, wxFindReplaceDialog(wxWindow *parent,
wxFindReplaceData *data, wxFindReplaceData *data,
const wxString &title, const wxString &title,
int style = 0), int style = 0),
"Create a FindReplaceDialog. The parent and data parameters must be "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( DocCtorStrName(
wxFindReplaceDialog(), wxFindReplaceDialog(),
"Precreate a FindReplaceDialog for 2-phase creation", "Precreate a FindReplaceDialog for 2-phase creation", "",
PreFindReplaceDialog); PreFindReplaceDialog);
DocDeclStr( DocDeclStr(
bool , Create(wxWindow *parent, wxFindReplaceData *data, bool , Create(wxWindow *parent, wxFindReplaceData *data,
const wxString &title, int style = 0), const wxString &title, int style = 0),
"Create the dialog, for 2-phase create."); "Create the dialog, for 2-phase create.", "");
DocDeclStr( DocDeclStr(
const wxFindReplaceData *, GetData(), const wxFindReplaceData *, GetData(),
"Get the FindReplaceData object used by this dialog."); "Get the FindReplaceData object used by this dialog.", "");
DocDeclStr( DocDeclStr(
void , SetData(wxFindReplaceData *data), void , SetData(wxFindReplaceData *data),
"Set the FindReplaceData object used by this dialog."); "Set the FindReplaceData object used by this dialog.", "");
}; };

View File

@@ -18,96 +18,104 @@
DocStr(wxColour, DocStr(wxColour,
"A colour is an object representing a combination of Red, Green, and Blue (RGB) "A colour is an object representing a combination of Red, Green, and
intensity values, and is used to determine drawing colours, window colours, Blue (RGB) intensity values, and is used to determine drawing colours,
etc. Valid RGB values are in the range 0 to 255. 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 In wxPython there are typemaps that will automatically convert from a
name, or from a '#RRGGBB' colour hex value string to a wx.Colour object when colour name, or from a '#RRGGBB' colour hex value string to a
calling C++ methods that expect a wxColour. This means that the following are wx.Colour object when calling C++ methods that expect a wxColour.
all equivallent: This means that the following are all equivallent::
win.SetBackgroundColour(wxColour(0,0,255)) win.SetBackgroundColour(wxColour(0,0,255))
win.SetBackgroundColour('BLUE') win.SetBackgroundColour('BLUE')
win.SetBackgroundColour('#0000FF') win.SetBackgroundColour('#0000FF')
You can retrieve the various current system colour settings with Additional colour names and their coresponding values can be added
wx.SystemSettings.GetColour."); 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 { class wxColour : public wxObject {
public: public:
DocCtorStr( DocCtorStr(
wxColour(unsigned char red=0, unsigned char green=0, unsigned char blue=0), wxColour(byte red=0, byte green=0, byte blue=0),
"Constructs a colour from red, green and blue values."); "Constructs a colour from red, green and blue values.
:see: Alternate constructors `wx.NamedColour` and `wx.ColourRGB`.
", "");
DocCtorStrName( DocCtorStrName(
wxColour( const wxString& colorName), 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); NamedColour);
DocCtorStrName( DocCtorStrName(
wxColour( unsigned long colRGB ), wxColour( unsigned long colRGB ),
"Constructs a colour from a packed RGB value.", "Constructs a colour from a packed RGB value.", "",
ColourRGB); ColourRGB);
~wxColour(); ~wxColour();
DocDeclStr( DocDeclStr(
unsigned char , Red(), byte , Red(),
"Returns the red intensity."); "Returns the red intensity.", "");
DocDeclStr( DocDeclStr(
unsigned char , Green(), byte , Green(),
"Returns the green intensity."); "Returns the green intensity.", "");
DocDeclStr( DocDeclStr(
unsigned char , Blue(), byte , Blue(),
"Returns the blue intensity."); "Returns the blue intensity.", "");
DocDeclStr( DocDeclStr(
bool , Ok(), bool , Ok(),
"Returns True if the colour object is valid (the colour has been\n" "Returns True if the colour object is valid (the colour has been
"initialised with RGB values)."); initialised with RGB values).", "");
DocDeclStr( DocDeclStr(
void , Set(unsigned char red, unsigned char green, unsigned char blue), void , Set(byte red, byte green, byte blue),
"Sets the RGB intensity values."); "Sets the RGB intensity values.", "");
DocDeclStrName( DocDeclStrName(
void , Set(unsigned long colRGB), 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); SetRGB);
DocDeclStrName( DocDeclStrName(
void , InitFromName(const wxString& colourName), 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); SetFromName);
DocDeclStr( DocDeclStr(
long , GetPixel() const, long , GetPixel() const,
"Returns a pixel value which is platform-dependent. On Windows, a\n" "Returns a pixel value which is platform-dependent. On Windows, a
"COLORREF is returned. On X, an allocated pixel value is returned.\n" COLORREF is returned. On X, an allocated pixel value is returned. -1
"-1 is returned if the pixel is invalid (on X, unallocated)."); is returned if the pixel is invalid (on X, unallocated).", "");
DocDeclStr( DocDeclStr(
bool , operator==(const wxColour& colour) const, bool , operator==(const wxColour& colour) const,
"Compare colours for equality"); "Compare colours for equality", "");
DocDeclStr( DocDeclStr(
bool , operator!=(const wxColour& colour) const, bool , operator!=(const wxColour& colour) const,
"Compare colours for inequality"); "Compare colours for inequality", "");
%extend { %extend {
DocAStr(Get, DocAStr(Get,
"Get() -> (r, g, b)", "Get() -> (r, g, b)",
"Returns the RGB intensity values as a tuple."); "Returns the RGB intensity values as a tuple.", "");
PyObject* Get() { PyObject* Get() {
PyObject* rv = PyTuple_New(3); PyObject* rv = PyTuple_New(3);
int red = -1; int red = -1;
@@ -125,7 +133,7 @@ public:
} }
DocStr(GetRGB, DocStr(GetRGB,
"Return the colour as a packed RGB value"); "Return the colour as a packed RGB value", "");
unsigned long GetRGB() { unsigned long GetRGB() {
return self->Red() | (self->Green() << 8) | (self->Blue() << 16); return self->Red() | (self->Green() << 8) | (self->Blue() << 16);
} }
@@ -133,9 +141,9 @@ public:
%pythoncode { %pythoncode {
asTuple = Get asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
def __str__(self): return str(self.asTuple()) def __str__(self): return str(self.Get())
def __repr__(self): return 'wx.Colour' + str(self.asTuple()) def __repr__(self): return 'wx.Colour' + str(self.Get())
def __nonzero__(self): return self.Ok() def __nonzero__(self): return self.Ok()
__safe_for_unpickling__ = True __safe_for_unpickling__ = True
def __reduce__(self): return (Colour, self.Get()) def __reduce__(self): return (Colour, self.Get())

View File

@@ -22,28 +22,36 @@ MAKE_CONST_WXSTRING(ComboBoxNameStr);
DocStr(wxComboBox, DocStr(wxComboBox,
"A combobox is like a combination of an edit control and a listbox. It can be "A combobox is like a combination of an edit control and a
displayed as static list with editable or read-only text field; or a drop-down listbox. It can be displayed as static list with editable or
list with text field."); read-only text field; or a drop-down list with text field.
RefDoc(wxComboBox, " A combobox permits a single selection only. Combobox items are
Styles numbered from zero.", "
wx.CB_SIMPLE: Creates a combobox with a permanently displayed list.
Windows only.
wx.CB_DROPDOWN: Creates a combobox with a drop-down list. Styles
------
================ ===============================================
wx.CB_SIMPLE Creates a combobox with a permanently
displayed list. Windows only.
wx.CB_READONLY: Same as wxCB_DROPDOWN but only the strings specified as wx.CB_DROPDOWN Creates a combobox with a drop-down list.
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. 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.
Events wx.CB_SORT Sorts the entries in the list alphabetically.
================ ===============================================
EVT_COMBOBOX: Sent when an item on the list is selected. Events
EVT_TEXT: Sent when the combobox text changes. -------
================ ===============================================
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 "self._setOORInfo(self)"
%pythonAppend wxComboBox() "" %pythonAppend wxComboBox() ""
RefDoc(wxComboBox, ""); // turn it off for the ctors
DocCtorAStr( DocCtorAStr(
wxComboBox(wxWindow* parent, wxWindowID id=-1, wxComboBox(wxWindow* parent, wxWindowID id=-1,
const wxString& value = wxPyEmptyString, const wxString& value = wxPyEmptyString,
@@ -69,15 +75,15 @@ public:
long style = 0, long style = 0,
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxPyComboBoxNameStr), const wxString& name = wxPyComboBoxNameStr),
"__init__(Window parent, int id, String value=EmptyString,\n" "__init__(Window parent, int id, String value=EmptyString,
" Point pos=DefaultPosition, Size size=DefaultSize,\n" Point pos=DefaultPosition, Size size=DefaultSize,
" List choices=[], long style=0, Validator validator=DefaultValidator,\n" List choices=[], long style=0, Validator validator=DefaultValidator,
" String name=ComboBoxNameStr) -> ComboBox", String name=ComboBoxNameStr) -> ComboBox",
"Constructor, creates and shows a ComboBox control."); "Constructor, creates and shows a ComboBox control.", "");
DocCtorStrName( DocCtorStrName(
wxComboBox(), wxComboBox(),
"Precreate a ComboBox control for 2-phase creation.", "Precreate a ComboBox control for 2-phase creation.", "",
PreComboBox); PreComboBox);
@@ -90,81 +96,81 @@ public:
long style = 0, long style = 0,
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxPyChoiceNameStr), const wxString& name = wxPyChoiceNameStr),
"Create(Window parent, int id, String value=EmptyString,\n" "Create(Window parent, int id, String value=EmptyString,
" Point pos=DefaultPosition, Size size=DefaultSize,\n" Point pos=DefaultPosition, Size size=DefaultSize,
" List choices=[], long style=0, Validator validator=DefaultValidator,\n" List choices=[], long style=0, Validator validator=DefaultValidator,
" String name=ChoiceNameStr) -> bool", String name=ChoiceNameStr) -> bool",
"Actually create the GUI wxComboBox control for 2-phase creation"); "Actually create the GUI wxComboBox control for 2-phase creation", "");
DocDeclStr( DocDeclStr(
virtual wxString , GetValue() const, virtual wxString , GetValue() const,
"Returns the current value in the combobox text field."); "Returns the current value in the combobox text field.", "");
DocDeclStr( DocDeclStr(
virtual void , SetValue(const wxString& value), virtual void , SetValue(const wxString& value),
""); "", "");
DocDeclStr( DocDeclStr(
virtual void , Copy(), virtual void , Copy(),
"Copies the selected text to the clipboard."); "Copies the selected text to the clipboard.", "");
DocDeclStr( DocDeclStr(
virtual void , Cut(), 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( DocDeclStr(
virtual void , Paste(), virtual void , Paste(),
"Pastes text from the clipboard to the text field."); "Pastes text from the clipboard to the text field.", "");
DocDeclStr( DocDeclStr(
virtual void , SetInsertionPoint(long pos), virtual void , SetInsertionPoint(long pos),
"Sets the insertion point in the combobox text field."); "Sets the insertion point in the combobox text field.", "");
DocDeclStr( DocDeclStr(
virtual long , GetInsertionPoint() const, 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( DocDeclStr(
virtual long , GetLastPosition() const, virtual long , GetLastPosition() const,
"Returns the last position in the combobox text field."); "Returns the last position in the combobox text field.", "");
DocDeclStr( DocDeclStr(
virtual void , Replace(long from, long to, const wxString& value), virtual void , Replace(long from, long to, const wxString& value),
"Replaces the text between two positions with the given text, in the\n" "Replaces the text between two positions with the given text, in the
"combobox text field."); combobox text field.", "");
DocDeclStr( DocDeclStr(
void , SetSelection(int n), 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( DocDeclStrName(
virtual void , SetSelection(long from, long to), 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); SetMark);
DocDeclStr( DocDeclStr(
bool , SetStringSelection(const wxString& string), bool , SetStringSelection(const wxString& string),
"Select the item with the specifed string"); "Select the item with the specifed string", "");
DocDeclStr( DocDeclStr(
void , SetString(int n, const wxString& string), 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( DocDeclStr(
virtual void , SetEditable(bool editable), virtual void , SetEditable(bool editable),
""); "", "");
DocDeclStr( DocDeclStr(
virtual void , SetInsertionPointEnd(), 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( DocDeclStr(
virtual void , Remove(long from, long to), 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 static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);

View File

@@ -47,24 +47,23 @@ enum
DocStr(wxConfigBase, DocStr(wxConfigBase,
"wx.ConfigBase class defines the basic interface of all config "wx.ConfigBase class defines the basic interface of all config
classes. It can not be used by itself (it is an abstract base classes. It can not be used by itself (it is an abstract base class)
class) and you will always use one of its derivations: wx.Config and you will always use one of its derivations: wx.Config or
or wx.FileConfig. wx.FileConfig.
wx.ConfigBase organizes the items in a tree-like structure, wx.ConfigBase organizes the items in a tree-like structure, modeled
modeled after the Unix/Dos filesystem. There are groups that act after the Unix/Dos filesystem. There are groups that act like
like directories and entries, key/value pairs that act like directories and entries, key/value pairs that act like files. There
files. There is always one current group given by the current is always one current group given by the current path. As in the file
path. As in the file system case, to specify a key in the config system case, to specify a key in the config class you must use a path
class you must use a path to it. Config classes also support the to it. Config classes also support the notion of the current group,
notion of the current group, which makes it possible to use which makes it possible to use relative paths.
relative paths.
Keys are pairs \"key_name = value\" where value may be of string, Keys are pairs \"key_name = value\" where value may be of string,
integer floating point or boolean, you can not store binary data integer floating point or boolean, you can not store binary data
without first encoding it as a string. For performance reasons without first encoding it as a string. For performance reasons items
items should be kept small, no more than a couple kilobytes. should be kept small, no more than a couple kilobytes.
"); ", "");
class wxConfigBase { class wxConfigBase {
@@ -88,50 +87,51 @@ public:
DocDeclStr( DocDeclStr(
static wxConfigBase *, Set(wxConfigBase *config), static wxConfigBase *, Set(wxConfigBase *config),
"Sets the global config object (the one returned by Get) and\n" "Sets the global config object (the one returned by Get) and returns a
"returns a reference to the previous global config object."); reference to the previous global config object.", "");
DocDeclStr( DocDeclStr(
static wxConfigBase *, Get(bool createOnDemand = True), 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( DocDeclStr(
static wxConfigBase *, Create(), static wxConfigBase *, Create(),
"Create and return a new global config object. This function will\n" "Create and return a new global config object. This function will
"create the \"best\" implementation of wx.Config available for the\n" create the \"best\" implementation of wx.Config available for the
"current platform."); current platform.", "");
DocDeclStr( DocDeclStr(
static void , DontCreateOnDemand(), 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( DocDeclStr(
virtual void , SetPath(const wxString& path), virtual void , SetPath(const wxString& path),
"Set current path: if the first character is '/', it's the absolute path,\n" "Set current path: if the first character is '/', it's the absolute
"otherwise it's a relative path. '..' is supported. If the strPath\n" path, otherwise it's a relative path. '..' is supported. If the
"doesn't exist it is created."); strPath doesn't exist it is created.", "");
DocDeclStr( DocDeclStr(
virtual const wxString& , GetPath() const, virtual const wxString& , GetPath() const,
"Retrieve the current path (always as absolute path)"); "Retrieve the current path (always as absolute path)", "");
%extend { %extend {
DocAStr(GetFirstGroup, DocAStr(GetFirstGroup,
"GetFirstGroup() -> (more, value, index)", "GetFirstGroup() -> (more, value, index)",
"Allows enumerating the subgroups in a config object. Returns\n" "Allows enumerating the subgroups in a config object. Returns a tuple
"a tuple containing a flag indicating there are more items, the\n" containing a flag indicating there are more items, the name of the
"name of the current item, and an index to pass to GetNextGroup to\n" current item, and an index to pass to GetNextGroup to fetch the next
"fetch the next item."); item.", "");
PyObject* GetFirstGroup() { PyObject* GetFirstGroup() {
bool cont; bool cont;
long index = 0; long index = 0;
@@ -145,10 +145,10 @@ public:
DocAStr(GetNextGroup, DocAStr(GetNextGroup,
"GetNextGroup(long index) -> (more, value, index)", "GetNextGroup(long index) -> (more, value, index)",
"Allows enumerating the subgroups in a config object. Returns\n" "Allows enumerating the subgroups in a config object. Returns a tuple
"a tuple containing a flag indicating there are more items, the\n" containing a flag indicating there are more items, the name of the
"name of the current item, and an index to pass to GetNextGroup to\n" current item, and an index to pass to GetNextGroup to fetch the next
"fetch the next item."); item.", "");
PyObject* GetNextGroup(long index) { PyObject* GetNextGroup(long index) {
bool cont; bool cont;
wxString value; wxString value;
@@ -160,10 +160,10 @@ public:
DocAStr(GetFirstEntry, DocAStr(GetFirstEntry,
"GetFirstEntry() -> (more, value, index)", "GetFirstEntry() -> (more, value, index)",
"Allows enumerating the entries in the current group in a config\n" "Allows enumerating the entries in the current group in a config
"object. Returns a tuple containing a flag indicating there are\n" object. Returns a tuple containing a flag indicating there are more
"more items, the name of the current item, and an index to pass to\n" items, the name of the current item, and an index to pass to
"GetNextGroup to fetch the next item."); GetNextGroup to fetch the next item.", "");
PyObject* GetFirstEntry() { PyObject* GetFirstEntry() {
bool cont; bool cont;
long index = 0; long index = 0;
@@ -176,10 +176,10 @@ public:
DocAStr(GetNextEntry, DocAStr(GetNextEntry,
"GetNextEntry(long index) -> (more, value, index)", "GetNextEntry(long index) -> (more, value, index)",
"Allows enumerating the entries in the current group in a config\n" "Allows enumerating the entries in the current group in a config
"object. Returns a tuple containing a flag indicating there are\n" object. Returns a tuple containing a flag indicating there are more
"more items, the name of the current item, and an index to pass to\n" items, the name of the current item, and an index to pass to
"GetNextGroup to fetch the next item."); GetNextGroup to fetch the next item.", "");
PyObject* GetNextEntry(long index) { PyObject* GetNextEntry(long index) {
bool cont; bool cont;
wxString value; wxString value;
@@ -193,46 +193,46 @@ public:
DocDeclStr( DocDeclStr(
virtual size_t , GetNumberOfEntries(bool recursive = False) const, virtual size_t , GetNumberOfEntries(bool recursive = False) const,
"Get the number of entries in the current group, with or\n" "Get the number of entries in the current group, with or without its
"without its subgroups."); subgroups.", "");
DocDeclStr( DocDeclStr(
virtual size_t , GetNumberOfGroups(bool recursive = False) const, virtual size_t , GetNumberOfGroups(bool recursive = False) const,
"Get the number of subgroups in the current group, with or\n" "Get the number of subgroups in the current group, with or without its
"without its subgroups."); subgroups.", "");
DocDeclStr( DocDeclStr(
virtual bool , HasGroup(const wxString& name) const, 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( DocDeclStr(
virtual bool , HasEntry(const wxString& name) const, 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( DocDeclStr(
bool , Exists(const wxString& name) const, 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 // get the entry type
DocDeclStr( DocDeclStr(
virtual EntryType , GetEntryType(const wxString& name) const, 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( DocDeclStr(
wxString , Read(const wxString& key, const wxString& defaultVal = wxPyEmptyString), 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 { %extend {
DocStr(ReadInt, 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 ReadInt(const wxString& key, long defaultVal = 0) {
long rv; long rv;
self->Read(key, &rv, defaultVal); self->Read(key, &rv, defaultVal);
@@ -240,7 +240,7 @@ public:
} }
DocStr(ReadFloat, 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 ReadFloat(const wxString& key, double defaultVal = 0.0) {
double rv; double rv;
self->Read(key, &rv, defaultVal); self->Read(key, &rv, defaultVal);
@@ -248,7 +248,7 @@ public:
} }
DocStr(ReadBool, 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 ReadBool(const wxString& key, bool defaultVal = False) {
bool rv; bool rv;
self->Read(key, &rv, defaultVal); self->Read(key, &rv, defaultVal);
@@ -260,40 +260,40 @@ public:
// write the value (return True on success) // write the value (return True on success)
DocDeclStr( DocDeclStr(
bool , Write(const wxString& key, const wxString& value), bool , Write(const wxString& key, const wxString& value),
"write the value (return True on success)"); "write the value (return True on success)", "");
DocDeclStrName( DocDeclStrName(
bool, Write(const wxString& key, long value), bool, Write(const wxString& key, long value),
"write the value (return True on success)", "write the value (return True on success)", "",
WriteInt); WriteInt);
DocDeclStrName( DocDeclStrName(
bool, Write(const wxString& key, double value), bool, Write(const wxString& key, double value),
"write the value (return True on success)", "write the value (return True on success)", "",
WriteFloat); WriteFloat);
DocDeclStrName( DocDeclStrName(
bool, Write(const wxString& key, bool value), bool, Write(const wxString& key, bool value),
"write the value (return True on success)", "write the value (return True on success)", "",
WriteBool); WriteBool);
DocDeclStr( DocDeclStr(
virtual bool , Flush(bool currentOnly = False), virtual bool , Flush(bool currentOnly = False),
"permanently writes all changes"); "permanently writes all changes", "");
DocDeclStr( DocDeclStr(
virtual bool , RenameEntry(const wxString& oldName, virtual bool , RenameEntry(const wxString& oldName,
const wxString& newName), const wxString& newName),
"Rename an entry. Returns False on failure (probably because the new\n" "Rename an entry. Returns False on failure (probably because the new
"name is already taken by an existing entry)"); name is already taken by an existing entry)", "");
DocDeclStr( DocDeclStr(
virtual bool , RenameGroup(const wxString& oldName, virtual bool , RenameGroup(const wxString& oldName,
const wxString& newName), const wxString& newName),
"Rename aa group. Returns False on failure (probably because the new\n" "Rename a group. Returns False on failure (probably because the new
"name is already taken by an existing entry)"); name is already taken by an existing entry)", "");
// deletes the specified entry and the group it belongs to if // deletes the specified entry and the group it belongs to if
@@ -301,71 +301,72 @@ public:
DocDeclStr( DocDeclStr(
virtual bool , DeleteEntry(const wxString& key, virtual bool , DeleteEntry(const wxString& key,
bool deleteGroupIfEmpty = True), bool deleteGroupIfEmpty = True),
"Deletes the specified entry and the group it belongs to if\n" "Deletes the specified entry and the group it belongs to if it was the
"it was the last key in it and the second parameter is True"); last key in it and the second parameter is True", "");
DocDeclStr( DocDeclStr(
virtual bool , DeleteGroup(const wxString& key), virtual bool , DeleteGroup(const wxString& key),
"Delete the group (with all subgroups)"); "Delete the group (with all subgroups)", "");
DocDeclStr( DocDeclStr(
virtual bool , DeleteAll(), virtual bool , DeleteAll(),
"Delete the whole underlying object (disk file, registry key, ...)\n" "Delete the whole underlying object (disk file, registry key, ...)
"primarly intended for use by deinstallation routine."); primarly intended for use by deinstallation routine.", "");
DocDeclStr( DocDeclStr(
void , SetExpandEnvVars(bool doIt = True), void , SetExpandEnvVars(bool doIt = True),
"We can automatically expand environment variables in the config entries\n" "We can automatically expand environment variables in the config
"(this option is on by default, you can turn it on/off at any time)"); entries this option is on by default, you can turn it on/off at any
time)", "");
DocDeclStr( DocDeclStr(
bool , IsExpandingEnvVars() const, bool , IsExpandingEnvVars() const,
"Are we currently expanding environment variables?"); "Are we currently expanding environment variables?", "");
DocDeclStr( DocDeclStr(
void , SetRecordDefaults(bool doIt = True), void , SetRecordDefaults(bool doIt = True),
"Set whether the config objec should record default values."); "Set whether the config objec should record default values.", "");
DocDeclStr( DocDeclStr(
bool , IsRecordingDefaults() const, bool , IsRecordingDefaults() const,
"Are we currently recording default values?"); "Are we currently recording default values?", "");
DocDeclStr( DocDeclStr(
wxString , ExpandEnvVars(const wxString& str) const, 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( DocDeclStr(
wxString , GetAppName() const, wxString , GetAppName() const,
""); "", "");
DocDeclStr( DocDeclStr(
wxString , GetVendorName() const, wxString , GetVendorName() const,
""); "", "");
DocDeclStr( DocDeclStr(
void , SetAppName(const wxString& appName), void , SetAppName(const wxString& appName),
""); "", "");
DocDeclStr( DocDeclStr(
void , SetVendorName(const wxString& vendorName), void , SetVendorName(const wxString& vendorName),
""); "", "");
DocDeclStr( DocDeclStr(
void , SetStyle(long style), void , SetStyle(long style),
""); "", "");
DocDeclStr( DocDeclStr(
long , GetStyle() const, long , GetStyle() const,
""); "", "");
}; };
@@ -374,7 +375,7 @@ public:
DocStr(wxConfig, DocStr(wxConfig,
"This ConfigBase-derived class will use the registry on Windows, "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 { class wxConfig : public wxConfigBase {
public: public:
@@ -384,7 +385,7 @@ public:
const wxString& localFilename = wxPyEmptyString, const wxString& localFilename = wxPyEmptyString,
const wxString& globalFilename = wxPyEmptyString, const wxString& globalFilename = wxPyEmptyString,
long style = wxCONFIG_USE_LOCAL_FILE | wxCONFIG_USE_GLOBAL_FILE), long style = wxCONFIG_USE_LOCAL_FILE | wxCONFIG_USE_GLOBAL_FILE),
""); "", "");
~wxConfig(); ~wxConfig();
}; };
@@ -393,7 +394,7 @@ public:
DocStr(wxFileConfig, 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 { class wxFileConfig : public wxConfigBase {
public: public:
@@ -403,7 +404,7 @@ public:
const wxString& localFilename = wxPyEmptyString, const wxString& localFilename = wxPyEmptyString,
const wxString& globalFilename = wxPyEmptyString, const wxString& globalFilename = wxPyEmptyString,
long style = wxCONFIG_USE_LOCAL_FILE | wxCONFIG_USE_GLOBAL_FILE), long style = wxCONFIG_USE_LOCAL_FILE | wxCONFIG_USE_GLOBAL_FILE),
""); "", "");
~wxFileConfig(); ~wxFileConfig();
}; };
@@ -412,23 +413,23 @@ public:
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
DocStr(wxConfigPathChanger, DocStr(wxConfigPathChanger,
"A handy little class which changes current path to the path of "A handy little class which changes current path to the path of given
given entry and restores it in the destructoir: so if you declare entry and restores it in the destructoir: so if you declare a local
a local variable of this type, you work in the entry directory variable of this type, you work in the entry directory and the path is
and the path is automatically restored when the function returns."); automatically restored when the function returns.", "");
class wxConfigPathChanger class wxConfigPathChanger
{ {
public: public:
DocCtorStr( DocCtorStr(
wxConfigPathChanger(const wxConfigBase *config, const wxString& entry), wxConfigPathChanger(const wxConfigBase *config, const wxString& entry),
""); "", "");
~wxConfigPathChanger(); ~wxConfigPathChanger();
DocDeclStr( DocDeclStr(
const wxString& , Name() const, const wxString& , Name() const,
"Get the key name"); "Get the key name", "");
}; };
@@ -438,10 +439,10 @@ public:
DocDeclStr( DocDeclStr(
wxString , wxExpandEnvVars(const wxString &sz), wxString , wxExpandEnvVars(const wxString &sz),
"Replace environment variables ($SOMETHING) with their values. The\n" "Replace environment variables ($SOMETHING) with their values. The
"format is $VARNAME or ${VARNAME} where VARNAME contains\n" format is $VARNAME or ${VARNAME} where VARNAME contains alphanumeric
"alphanumeric characters and '_' only. '$' must be escaped ('\$')\n" characters and '_' only. '$' must be escaped ('\$') in order to be
"in order to be taken literally."); taken literally.", "");

View File

@@ -43,51 +43,58 @@ enum wxRelationship
DocStr(wxIndividualLayoutConstraint, DocStr(wxIndividualLayoutConstraint,
"Objects of this class are stored in the wx.LayoutConstraint class as one of "Objects of this class are stored in the `wx.LayoutConstraints` class as
eight possible constraints that a window can be involved in. You will never one of eight possible constraints that a window can be involved in.
need to create an instance of wx.IndividualLayoutConstraint, rather you should You will never need to create an instance of
use create a wx.LayoutContstraints instance and use the individual contstraints wx.IndividualLayoutConstraint, rather you should create a
that it contains. `wx.LayoutConstraints` instance and use the individual contstraints
that it contains.", "
Constraints are initially set to have the relationship wx.Unconstrained, which Constraints are initially set to have the relationship
means that their values should be calculated by looking at known constraints. 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. The Edge specifies the type of edge or dimension of a window.
Edges Edges
------
wx.Left The left edge. ================== ==============================================
wx.Top The top edge. wx.Left The left edge.
wx.Right The right edge. wx.Top The top edge.
wx.Bottom The bottom edge. wx.Right The right edge.
wx.CentreX The x-coordinate of the centre of the window. wx.Bottom The bottom edge.
wx.CentreY The y-coordinate of the centre of the window. 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 The Relationship specifies the relationship that this edge or
with another specified edge or dimension. Normally, the user doesn't use these dimension has with another specified edge or dimension. Normally, the
directly because functions such as Below and RightOf are a convenience for user doesn't use these directly because functions such as Below and
using the more general Set function. RightOf are a convenience for using the more general Set function.
Relationships Relationships
-------------
wx.Unconstrained The edge or dimension is unconstrained ================== ==============================================
wx.Unconstrained The edge or dimension is unconstrained
(the default for edges.) (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.) window position or size (the default for dimensions.)
wx.Above The edge should be above another edge. wx.Above The edge should be above another edge.
wx.Below The edge should be below another edge. wx.Below The edge should be below another edge.
wx.LeftOf The edge should be to the left of 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.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.SameAs The edge or dimension should be the same as another edge
or dimension. 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. 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 class wxIndividualLayoutConstraint : public wxObject
{ {
public: public:
@@ -97,123 +104,141 @@ public:
DocDeclStr( DocDeclStr(
void , Set(wxRelationship rel, wxWindow *otherW, wxEdge otherE, void , Set(wxRelationship rel, wxWindow *otherW, wxEdge otherE,
int val = 0, int marg = wxLAYOUT_DEFAULT_MARGIN), 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( DocDeclStr(
void , LeftOf(wxWindow *sibling, int marg = 0), 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( DocDeclStr(
void , RightOf(wxWindow *sibling, int marg = 0), 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( DocDeclStr(
void , Above(wxWindow *sibling, int marg = 0), 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( DocDeclStr(
void , Below(wxWindow *sibling, int marg = 0), 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( DocDeclStr(
void , SameAs(wxWindow *otherW, wxEdge edge, int marg = 0), 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( DocDeclStr(
void , PercentOf(wxWindow *otherW, wxEdge wh, int per), 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( DocDeclStr(
void , Absolute(int val), void , Absolute(int val),
"Edge has absolute value"); "Constrains this edge or dimension to be the given absolute value.", "");
DocDeclStr( DocDeclStr(
void , Unconstrained(), 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( DocDeclStr(
void , AsIs(), 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( DocDeclStr(
wxWindow *, GetOtherWindow(), wxWindow *, GetOtherWindow(),
""); "", "");
DocDeclStr( DocDeclStr(
wxEdge , GetMyEdge() const, wxEdge , GetMyEdge() const,
""); "", "");
DocDeclStr( DocDeclStr(
void , SetEdge(wxEdge which), void , SetEdge(wxEdge which),
""); "", "");
DocDeclStr( DocDeclStr(
void , SetValue(int v), void , SetValue(int v),
""); "", "");
DocDeclStr( DocDeclStr(
int , GetMargin(), int , GetMargin(),
""); "", "");
DocDeclStr( DocDeclStr(
void , SetMargin(int m), void , SetMargin(int m),
""); "", "");
DocDeclStr( DocDeclStr(
int , GetValue() const, int , GetValue() const,
""); "", "");
DocDeclStr( DocDeclStr(
int , GetPercent() const, int , GetPercent() const,
""); "", "");
DocDeclStr( DocDeclStr(
int , GetOtherEdge() const, int , GetOtherEdge() const,
""); "", "");
DocDeclStr( DocDeclStr(
bool , GetDone() const, bool , GetDone() const,
""); "", "");
DocDeclStr( DocDeclStr(
void , SetDone(bool d), void , SetDone(bool d),
""); "", "");
DocDeclStr( DocDeclStr(
wxRelationship , GetRelationship(), wxRelationship , GetRelationship(),
""); "", "");
DocDeclStr( DocDeclStr(
void , SetRelationship(wxRelationship r), void , SetRelationship(wxRelationship r),
""); "", "");
DocDeclStr( DocDeclStr(
bool , ResetIfWin(wxWindow *otherW), bool , ResetIfWin(wxWindow *otherW),
"Reset constraint if it mentions otherWin"); "Reset constraint if it mentions otherWin", "");
DocDeclStr( DocDeclStr(
bool , SatisfyConstraint(wxLayoutConstraints *constraints, wxWindow *win), bool , SatisfyConstraint(wxLayoutConstraints *constraints, wxWindow *win),
"Try to satisfy constraint"); "Try to satisfy constraint", "");
DocDeclStr( DocDeclStr(
int , GetEdge(wxEdge which, wxWindow *thisWin, wxWindow *other) const, int , GetEdge(wxEdge which, wxWindow *thisWin, wxWindow *other) const,
"Get the value of this edge or dimension, or if this\n" "Get the value of this edge or dimension, or if this\n"
"is not determinable, -1."); "is not determinable, -1.", "");
}; };
DocStr(wxLayoutConstraints, 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 Objects of this class can be associated with a window to define its
constraints, with respect to siblings or its parent. layout constraints, with respect to siblings or its parent.
The class consists of the following eight constraints of class The class consists of the following eight constraints of class
wx.IndividualLayoutConstraint, some or all of which should be accessed 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 * centreX: represents the horizontal centre point of the window
* centreY: represents the vertical centre point of the window * centreY: represents the vertical centre point of the window
Most constraints are initially set to have the relationship wxUnconstrained, Most constraints are initially set to have the relationship
which means that their values should be calculated by looking at known wxUnconstrained, which means that their values should be calculated by
constraints. The exceptions are width and height, which are set to wxAsIs to looking at known constraints. The exceptions are width and height,
ensure that if the user does not specify a constraint, the existing width and which are set to wxAsIs to ensure that if the user does not specify a
height will be used, to be compatible with panel items which often have take a constraint, the existing width and height will be used, to be
default size. If the constraint is wxAsIs, the dimension will not be changed. 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 class wxLayoutConstraints : public wxObject
{ {
public: public:
@@ -260,7 +288,7 @@ public:
DocCtorStr( DocCtorStr(
wxLayoutConstraints(), wxLayoutConstraints(),
""); "", "");
DocDeclA( DocDeclA(
bool, SatisfyConstraints(wxWindow *win, int *OUTPUT), bool, SatisfyConstraints(wxWindow *win, int *OUTPUT),

View File

@@ -24,8 +24,8 @@ MAKE_CONST_WXSTRING(ControlNameStr);
DocStr(wxControl, DocStr(wxControl,
"This is the base class for a control or 'widget'. "This is the base class for a control or 'widget'.
A control is generally a small window which processes user input and/or A control is generally a small window which processes user input
displays one or more item of data."); and/or displays one or more item of data.", "");
class wxControl : public wxWindow class wxControl : public wxWindow
{ {
@@ -41,12 +41,12 @@ public:
long style=0, long style=0,
const wxValidator& validator=wxDefaultValidator, const wxValidator& validator=wxDefaultValidator,
const wxString& name=wxPyControlNameStr), const wxString& name=wxPyControlNameStr),
"Create a Control. Normally you should only call this from a\n" "Create a Control. Normally you should only call this from a subclass'
"subclass' __init__ as a plain old wx.Control is not very useful."); __init__ as a plain old wx.Control is not very useful.", "");
DocCtorStrName( DocCtorStrName(
wxControl(), wxControl(),
"Precreate a Control control for 2-phase creation", "Precreate a Control control for 2-phase creation", "",
PreControl); PreControl);
DocDeclStr( DocDeclStr(
@@ -57,21 +57,23 @@ public:
long style=0, long style=0,
const wxValidator& validator=wxDefaultValidator, const wxValidator& validator=wxDefaultValidator,
const wxString& name=wxPyControlNameStr), const wxString& name=wxPyControlNameStr),
"Do the 2nd phase and create the GUI control."); "Do the 2nd phase and create the GUI control.", "");
DocDeclStr( DocDeclStr(
void , Command(wxCommandEvent& event), void , Command(wxCommandEvent& event),
"Simulates the effect of the user issuing a command to the\n" "Simulates the effect of the user issuing a command to the item.
"item. See wx.CommandEvent.");
:see: `wx.CommandEvent`
", "");
DocDeclStr( DocDeclStr(
wxString , GetLabel(), wxString , GetLabel(),
"Return a control's text."); "Return a control's text.", "");
DocDeclStr( DocDeclStr(
void , SetLabel(const wxString& label), void , SetLabel(const wxString& label),
"Sets the item's text."); "Sets the item's text.", "");
static wxVisualAttributes static wxVisualAttributes
@@ -85,18 +87,18 @@ public:
DocStr(wxItemContainer, DocStr(wxItemContainer,
"wx.ItemContainer defines an interface which is implemented by all "wx.ItemContainer defines an interface which is implemented by all
controls which have string subitems, each of which may be controls which have string subitems, each of which may be selected,
selected, such as wx.ListBox, wx.CheckListBox, wx.Choice and such as `wx.ListBox`, `wx.CheckListBox`, `wx.Choice` as well as
wx.ComboBox (which implements an extended interface deriving from `wx.ComboBox` which implements an extended interface deriving from
this one) this one.
It defines the methods for accessing the control's items and It defines the methods for accessing the control's items and although
although each of the derived classes implements them differently, each of the derived classes implements them differently, they still
they still all conform to the same interface. all conform to the same interface.
The items in a wx.ItemContainer have (non empty) string labels The items in a wx.ItemContainer have (non empty) string labels and,
and, optionally, client data associated with them. optionally, client data associated with them.
"); ", "");
class wxItemContainer class wxItemContainer
{ {
@@ -106,10 +108,10 @@ public:
%extend { %extend {
DocStr(Append, DocStr(Append,
"Adds the item to the control, associating the given data with the\n" "Adds the item to the control, associating the given data with the item
"item if not None. The return value is the index of the newly\n" if not None. The return value is the index of the newly added item
"added item which may be different from the last one if the\n" which may be different from the last one if the control is sorted (e.g.
"control is sorted (e.g. has wx.LB_SORT or wx.CB_SORT style)."); has wx.LB_SORT or wx.CB_SORT style).", "");
int Append(const wxString& item, PyObject* clientData=NULL) { int Append(const wxString& item, PyObject* clientData=NULL) {
if (clientData) { if (clientData) {
wxPyClientData* data = new wxPyClientData(clientData); wxPyClientData* data = new wxPyClientData(clientData);
@@ -121,16 +123,16 @@ public:
DocDeclStrName( DocDeclStrName(
void , Append(const wxArrayString& strings), void , Append(const wxArrayString& strings),
"Apend several items at once to the control. Notice that calling\n" "Apend several items at once to the control. Notice that calling this
"this method may be much faster than appending the items one by\n" method may be much faster than appending the items one by one if you
"one if you need to add a lot of items.", need to add a lot of items.", "",
AppendItems); AppendItems);
%extend { %extend {
DocStr(Insert, DocStr(Insert,
"Insert an item into the control before the item at the pos index,\n" "Insert an item into the control before the item at the ``pos`` index,
"optionally associating some data object with the item."); optionally associating some data object with the item.", "");
int Insert(const wxString& item, int pos, PyObject* clientData=NULL) { int Insert(const wxString& item, int pos, PyObject* clientData=NULL) {
if (clientData) { if (clientData) {
wxPyClientData* data = new wxPyClientData(clientData); wxPyClientData* data = new wxPyClientData(clientData);
@@ -143,65 +145,67 @@ public:
DocDeclStr( DocDeclStr(
virtual void , Clear(), virtual void , Clear(),
"Removes all items from the control."); "Removes all items from the control.", "");
DocDeclStr( DocDeclStr(
virtual void , Delete(int n), virtual void , Delete(int n),
"Deletes the item at the zero-based index 'n' from the control.\n" "Deletes the item at the zero-based index 'n' from the control. Note
"Note that it is an error (signalled by a PyAssertionError\n" that it is an error (signalled by a `wx.PyAssertionError` exception if
"exception if enabled) to remove an item with the index negative\n" enabled) to remove an item with the index negative or greater or equal
"or greater or equal than the number of items in the control."); than the number of items in the control.", "");
DocDeclStr( DocDeclStr(
virtual int , GetCount() const, virtual int , GetCount() const,
"Returns the number of items in the control."); "Returns the number of items in the control.", "");
DocDeclStr( DocDeclStr(
bool , IsEmpty() const, 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( DocDeclStr(
virtual wxString , GetString(int n) const, 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( DocDeclStr(
wxArrayString , GetStrings() const, wxArrayString , GetStrings() const,
""); "", "");
DocDeclStr( DocDeclStr(
virtual void , SetString(int n, const wxString& s), virtual void , SetString(int n, const wxString& s),
"Sets the label for the given item."); "Sets the label for the given item.", "");
DocDeclStr( DocDeclStr(
virtual int , FindString(const wxString& s) const, virtual int , FindString(const wxString& s) const,
"Finds an item whose label matches the given string. Returns the\n" "Finds an item whose label matches the given string. Returns the
"zero-based position of the item, or wx.NOT_FOUND if the string\n" zero-based position of the item, or ``wx.NOT_FOUND`` if the string was not
"was not found."); found.", "");
DocDeclStr( DocDeclStr(
virtual void , Select(int n), 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 } %pythoncode { SetSelection = Select }
DocDeclStr( DocDeclStr(
virtual int , GetSelection() const, 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( DocDeclStr(
wxString , GetStringSelection() const, 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 { %extend {
DocStr(GetClientData, 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) { PyObject* GetClientData(int n) {
wxPyClientData* data = (wxPyClientData*)self->GetClientObject(n); wxPyClientData* data = (wxPyClientData*)self->GetClientObject(n);
if (data) { if (data) {
@@ -214,7 +218,7 @@ public:
} }
DocStr(SetClientData, 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) { void SetClientData(int n, PyObject* clientData) {
wxPyClientData* data = new wxPyClientData(clientData); wxPyClientData* data = new wxPyClientData(clientData);
self->SetClientObject(n, data); self->SetClientObject(n, data);
@@ -228,9 +232,9 @@ public:
%newgroup; %newgroup;
DocStr(wxControlWithItems, DocStr(wxControlWithItems,
"wx.ControlWithItems combines the wx.ItemContainer class with the "wx.ControlWithItems combines the ``wx.ItemContainer`` class with the
wx.Control class, and is used for the base class of various wx.Control class, and is used for the base class of various controls
controls that have items."); that have items.", "");
class wxControlWithItems : public wxControl, public wxItemContainer class wxControlWithItems : public wxControl, public wxItemContainer
{ {

View File

@@ -38,28 +38,32 @@ EVT_DETAILED_HELP_RANGE = wx.PyEventBinder( wxEVT_DETAILED_HELP, 2)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
DocStr(wxHelpEvent, DocStr(wxHelpEvent,
"A help event is sent when the user has requested "A help event is sent when the user has requested context-sensitive
context-sensitive help. This can either be caused by the help. This can either be caused by the application requesting
application requesting context-sensitive help mode via context-sensitive help mode via wx.ContextHelp, or (on MS Windows) by
wx.ContextHelp, or (on MS Windows) by the system generating a the system generating a WM_HELP message when the user pressed F1 or
WM_HELP message when the user pressed F1 or clicked on the query clicked on the query button in a dialog caption.
button in a dialog caption.
A help event is sent to the window that the user clicked on, and A help event is sent to the window that the user clicked on, and is
is propagated up the window hierarchy until the event is propagated up the window hierarchy until the event is processed or
processed or there are no more event handlers. The application there are no more event handlers. The application should call
should call event.GetId to check the identity of the clicked-on event.GetId to check the identity of the clicked-on window, and then
window, and then either show some suitable help or call either show some suitable help or call event.Skip if the identifier is
event.Skip if the identifier is unrecognised. Calling Skip is unrecognised. Calling Skip is important because it allows wxWindows to
important because it allows wxWindows to generate further events generate further events for ancestors of the clicked-on
for ancestors of the clicked-on window. Otherwise it would be window. Otherwise it would be impossible to show help for container
impossible to show help for container windows, since processing windows, since processing would stop after the first window found.",
would stop after the first window found. "
Events Events
-------
============== =========================================
EVT_HELP Sent when the user has requested context- EVT_HELP Sent when the user has requested context-
sensitive help. sensitive help.
EVT_HELP_RANGE Allows to catch EVT_HELP for a range of IDs 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, wxHelpEvent(wxEventType type = wxEVT_NULL,
wxWindowID winid = 0, wxWindowID winid = 0,
const wxPoint& pt = wxDefaultPosition), const wxPoint& pt = wxDefaultPosition),
""); "", "");
DocDeclStr( DocDeclStr(
const wxPoint , GetPosition() const, const wxPoint , GetPosition() const,
"Returns the left-click position of the mouse, in screen\n" "Returns the left-click position of the mouse, in screen
"coordinates. This allows the application to position the help\n" coordinates. This allows the application to position the help
"appropriately."); appropriately.", "");
DocDeclStr( DocDeclStr(
void , SetPosition(const wxPoint& pos), 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( DocDeclStr(
const wxString& , GetLink() const, const wxString& , GetLink() const,
"Get an optional link to further help"); "Get an optional link to further help", "");
DocDeclStr( DocDeclStr(
void , SetLink(const wxString& link), void , SetLink(const wxString& link),
"Set an optional link to further help"); "Set an optional link to further help", "");
DocDeclStr( DocDeclStr(
const wxString& , GetTarget() const, 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( DocDeclStr(
void , SetTarget(const wxString& target), 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, DocStr(wxContextHelp,
"This class changes the cursor to a query and puts the application "This class changes the cursor to a query and puts the application into
into a 'context-sensitive help mode'. When the user left-clicks a 'context-sensitive help mode'. When the user left-clicks on a window
on a window within the specified window, a EVT_HELP event is sent within the specified window, a ``EVT_HELP`` event is sent to that
to that control, and the application may respond to it by popping control, and the application may respond to it by popping up some
up some help. help.
There are a couple of ways to invoke this behaviour implicitly: There are a couple of ways to invoke this behaviour implicitly:
* Use the wx.DIALOG_EX_CONTEXTHELP extended style for a * Use the wx.DIALOG_EX_CONTEXTHELP extended style for a dialog
dialog (Windows only). This will put a question mark in the (Windows only). This will put a question mark in the titlebar,
titlebar, and Windows will put the application into and Windows will put the application into context-sensitive help
context-sensitive help mode automatically, with further mode automatically, with further programming.
programming.
* Create a wx.ContextHelpButton, whose predefined behaviour * Create a `wx.ContextHelpButton`, whose predefined behaviour is
is to create a context help object. Normally you will write to create a context help object. Normally you will write your
your application so that this button is only added to a application so that this button is only added to a dialog for
dialog for non-Windows platforms (use non-Windows platforms (use ``wx.DIALOG_EX_CONTEXTHELP`` on
wx.DIALOG_EX_CONTEXTHELP on Windows). Windows).
");
:see: `wx.ContextHelpButton`
", "");
class wxContextHelp : public wxObject { class wxContextHelp : public wxObject {
public: public:
DocCtorStr( DocCtorStr(
wxContextHelp(wxWindow* window = NULL, bool doNow = True), wxContextHelp(wxWindow* window = NULL, bool doNow = True),
"Constructs a context help object, calling BeginContextHelp if\n" "Constructs a context help object, calling BeginContextHelp if doNow is
"doNow is true (the default).\n" true (the default).
"\n"
"If window is None, the top window is used."); If window is None, the top window is used.", "");
~wxContextHelp(); ~wxContextHelp();
DocDeclStr( DocDeclStr(
bool , BeginContextHelp(wxWindow* window = NULL), bool , BeginContextHelp(wxWindow* window = NULL),
"Puts the application into context-sensitive help mode. window is\n" "Puts the application into context-sensitive help mode. window is the
"the window which will be used to catch events; if NULL, the top\n" window which will be used to catch events; if NULL, the top window
"window will be used.\n" will be used.
"\n"
"Returns true if the application was successfully put into\n" Returns true if the application was successfully put into
"context-sensitive help mode. This function only returns when the\n" context-sensitive help mode. This function only returns when the event
"event loop has finished."); loop has finished.", "");
DocDeclStr( DocDeclStr(
bool , EndContextHelp(), bool , EndContextHelp(),
"Ends context-sensitive help mode. Not normally called by the\n" "Ends context-sensitive help mode. Not normally called by the
"application."); application.", "");
}; };
@@ -160,17 +165,18 @@ public:
//---------------------------------------------------------------------- //----------------------------------------------------------------------
DocStr(wxContextHelpButton, DocStr(wxContextHelpButton,
"Instances of this class may be used to add a question mark button "Instances of this class may be used to add a question mark button that
that when pressed, puts the application into context-help when pressed, puts the application into context-help mode. It does
mode. It does this by creating a wx.ContextHelp object which this by creating a wx.ContextHelp object which itself generates a
itself generates a EVT_HELP event when the user clicks on a ``EVT_HELP`` event when the user clicks on a window.
window.
On Windows, you may add a question-mark icon to a dialog by use On Windows, you may add a question-mark icon to a dialog by use of the
of the wx.DIALOG_EX_CONTEXTHELP extra style, but on other ``wx.DIALOG_EX_CONTEXTHELP`` extra style, but on other platforms you
platforms you will have to add a button explicitly, usually next will have to add a button explicitly, usually next to OK, Cancel or
to OK, Cancel or similar buttons. similar buttons.
");
:see: `wx.ContextHelp`, `wx.ContextHelpButton`
", "");
class wxContextHelpButton : public wxBitmapButton { class wxContextHelpButton : public wxBitmapButton {
public: public:
@@ -181,7 +187,7 @@ public:
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = wxBU_AUTODRAW), 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. given window.
The current help provider must be explicitly set by the The current help provider must be explicitly set by the
application using wx.HelpProvider.Set()."); application using wx.HelpProvider.Set().", "");
class wxHelpProvider class wxHelpProvider
{ {
public: public:
DocDeclStr( DocDeclStr(
static wxHelpProvider *, Set(wxHelpProvider *helpProvider), static wxHelpProvider *, Set(wxHelpProvider *helpProvider),
"Sset the current, application-wide help provider. Returns the\n" "Sset the current, application-wide help provider. Returns the previous
"previous one. Unlike some other classes, the help provider is\n" one. Unlike some other classes, the help provider is not created on
"not created on demand. This must be explicitly done by the\n" demand. This must be explicitly done by the application.", "");
"application.");
DocDeclStr( DocDeclStr(
static wxHelpProvider *, Get(), static wxHelpProvider *, Get(),
"Return the current application-wide help provider."); "Return the current application-wide help provider.", "");
DocDeclStr( DocDeclStr(
wxString , GetHelp(const wxWindow *window), wxString , GetHelp(const wxWindow *window),
"Gets the help string for this window. Its interpretation is\n" "Gets the help string for this window. Its interpretation is dependent
"dependent on the help provider except that empty string always\n" on the help provider except that empty string always means that no
"means that no help is associated with the window."); help is associated with the window.", "");
DocDeclStr( DocDeclStr(
bool , ShowHelp(wxWindow *window), bool , ShowHelp(wxWindow *window),
"Shows help for the given window. Uses GetHelp internally if\n" "Shows help for the given window. Uses GetHelp internally if
"applicable.\n" applicable. Returns True if it was done, or False if no help was
"\n" available for this window.", "");
"Returns true if it was done, or false if no help was available\n"
"for this window.");
DocDeclStr( DocDeclStr(
void , AddHelp(wxWindow *window, const wxString& text), void , AddHelp(wxWindow *window, const wxString& text),
"Associates the text with the given window."); "Associates the text with the given window.", "");
DocDeclStrName( DocDeclStrName(
void , AddHelp(wxWindowID id, const wxString& text), void , AddHelp(wxWindowID id, const wxString& text),
"This version associates the given text with all windows with this\n" "This version associates the given text with all windows with this
"id. May be used to set the same help string for all Cancel\n" id. May be used to set the same help string for all Cancel buttons in
"buttons in the application, for example.", the application, for example.", "",
AddHelpById); AddHelpById);
DocDeclStr( DocDeclStr(
void , RemoveHelp(wxWindow* window), void , RemoveHelp(wxWindow* window),
"Removes the association between the window pointer and the help\n" "Removes the association between the window pointer and the help
"text. This is called by the wx.Window destructor. Without this,\n" text. This is called by the wx.Window destructor. Without this, the
"the table of help strings will fill up and when window pointers\n" table of help strings will fill up and when window pointers are
"are reused, the wrong help string will be found."); reused, the wrong help string will be found.", "");
%extend { void Destroy() { delete self; } } %extend { void Destroy() { delete self; } }
@@ -250,9 +253,9 @@ public:
//---------------------------------------------------------------------- //----------------------------------------------------------------------
DocStr(wxSimpleHelpProvider, DocStr(wxSimpleHelpProvider,
"wx.SimpleHelpProvider is an implementation of wx.HelpProvider "wx.SimpleHelpProvider is an implementation of `wx.HelpProvider` which
which supports only plain text help strings, and shows the string supports only plain text help strings, and shows the string associated
associated with the control (if any) in a tooltip."); with the control (if any) in a tooltip.", "");
class wxSimpleHelpProvider : public wxHelpProvider class wxSimpleHelpProvider : public wxHelpProvider
{ {

View File

@@ -17,21 +17,19 @@
DocStr(wxCursor, DocStr(wxCursor,
"A cursor is a small bitmap usually used for denoting where the "A cursor is a small bitmap usually used for denoting where the mouse
mouse pointer is, with a picture that might indicate the pointer is, with a picture that might indicate the interpretation of a
interpretation of a mouse click. mouse click.
A single cursor object may be used in many windows (any subwindow A single cursor object may be used in many windows (any subwindow
type). The wxWindows convention is to set the cursor for a type). The wxWindows convention is to set the cursor for a window, as
window, as in X, rather than to set it globally as in MS Windows, in X, rather than to set it globally as in MS Windows, although a
although a global wx.SetCursor function is also available for use global `wx.SetCursor` function is also available for use on MS Windows.
on MS Windows."); ","
RefDoc(wxCursor::wxCursor(int id),
"
Stock Cursor IDs
Stock Cursor IDs
-----------------
======================== ======================================
wx.CURSOR_ARROW A standard arrow cursor. wx.CURSOR_ARROW A standard arrow cursor.
wx.CURSOR_RIGHT_ARROW A standard arrow cursor pointing to the right. wx.CURSOR_RIGHT_ARROW A standard arrow cursor pointing to the right.
wx.CURSOR_BLANK Transparent cursor. wx.CURSOR_BLANK Transparent cursor.
@@ -59,6 +57,7 @@ RefDoc(wxCursor::wxCursor(int id),
wx.CURSOR_WAIT A wait cursor. wx.CURSOR_WAIT A wait cursor.
wx.CURSOR_WATCH A watch cursor. wx.CURSOR_WATCH A watch cursor.
wx.CURSOR_ARROWWAIT A cursor with both an arrow and an hourglass, (windows.) wx.CURSOR_ARROWWAIT A cursor with both an arrow and an hourglass, (windows.)
======================== ======================================
"); ");
@@ -66,16 +65,14 @@ class wxCursor : public wxGDIObject
{ {
public: public:
RefDoc(wxCursor, ""); // turn it off for the ctors
%extend { %extend {
DocStr(wxCursor, DocStr(wxCursor,
"Construct a Cursor from a file. Specify the type of file using\n" "Construct a Cursor from a file. Specify the type of file using
"wx.BITAMP_TYPE* constants, and specify the hotspot if not using a\n" wx.BITAMP_TYPE* constants, and specify the hotspot if not using a cur
".cur file.\n" file.
"\n"
"This cursor is not available on wxGTK, use wx.StockCursor,\n" This constructor is not available on wxGTK, use ``wx.StockCursor``,
"wx.CursorFromImage, or wx.CursorFromBits instead."); ``wx.CursorFromImage``, or ``wx.CursorFromBits`` instead.", "");
wxCursor(const wxString* cursorName, long type, int hotSpotX=0, int hotSpotY=0) { wxCursor(const wxString* cursorName, long type, int hotSpotX=0, int hotSpotY=0) {
%#ifdef __WXGTK__ %#ifdef __WXGTK__
wxCHECK_MSG(False, NULL, wxCHECK_MSG(False, NULL,
@@ -90,24 +87,26 @@ public:
DocCtorStrName( DocCtorStrName(
wxCursor(int id), wxCursor(int id),
"Create a cursor using one of the stock cursors. Note that not\n" "Create a cursor using one of the stock cursors. Note that not all
"all cursors are available on all platforms.", cursors are available on all platforms.", "",
StockCursor); StockCursor);
DocCtorStrName( DocCtorStrName(
wxCursor(const wxImage& image), wxCursor(const wxImage& image),
"Constructs a cursor from a wxImage. The cursor is monochrome,\n" "Constructs a cursor from a wxImage. The cursor is monochrome, colors
"colors with the RGB elements all greater than 127 will be\n" with the RGB elements all greater than 127 will be foreground, colors
"foreground, colors less than this background. The mask (if any)\n" less than this background. The mask (if any) will be used as
"will be used as transparent.\n" transparent.",
"\n" "
"In MSW the foreground will be white and the background black. The\n" In MSW the foreground will be white and the background
"cursor is resized to 32x32 In GTK, the two most frequent colors\n" black. The cursor is resized to 32x32.
"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" In GTK, the two most frequent colors will be used for foreground and
"resized to 16x16 and currently only shown as black/white (mask\n" background. The cursor will be displayed at the size of the image.
"respected).",
On MacOS the cursor is resized to 16x16 and currently only shown as
black/white (mask respected).",
CursorFromImage); CursorFromImage);
@@ -132,11 +131,11 @@ public:
#ifdef __WXMSW__ #ifdef __WXMSW__
DocDeclStr( DocDeclStr(
long , GetHandle(), long , GetHandle(),
"Get the MS Windows handle for the cursor"); "Get the MS Windows handle for the cursor", "");
%extend { %extend {
DocStr(SetHandle, 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); } void SetHandle(long handle) { self->SetHandle((WXHANDLE)handle); }
} }
@@ -144,7 +143,7 @@ public:
DocDeclStr( DocDeclStr(
bool , Ok(), bool , Ok(),
""); "", "");
%pythoncode { def __nonzero__(self): return self.Ok() } %pythoncode { def __nonzero__(self): return self.Ok() }
@@ -152,31 +151,31 @@ public:
#ifdef __WXMSW__ #ifdef __WXMSW__
DocDeclStr( DocDeclStr(
int , GetWidth(), int , GetWidth(),
""); "", "");
DocDeclStr( DocDeclStr(
int , GetHeight(), int , GetHeight(),
""); "", "");
DocDeclStr( DocDeclStr(
int , GetDepth(), int , GetDepth(),
""); "", "");
DocDeclStr( DocDeclStr(
void , SetWidth(int w), void , SetWidth(int w),
""); "", "");
DocDeclStr( DocDeclStr(
void , SetHeight(int h), void , SetHeight(int h),
""); "", "");
DocDeclStr( DocDeclStr(
void , SetDepth(int d), void , SetDepth(int d),
""); "", "");
DocDeclStr( DocDeclStr(
void , SetSize(const wxSize& size), void , SetSize(const wxSize& size),
""); "", "");
#endif #endif

View File

@@ -50,45 +50,47 @@ enum wxDataFormatId
DocStr(wxDataFormat, DocStr(wxDataFormat,
"A wx.DataFormat is an encapsulation of a platform-specific format "A wx.DataFormat is an encapsulation of a platform-specific format
handle which is used by the system for the clipboard and drag and handle which is used by the system for the clipboard and drag and drop
drop operations. The applications are usually only interested in, operations. The applications are usually only interested in, for
for example, pasting data from the clipboard only if the data is example, pasting data from the clipboard only if the data is in a
in a format the program understands. A data format is is used to format the program understands. A data format is is used to uniquely
uniquely identify this format. 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.)
On the system level, a data format is usually just a number The standard format IDs are:
(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
================ =====================================
// wx.DF_INVALID An invalid format Aside the standard formats, the application may also use custom
// wx.DF_TEXT Text format formats which are identified by their names (strings) and not numeric
// wx.DF_BITMAP A bitmap (wx.Bitmap) identifiers. Although internally custom format must be created (or
// wx.DF_METAFILE A metafile (wx.Metafile, Windows only) registered) first, you shouldn\'t care about it because it is done
// wx.DF_FILENAME A list of filenames automatically the first time the wxDataFormat object corresponding to
// wx.DF_HTML An HTML string. This is only valid on Windows and non-unicode builds a given format name is created.
// 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 { class wxDataFormat {
public: public:
DocCtorStr( DocCtorStr(
wxDataFormat( wxDataFormatId type ), wxDataFormat( wxDataFormatId type ),
"Constructs a data format object for one of the standard data\n" "Constructs a data format object for one of the standard data formats
"formats or an empty data object (use SetType or SetId later in\n" or an empty data object (use SetType or SetId later in this case)", "");
"this case)");
DocCtorStrName( DocCtorStrName(
wxDataFormat(const wxString& format), 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); CustomDataFormat);
~wxDataFormat(); ~wxDataFormat();
@@ -104,20 +106,22 @@ public:
DocDeclStr( DocDeclStr(
void , SetType(wxDataFormatId format), 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( DocDeclStr(
wxDataFormatId , GetType() const, wxDataFormatId , GetType() const,
"Returns the platform-specific number identifying the format."); "Returns the platform-specific number identifying the format.", "");
DocDeclStr( DocDeclStr(
wxString , GetId() const, 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( DocDeclStr(
void , SetId(const wxString& format), 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.", "");
}; };

View File

@@ -366,7 +366,7 @@ public:
DocDeclAStr( DocDeclAStr(
static void, GetAmPmStrings(wxString *OUTPUT, wxString *OUTPUT), static void, GetAmPmStrings(wxString *OUTPUT, wxString *OUTPUT),
"GetAmPmStrings() -> (am, pm)", "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 // return True if the given country uses DST for this year
static bool IsDSTApplicable(int year = Inv_Year, static bool IsDSTApplicable(int year = Inv_Year,

View File

@@ -302,15 +302,16 @@ public:
DocDeclAStr( DocDeclAStr(
void, GetTextExtent(const wxString& string, wxCoord *OUTPUT, wxCoord *OUTPUT), void, GetTextExtent(const wxString& string, wxCoord *OUTPUT, wxCoord *OUTPUT),
"GetTextExtent(wxString string) -> (width, height)", "GetTextExtent(wxString string) -> (width, height)",
"Get the width and height of the text using the current font.\n" "Get the width and height of the text using the current font. Only
"Only works for single line strings."); works for single line strings.", "");
DocDeclAStrName( DocDeclAStrName(
void, GetTextExtent(const wxString& string, void, GetTextExtent(const wxString& string,
wxCoord *OUTPUT, wxCoord *OUTPUT, wxCoord *OUTPUT, wxCoord* OUTPUT, wxCoord *OUTPUT, wxCoord *OUTPUT, wxCoord *OUTPUT, wxCoord* OUTPUT,
wxFont* font = NULL), wxFont* font = NULL),
"GetFullTextExtent(wxString string, Font font=None) ->\n (width, height, descent, externalLeading)", "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" "Get the width, height, decent and leading of the text using the
"Only works for single line strings.", current or specified font. Only works for single line strings.", "",
GetFullTextExtent); GetFullTextExtent);
@@ -320,8 +321,9 @@ public:
wxCoord *OUTPUT, wxCoord *OUTPUT, wxCoord *OUTPUT, wxCoord *OUTPUT, wxCoord *OUTPUT, wxCoord *OUTPUT,
wxFont *font = NULL), wxFont *font = NULL),
"GetMultiLineTextExtent(wxString string, Font font=None) ->\n (width, height, descent, externalLeading)", "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" "Get the width, height, decent and leading of the text using the
"Works for single as well as multi-line strings."); current or specified font. Works for single as well as multi-line
strings.", "");
%extend { %extend {
@@ -336,7 +338,7 @@ public:
// size and resolution // size and resolution
// ------------------- // -------------------
DocStr(GetSize, "Get the DC size in device units."); DocStr(GetSize, "Get the DC size in device units.", "");
wxSize GetSize(); wxSize GetSize();
DocDeclAName( DocDeclAName(
void, GetSize( int *OUTPUT, int *OUTPUT ), void, GetSize( int *OUTPUT, int *OUTPUT ),
@@ -344,7 +346,7 @@ public:
GetSizeTuple); GetSizeTuple);
DocStr(GetSizeMM, "Get the DC size in milimeters."); DocStr(GetSizeMM, "Get the DC size in milimeters.", "");
wxSize GetSizeMM() const; wxSize GetSizeMM() const;
DocDeclAName( DocDeclAName(
void, GetSizeMM( int *OUTPUT, int *OUTPUT ) const, void, GetSizeMM( int *OUTPUT, int *OUTPUT ) const,

View File

@@ -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 // Set the docsring for the given full or partial declaration
%define DocStr(decl, docstr) #ifdef _DO_FULL_DOCS
%feature("docstring") decl docstr; %define DocStr(decl, docstr, details)
//%feature("refdoc") decl ""; %feature("docstring") decl docstr details;
%enddef %enddef
#else
%define DocStr(decl, docstr, details)
%feature("docstring") decl docstr;
%enddef
#endif
// Set the autodoc string for a full or partial declaration // Set the autodoc string for a full or partial declaration
%define DocA(decl, astr) %define DocA(decl, astr)
%feature("autodoc") decl astr; %feature("autodoc") decl astr;
%enddef %enddef
// Set both the autodoc and docstring for a full or partial declaration // Set both the autodoc and docstring for a full or partial declaration
%define DocAStr(decl, astr, docstr) #ifdef _DO_FULL_DOCS
%feature("autodoc") decl astr; %define DocAStr(decl, astr, docstr, details)
%feature("docstring") decl docstr %feature("autodoc") decl astr;
%enddef %feature("docstring") decl docstr details
%enddef
// Set the detailed reference docs for full or partial declaration #else
#define DocRef(decl, str) %feature("docref") decl str %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 // Set the docstring for a decl and then define the decl too. Must use the
// full declaration of the item. // full declaration of the item.
%define DocDeclStr(type, decl, docstr) #ifdef _DO_FULL_DOCS
%feature("docstring") decl docstr; %define DocDeclStr(type, decl, docstr, details)
type decl %feature("docstring") decl docstr details;
%enddef 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 // As above, but also give the decl a new %name
%define DocDeclStrName(type, decl, docstr, newname) #ifdef _DO_FULL_DOCS
%feature("docstring") decl docstr; %define DocDeclStrName(type, decl, docstr, details, newname)
%name(newname) type decl %feature("docstring") decl docstr details;
%enddef %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 // Set the autodoc string for a decl and then define the decl too. Must use the
// full declaration of the item. // 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. // Set the autodoc and the docstring for a decl and then define the decl too.
// Must use the full declaration of the item. // Must use the full declaration of the item.
%define DocDeclAStr(type, decl, astr, docstr) #ifdef _DO_FULL_DOCS
%feature("autodoc") decl astr; %define DocDeclAStr(type, decl, astr, details, docstr)
%feature("docstring") decl docstr; %feature("autodoc") decl astr;
type decl %feature("docstring") decl docstr details;
%enddef 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 // As above, but also give the decl a new %name
%define DocDeclAStrName(type, decl, astr, docstr, newname) #ifdef _DO_FULL_DOCS
%feature("autodoc") decl astr; %define DocDeclAStrName(type, decl, astr, docstr, details, newname)
%feature("docstring") decl docstr; %feature("autodoc") decl astr;
%name(newname) type decl %feature("docstring") decl docstr details;
%enddef %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. // Set the docstring for a constructor decl and then define the decl too.
// Must use the full declaration of the item. // Must use the full declaration of the item.
%define DocCtorStr(decl, docstr) #ifdef _DO_FULL_DOCS
%feature("docstring") decl docstr; %define DocCtorStr(decl, docstr, details)
decl %feature("docstring") decl docstr details;
%enddef 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 // As above, but also give the decl a new %name
%define DocCtorStrName(decl, docstr, newname) #ifdef _DO_FULL_DOCS
%feature("docstring") decl docstr; %define DocCtorStrName(decl, docstr, details, newname)
%name(newname) decl %feature("docstring") decl docstr details;
%enddef %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) %define DocCtorA(decl, astr)
%feature("autodoc") decl astr; %feature("autodoc") decl astr;
decl decl
%enddef %enddef
// As above, but also give the decl a new %name // As above, but also give the decl a new %name
%define DocCtorAname(decl, astr, newname) %define DocCtorAName(decl, astr, newname)
%feature("autodoc") decl astr; %feature("autodoc") decl astr;
%name(newname) decl %name(newname) decl
%enddef %enddef
// Set the autodoc and the docstring for a decl and then define the decl too. // Set the autodoc and the docstring for a constructor decl and then define
// Must use the full declaration of the item. // the decl too. Must use the full declaration of the item.
%define DocCtorAStr(decl, astr, docstr) #ifdef _DO_FULL_DOCS
%feature("autodoc") decl astr; %define DocCtorAStr(decl, astr, docstr, details)
%feature("docstring") decl docstr; %feature("autodoc") decl astr;
decl %feature("docstring") decl docstr details;
%enddef 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 // As above, but also give the decl a new %name
%define DocCtorAStrName(decl, astr, docstr, newname) #ifdef _DO_FULL_DOCS
%feature("autodoc") decl astr; %define DocCtorAStrName(decl, astr, docstr, details, newname)
%feature("docstring") decl docstr; %feature("autodoc") decl astr;
%name(newname) decl %feature("docstring") decl docstr details;
%enddef %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 %define %newgroup
%pythoncode { %pythoncode {

View File

@@ -118,9 +118,11 @@ public:
DocDeclAStr( DocDeclAStr(
virtual wxTreeItemId, FindChild(wxTreeItemId parentId, const wxString& path, bool& OUTPUT), virtual wxTreeItemId, FindChild(wxTreeItemId parentId, const wxString& path, bool& OUTPUT),
"FindChild(wxTreeItemId parentId, wxString path) -> (item, done)", "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" "Find the child that matches the first part of 'path'. E.g. if a child
"\"/usr\" and 'path' is \"/usr/include\" then the child for /usr is returned.\n" path is \"/usr\" and 'path' is \"/usr/include\" then the child for
"If the path string has been used (we're at the leaf), done is set to True\n"); /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 // Resize the components of the control

View File

@@ -25,7 +25,7 @@
DocStr(wxVideoMode, DocStr(wxVideoMode,
"A simple struct containing video mode parameters for a display"); "A simple struct containing video mode parameters for a display", "");
struct wxVideoMode struct wxVideoMode
{ {
@@ -34,29 +34,28 @@ struct wxVideoMode
DocDeclStr( DocDeclStr(
bool , Matches(const wxVideoMode& other) const, bool , Matches(const wxVideoMode& other) const,
"Returns true if this mode matches the other one in the sense that "Returns true if this mode matches the other one in the sense that all
all non zero fields of the other mode have the same value in this 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)"); one (except for refresh which is allowed to have a greater value)", "");
DocDeclStr( DocDeclStr(
int , GetWidth() const, int , GetWidth() const,
"Returns the screen width in pixels (e.g. 640*480), 0 means "Returns the screen width in pixels (e.g. 640*480), 0 means unspecified", "");
unspecified");
DocDeclStr( DocDeclStr(
int , GetHeight() const, int , GetHeight() const,
"Returns the screen width in pixels (e.g. 640*480), 0 means "Returns the screen width in pixels (e.g. 640*480), 0 means
unspecified"); unspecified", "");
DocDeclStr( DocDeclStr(
int , GetDepth() const, int , GetDepth() const,
"Returns the screen's bits per pixel (e.g. 32), 1 is monochrome "Returns the screen's bits per pixel (e.g. 32), 1 is monochrome and 0
and 0 means unspecified/known"); means unspecified/known", "");
DocDeclStr( DocDeclStr(
bool , IsOk() const, 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, DocStr(wxDisplay,
"Represents a display/monitor attached to the system"); "Represents a display/monitor attached to the system", "");
class wxDisplay class wxDisplay
@@ -95,26 +94,26 @@ public:
// //
DocCtorStr( DocCtorStr(
wxDisplay(size_t index = 0), wxDisplay(size_t index = 0),
"Set up a Display instance with the specified display. The "Set up a Display instance with the specified display. The displays
displays are numbered from 0 to GetCount() - 1, 0 is always the are numbered from 0 to GetCount() - 1, 0 is always the primary display
primary display and the only one which is always supported"); and the only one which is always supported", "");
virtual ~wxDisplay(); virtual ~wxDisplay();
DocDeclStr( DocDeclStr(
static size_t , GetCount(), static size_t , GetCount(),
"Return the number of available displays."); "Return the number of available displays.", "");
DocDeclStr( DocDeclStr(
static int , GetFromPoint(const wxPoint& pt), static int , GetFromPoint(const wxPoint& pt),
"Find the display where the given point lies, return wx.NOT_FOUND "Find the display where the given point lies, return wx.NOT_FOUND if it
if it doesn't belong to any display"); doesn't belong to any display", "");
DocStr(GetFromWindow, DocStr(GetFromWindow,
"Find the display where the given window lies, return wx.NOT_FOUND "Find the display where the given window lies, return wx.NOT_FOUND if
if it is not shown at all."); it is not shown at all.", "");
#ifdef __WXMSW__ #ifdef __WXMSW__
static int GetFromWindow(wxWindow *window); static int GetFromWindow(wxWindow *window);
#else #else
@@ -126,39 +125,38 @@ if it is not shown at all.");
DocDeclStr( DocDeclStr(
virtual bool , IsOk() const, 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() } %pythoncode { def __nonzero__(self): return self.IsOk() }
DocDeclStr( DocDeclStr(
virtual wxRect , GetGeometry() const, virtual wxRect , GetGeometry() const,
"Returns the bounding rectangle of the display whose index was "Returns the bounding rectangle of the display whose index was passed
passed to the constructor."); to the constructor.", "");
DocDeclStr( DocDeclStr(
virtual wxString , GetName() const, 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( DocDeclStr(
bool , IsPrimary() const, bool , IsPrimary() const,
"Returns true if the display is the primary display. The primary "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 { %extend {
DocAStr(GetModes, DocAStr(GetModes,
"GetModes(VideoMode mode=DefaultVideoMode) -> [videoMode...]", "GetModes(VideoMode mode=DefaultVideoMode) -> [videoMode...]",
"Enumerate all video modes supported by this display matching the "Enumerate all video modes supported by this display matching the given
given one (in the sense of VideoMode.Match()). one (in the sense of VideoMode.Match()).
As any mode matches the default value of the argument and there As any mode matches the default value of the argument and there is
is always at least one video mode supported by display, the always at least one video mode supported by display, the returned
returned array is only empty for the default value of the array is only empty for the default value of the argument if this
argument if this function is not supported at all on this function is not supported at all on this platform.", "");
platform.");
PyObject* GetModes(const wxVideoMode& mode = wxDefaultVideoMode) { PyObject* GetModes(const wxVideoMode& mode = wxDefaultVideoMode) {
PyObject* pyList = NULL; PyObject* pyList = NULL;
@@ -178,17 +176,17 @@ platform.");
DocDeclStr( DocDeclStr(
virtual wxVideoMode , GetCurrentMode() const, virtual wxVideoMode , GetCurrentMode() const,
"Get the current video mode."); "Get the current video mode.", "");
DocDeclStr( DocDeclStr(
virtual bool , ChangeMode(const wxVideoMode& mode = wxDefaultVideoMode), 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( DocDeclStr(
void , ResetMode(), void , ResetMode(),
"Restore the default video mode (just a more readable synonym)"); "Restore the default video mode (just a more readable synonym)", "");
}; };

View File

@@ -597,7 +597,8 @@ public:
DocStr(GetPosition, // sets the docstring for both 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(); wxPoint GetPosition();
DocDeclAName( DocDeclAName(
@@ -712,7 +713,7 @@ public:
DocStr(GetPosition, // sets the docstring for both DocStr(GetPosition, // sets the docstring for both
"Find the position of the event."); "Find the position of the event.", "");
wxPoint GetPosition(); wxPoint GetPosition();
DocDeclAName( DocDeclAName(

View File

@@ -97,7 +97,7 @@ public:
} }
} }
%pythoncode { %pythoncode {
asTuple = Get asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
def __str__(self): return str(self.Get()) def __str__(self): return str(self.Get())
def __repr__(self): return 'wx.GBPosition'+str(self.Get()) def __repr__(self): return 'wx.GBPosition'+str(self.Get())
def __len__(self): return len(self.Get()) def __len__(self): return len(self.Get())
@@ -154,7 +154,7 @@ public:
} }
} }
%pythoncode { %pythoncode {
asTuple = Get asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
def __str__(self): return str(self.Get()) def __str__(self): return str(self.Get())
def __repr__(self): return 'wx.GBSpan'+str(self.Get()) def __repr__(self): return 'wx.GBSpan'+str(self.Get())
def __len__(self): return len(self.Get()) def __len__(self): return len(self.Get())

View File

@@ -112,10 +112,10 @@ enum wxStockCursor
%newgroup %newgroup
DocStr( wxSize, DocStr( wxSize,
"wx.Size is a useful data structure used to represent the size of something. "wx.Size is a useful data structure used to represent the size of
It simply contians integer width and height proprtites. In most places in something. It simply contians integer width and height proprtites.
wxPython where a wx.Size is expected a (width,height) tuple can be used In most places in wxPython where a wx.Size is expected a
instead."); (width,height) tuple can be used instead.", "");
class wxSize class wxSize
{ {
@@ -126,7 +126,7 @@ public:
DocCtorStr( DocCtorStr(
wxSize(int w=0, int h=0), wxSize(int w=0, int h=0),
"Creates a size object."); "Creates a size object.", "");
~wxSize(); ~wxSize();
@@ -138,33 +138,33 @@ public:
DocDeclStr( DocDeclStr(
bool, operator==(const wxSize& sz), bool, operator==(const wxSize& sz),
"Test for equality of wx.Size objects."); "Test for equality of wx.Size objects.", "");
DocDeclStr( DocDeclStr(
bool, operator!=(const wxSize& sz), bool, operator!=(const wxSize& sz),
"Test for inequality."); "Test for inequality.", "");
DocDeclStr( DocDeclStr(
wxSize, operator+(const wxSize& sz), 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( DocDeclStr(
wxSize, operator-(const wxSize& sz), 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( DocDeclStr(
void, IncTo(const wxSize& sz), void, IncTo(const wxSize& sz),
"Increments this object so that both of its dimensions are not less\n" "Increments this object so that both of its dimensions are not less
"than the corresponding dimensions of the size."); than the corresponding dimensions of the size.", "");
DocDeclStr( DocDeclStr(
void, DecTo(const wxSize& sz), void, DecTo(const wxSize& sz),
"Decrements this object so that both of its dimensions are not greater\n" "Decrements this object so that both of its dimensions are not greater
"than the corresponding dimensions of the size."); than the corresponding dimensions of the size.", "");
DocDeclStr( DocDeclStr(
void, Set(int w, int h), void, Set(int w, int h),
"Set both width and height."); "Set both width and height.", "");
void SetWidth(int w); void SetWidth(int w);
void SetHeight(int h); void SetHeight(int h);
@@ -174,14 +174,13 @@ public:
DocDeclStr( DocDeclStr(
bool , IsFullySpecified() const, 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( DocDeclStr(
void , SetDefaults(const wxSize& size), void , SetDefaults(const wxSize& size),
"Combine this size with the other one replacing the default "Combine this size with the other one replacing the default components
components of this object (i.e. equal to -1) with those of the of this object (i.e. equal to -1) with those of the other.", "");
other.");
//int GetX() const; //int GetX() const;
@@ -190,7 +189,7 @@ other.");
%extend { %extend {
DocAStr(Get, DocAStr(Get,
"Get() -> (width,height)", "Get() -> (width,height)",
"Returns the width and height properties as a tuple."); "Returns the width and height properties as a tuple.", "");
PyObject* Get() { PyObject* Get() {
bool blocked = wxPyBeginBlockThreads(); bool blocked = wxPyBeginBlockThreads();
PyObject* tup = PyTuple_New(2); PyObject* tup = PyTuple_New(2);
@@ -201,7 +200,7 @@ other.");
} }
} }
%pythoncode { %pythoncode {
asTuple = Get asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
def __str__(self): return str(self.Get()) def __str__(self): return str(self.Get())
def __repr__(self): return 'wx.Size'+str(self.Get()) def __repr__(self): return 'wx.Size'+str(self.Get())
def __len__(self): return len(self.Get()) def __len__(self): return len(self.Get())
@@ -221,9 +220,9 @@ other.");
%newgroup %newgroup
DocStr( wxRealPoint, DocStr( wxRealPoint,
"A data structure for representing a point or position with floating point x "A data structure for representing a point or position with floating
and y properties. In wxPython most places that expect a wx.RealPoint can also point x and y properties. In wxPython most places that expect a
accept a (x,y) tuple."); wx.RealPoint can also accept a (x,y) tuple.", "");
class wxRealPoint class wxRealPoint
{ {
public: public:
@@ -232,30 +231,30 @@ public:
DocCtorStr( DocCtorStr(
wxRealPoint(double x=0.0, double y=0.0), wxRealPoint(double x=0.0, double y=0.0),
"Create a wx.RealPoint object"); "Create a wx.RealPoint object", "");
~wxRealPoint(); ~wxRealPoint();
DocDeclStr( DocDeclStr(
bool, operator==(const wxRealPoint& pt), bool, operator==(const wxRealPoint& pt),
"Test for equality of wx.RealPoint objects."); "Test for equality of wx.RealPoint objects.", "");
DocDeclStr( DocDeclStr(
bool, operator!=(const wxRealPoint& pt), bool, operator!=(const wxRealPoint& pt),
"Test for inequality of wx.RealPoint objects."); "Test for inequality of wx.RealPoint objects.", "");
DocDeclStr( DocDeclStr(
wxRealPoint, operator+(const wxRealPoint& pt), 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( DocDeclStr(
wxRealPoint, operator-(const wxRealPoint& pt), 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 { %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) { void Set(double x, double y) {
self->x = x; self->x = x;
self->y = y; self->y = y;
@@ -263,7 +262,7 @@ public:
DocAStr(Get, DocAStr(Get,
"Get() -> (x,y)", "Get() -> (x,y)",
"Return the x and y properties as a tuple. "); "Return the x and y properties as a tuple. ", "");
PyObject* Get() { PyObject* Get() {
bool blocked = wxPyBeginBlockThreads(); bool blocked = wxPyBeginBlockThreads();
PyObject* tup = PyTuple_New(2); PyObject* tup = PyTuple_New(2);
@@ -275,7 +274,7 @@ public:
} }
%pythoncode { %pythoncode {
asTuple = Get asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
def __str__(self): return str(self.Get()) def __str__(self): return str(self.Get())
def __repr__(self): return 'wx.RealPoint'+str(self.Get()) def __repr__(self): return 'wx.RealPoint'+str(self.Get())
def __len__(self): return len(self.Get()) def __len__(self): return len(self.Get())
@@ -296,9 +295,9 @@ public:
DocStr(wxPoint, DocStr(wxPoint,
"A data structure for representing a point or position with integer x and y "A data structure for representing a point or position with integer x
properties. Most places in wxPython that expect a wx.Point can also accept a and y properties. Most places in wxPython that expect a wx.Point can
(x,y) tuple."); also accept a (x,y) tuple.", "");
class wxPoint class wxPoint
{ {
@@ -307,18 +306,18 @@ public:
DocCtorStr( DocCtorStr(
wxPoint(int x=0, int y=0), wxPoint(int x=0, int y=0),
"Create a wx.Point object"); "Create a wx.Point object", "");
~wxPoint(); ~wxPoint();
DocDeclStr( DocDeclStr(
bool, operator==(const wxPoint& pt), bool, operator==(const wxPoint& pt),
"Test for equality of wx.Point objects."); "Test for equality of wx.Point objects.", "");
DocDeclStr( DocDeclStr(
bool, operator!=(const wxPoint& pt), 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( DocDeclStr(
wxPoint, operator+(const wxPoint& pt), 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( DocDeclStr(
wxPoint, operator-(const wxPoint& pt), 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( DocDeclStr(
wxPoint&, operator+=(const wxPoint& pt), wxPoint&, operator+=(const wxPoint& pt),
"Add pt to this object."); "Add pt to this object.", "");
DocDeclStr( DocDeclStr(
wxPoint&, operator-=(const wxPoint& pt), wxPoint&, operator-=(const wxPoint& pt),
"Subtract pt from this object."); "Subtract pt from this object.", "");
// DocDeclStr( // DocDeclStr(
// wxPoint, operator+(const wxSize& sz), // wxPoint, operator+(const wxSize& sz),
// "Add sz to this Point and return the result."); // "Add sz to this Point and return the result.", "");
// DocDeclStr( // DocDeclStr(
// wxPoint, operator-(const wxSize& sz), // wxPoint, operator-(const wxSize& sz),
// "Subtract sz from this Point and return the result"); // "Subtract sz from this Point and return the result", "");
// DocDeclStr( // DocDeclStr(
// wxPoint&, operator+=(const wxSize& sz), // wxPoint&, operator+=(const wxSize& sz),
// "Add sz to this object."); // "Add sz to this object.", "");
// DocDeclStr( // DocDeclStr(
// wxPoint&, operator-=(const wxSize& sz), // wxPoint&, operator-=(const wxSize& sz),
// "Subtract sz from this object."); // "Subtract sz from this object.", "");
%extend { %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) { void Set(long x, long y) {
self->x = x; self->x = x;
self->y = y; self->y = y;
@@ -376,7 +375,7 @@ public:
DocAStr(Get, DocAStr(Get,
"Get() -> (x,y)", "Get() -> (x,y)",
"Return the x and y properties as a tuple. "); "Return the x and y properties as a tuple. ", "");
PyObject* Get() { PyObject* Get() {
bool blocked = wxPyBeginBlockThreads(); bool blocked = wxPyBeginBlockThreads();
PyObject* tup = PyTuple_New(2); PyObject* tup = PyTuple_New(2);
@@ -388,7 +387,7 @@ public:
} }
%pythoncode { %pythoncode {
asTuple = Get asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
def __str__(self): return str(self.Get()) def __str__(self): return str(self.Get())
def __repr__(self): return 'wx.Point'+str(self.Get()) def __repr__(self): return 'wx.Point'+str(self.Get())
def __len__(self): return len(self.Get()) def __len__(self): return len(self.Get())
@@ -408,25 +407,25 @@ public:
DocStr(wxRect, DocStr(wxRect,
"A class for representing and manipulating rectangles. It has x, y, width and "A class for representing and manipulating rectangles. It has x, y,
height properties. In wxPython most palces that expect a wx.Rect can also width and height properties. In wxPython most palces that expect a
accept a (x,y,width,height) tuple."); wx.Rect can also accept a (x,y,width,height) tuple.", "");
class wxRect class wxRect
{ {
public: public:
DocCtorStr( DocCtorStr(
wxRect(int x=0, int y=0, int width=0, int height=0), wxRect(int x=0, int y=0, int width=0, int height=0),
"Create a new Rect object."); "Create a new Rect object.", "");
DocCtorStrName( DocCtorStrName(
wxRect(const wxPoint& topLeft, const wxPoint& bottomRight), 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); RectPP);
DocCtorStrName( DocCtorStrName(
wxRect(const wxPoint& pos, const wxSize& size), 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); RectPS);
~wxRect(); ~wxRect();
@@ -480,61 +479,62 @@ public:
DocDeclStr( DocDeclStr(
wxRect&, Inflate(wxCoord dx, wxCoord dy), wxRect&, Inflate(wxCoord dx, wxCoord dy),
"Increase the rectangle size by dx in x direction and dy in y direction. Both\n" "Increase the rectangle size by dx in x direction and dy in y
"(or one of) parameters may be negative to decrease the rectangle size."); direction. Both or one of) parameters may be negative to decrease the
rectangle size.", "");
DocDeclStr( DocDeclStr(
wxRect&, Deflate(wxCoord dx, wxCoord dy), wxRect&, Deflate(wxCoord dx, wxCoord dy),
"Decrease the rectangle size by dx in x direction and dy in y direction. Both\n" "Decrease the rectangle size by dx in x direction and dy in y
"(or one of) parameters may be negative to increase the rectngle size. This\n" direction. Both or one of) parameters may be negative to increase the
"method is the opposite of Inflate."); rectngle size. This method is the opposite of Inflate.", "");
DocDeclStrName( DocDeclStrName(
void, Offset(wxCoord dx, wxCoord dy), void, Offset(wxCoord dx, wxCoord dy),
"Moves the rectangle by the specified offset. If dx is positive, the rectangle\n" "Moves the rectangle by the specified offset. If dx is positive, the
"is moved to the right, if dy is positive, it is moved to the bottom, otherwise\n" rectangle is moved to the right, if dy is positive, it is moved to the
"it is moved to the left or top respectively.", bottom, otherwise it is moved to the left or top respectively.", "",
OffsetXY); OffsetXY);
DocDeclStr( DocDeclStr(
void, Offset(const wxPoint& pt), void, Offset(const wxPoint& pt),
"Same as OffsetXY but uses dx,dy from Point"); "Same as OffsetXY but uses dx,dy from Point", "");
DocDeclStr( DocDeclStr(
wxRect&, Intersect(const wxRect& rect), wxRect&, Intersect(const wxRect& rect),
"Return the intersectsion of this rectangle and rect."); "Return the intersectsion of this rectangle and rect.", "");
DocDeclStr( DocDeclStr(
wxRect, operator+(const wxRect& rect) const, 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( DocDeclStr(
wxRect&, operator+=(const wxRect& rect), 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( DocDeclStr(
bool, operator==(const wxRect& rect) const, bool, operator==(const wxRect& rect) const,
"Test for equality."); "Test for equality.", "");
DocDeclStr( DocDeclStr(
bool, operator!=(const wxRect& rect) const, 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; %name(InsideXY)bool Inside(int x, int y) const;
bool Inside(const wxPoint& pt) const; bool Inside(const wxPoint& pt) const;
DocDeclStr( DocDeclStr(
bool, Intersects(const wxRect& rect) const, 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; int x, y, width, height;
%extend { %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) { void Set(int x=0, int y=0, int width=0, int height=0) {
self->x = x; self->x = x;
self->y = y; self->y = y;
@@ -544,7 +544,7 @@ public:
DocAStr(Get, DocAStr(Get,
"Get() -> (x,y,width,height)", "Get() -> (x,y,width,height)",
"Return the rectangle properties as a tuple."); "Return the rectangle properties as a tuple.", "");
PyObject* Get() { PyObject* Get() {
bool blocked = wxPyBeginBlockThreads(); bool blocked = wxPyBeginBlockThreads();
PyObject* tup = PyTuple_New(4); PyObject* tup = PyTuple_New(4);
@@ -558,7 +558,7 @@ public:
} }
%pythoncode { %pythoncode {
asTuple = Get asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
def __str__(self): return str(self.Get()) def __str__(self): return str(self.Get())
def __repr__(self): return 'wx.Rect'+str(self.Get()) def __repr__(self): return 'wx.Rect'+str(self.Get())
def __len__(self): return len(self.Get()) def __len__(self): return len(self.Get())
@@ -578,7 +578,7 @@ public:
DocAStr(wxIntersectRect, DocAStr(wxIntersectRect,
"IntersectRect(Rect r1, Rect r2) -> Rect", "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 %{ %inline %{
PyObject* wxIntersectRect(wxRect* r1, wxRect* r2) { PyObject* wxIntersectRect(wxRect* r1, wxRect* r2) {
wxRegion reg1(*r1); wxRegion reg1(*r1);
@@ -606,12 +606,13 @@ DocAStr(wxIntersectRect,
DocStr(wxPoint2D, 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 class wxPoint2D
{ {
public: public:
DocStr(wxPoint2D, "Create a w.Point2D object."); DocStr(wxPoint2D, "Create a w.Point2D object.", "");
wxPoint2D( double x=0.0 , double y=0.0 ); wxPoint2D( double x=0.0 , double y=0.0 );
%name(Point2DCopy) wxPoint2D( const wxPoint2D &pt ); %name(Point2DCopy) wxPoint2D( const wxPoint2D &pt );
%name(Point2DFromPoint) wxPoint2D( const wxPoint &pt ); %name(Point2DFromPoint) wxPoint2D( const wxPoint &pt );
@@ -619,12 +620,12 @@ public:
DocDeclAStr( DocDeclAStr(
void, GetFloor( int *OUTPUT , int *OUTPUT ) const, void, GetFloor( int *OUTPUT , int *OUTPUT ) const,
"GetFloor() -> (x,y)", "GetFloor() -> (x,y)",
"Convert to integer"); "Convert to integer", "");
DocDeclAStr( DocDeclAStr(
void, GetRounded( int *OUTPUT , int *OUTPUT ) const, void, GetRounded( int *OUTPUT , int *OUTPUT ) const,
"GetRounded() -> (x,y)", "GetRounded() -> (x,y)",
"Convert to integer"); "Convert to integer", "");
double GetVectorLength() const; double GetVectorLength() const;
double GetVectorAngle() const ; double GetVectorAngle() const ;
@@ -648,7 +649,7 @@ public:
DocDeclStr( DocDeclStr(
wxPoint2D, operator-(), wxPoint2D, operator-(),
"the reflection of this point"); "the reflection of this point", "");
wxPoint2D& operator+=(const wxPoint2D& pt); wxPoint2D& operator+=(const wxPoint2D& pt);
wxPoint2D& operator-=(const wxPoint2D& pt); wxPoint2D& operator-=(const wxPoint2D& pt);
@@ -658,11 +659,11 @@ public:
DocDeclStr( DocDeclStr(
bool, operator==(const wxPoint2D& pt) const, bool, operator==(const wxPoint2D& pt) const,
"Test for equality"); "Test for equality", "");
DocDeclStr( DocDeclStr(
bool, operator!=(const wxPoint2D& pt) const, bool, operator!=(const wxPoint2D& pt) const,
"Test for inequality"); "Test for inequality", "");
%name(x)double m_x; %name(x)double m_x;
%name(y)double m_y; %name(y)double m_y;
@@ -675,7 +676,7 @@ public:
DocAStr(Get, DocAStr(Get,
"Get() -> (x,y)", "Get() -> (x,y)",
"Return x and y properties as a tuple."); "Return x and y properties as a tuple.", "");
PyObject* Get() { PyObject* Get() {
bool blocked = wxPyBeginBlockThreads(); bool blocked = wxPyBeginBlockThreads();
PyObject* tup = PyTuple_New(2); PyObject* tup = PyTuple_New(2);
@@ -687,7 +688,7 @@ public:
} }
%pythoncode { %pythoncode {
asTuple = Get asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
def __str__(self): return str(self.Get()) def __str__(self): return str(self.Get())
def __repr__(self): return 'wx.Point2D'+str(self.Get()) def __repr__(self): return 'wx.Point2D'+str(self.Get())
def __len__(self): return len(self.Get()) def __len__(self): return len(self.Get())

View File

@@ -52,7 +52,7 @@ class wxImageHistogram /* : public wxImageHistogramBase */
public: public:
wxImageHistogram(); 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, static unsigned long MakeKey(unsigned char r,
unsigned char g, unsigned char g,
unsigned char b); unsigned char b);
@@ -65,9 +65,9 @@ public:
unsigned char startG = 0, unsigned char startG = 0,
unsigned char startB = 0 ) const, unsigned char startB = 0 ) const,
"FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)", "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" "Find first colour that is not used in the image and has higher RGB
"startR, startG, startB. Returns a tuple consisting of a success flag and rgb\n" values than startR, startG, startB. Returns a tuple consisting of a
"values."); success flag and rgb values.", "");
}; };
@@ -129,9 +129,9 @@ public:
bool, FindFirstUnusedColour( byte *OUTPUT, byte *OUTPUT, byte *OUTPUT, bool, FindFirstUnusedColour( byte *OUTPUT, byte *OUTPUT, byte *OUTPUT,
byte startR = 0, byte startG = 0, byte startB = 0 ) const, byte startR = 0, byte startG = 0, byte startB = 0 ) const,
"FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)", "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" "Find first colour that is not used in the image and has higher RGB
"startR, startG, startB. Returns a tuple consisting of a success flag and rgb\n" values than startR, startG, startB. Returns a tuple consisting of a
"values."); success flag and rgb values.", "");
// Set image's mask to the area of 'mask' that has <mr,mg,mb> colour // Set image's mask to the area of 'mask' that has <mr,mg,mb> colour

View File

@@ -639,8 +639,8 @@ public:
DocDeclAStr( DocDeclAStr(
long, HitTest(const wxPoint& point, int& OUTPUT), long, HitTest(const wxPoint& point, int& OUTPUT),
"HitTest(Point point) -> (item, where)", "HitTest(Point point) -> (item, where)",
"Determines which item (if any) is at the specified point,\n" "Determines which item (if any) is at the specified point, giving
"giving details in the second return value (see wxLIST_HITTEST_... flags.)"); details in the second return value (see wxLIST_HITTEST_... flags.)", "");
// Inserts an item, returning the index of the new item if successful, // Inserts an item, returning the index of the new item if successful,
// -1 otherwise. // -1 otherwise.

View File

@@ -196,7 +196,8 @@ public:
DocDeclAStr( DocDeclAStr(
virtual int, HitTest(const wxPoint& pt, long* OUTPUT) const, virtual int, HitTest(const wxPoint& pt, long* OUTPUT) const,
"HitTest(Point pt) -> (tab, where)", "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 // implement some base class functions
virtual wxSize CalcSizeFromPage(const wxSize& sizePage) const; virtual wxSize CalcSizeFromPage(const wxSize& sizePage) const;

View File

@@ -18,20 +18,20 @@
DocStr(wxObject, DocStr(wxObject,
"The base class for most wx objects, although in wxPython not "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 { class wxObject {
public: public:
%extend { %extend {
DocStr(GetClassName, DocStr(GetClassName,
"Returns the class name of the C++ class using wxRTTI."); "Returns the class name of the C++ class using wxRTTI.", "");
wxString GetClassName() { wxString GetClassName() {
return self->GetClassInfo()->GetClassName(); return self->GetClassInfo()->GetClassName();
} }
DocStr(Destroy, 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() { void Destroy() {
delete self; delete self;
} }

View File

@@ -98,7 +98,7 @@ public:
DocDeclAStr( DocDeclAStr(
virtual void, GetScrollPixelsPerUnit(int *OUTPUT, int *OUTPUT) const, virtual void, GetScrollPixelsPerUnit(int *OUTPUT, int *OUTPUT) const,
"GetScrollPixelsPerUnit() -> (xUnit, yUnit)", "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 // Enable/disable Windows scrolling in either direction. If True, wxWindows
// scrolls the canvas and only a bit of the canvas is invalidated; no // scrolls the canvas and only a bit of the canvas is invalidated; no
@@ -111,7 +111,7 @@ public:
DocDeclAStr( DocDeclAStr(
virtual void, GetViewStart(int *OUTPUT, int *OUTPUT) const, virtual void, GetViewStart(int *OUTPUT, int *OUTPUT) const,
"GetViewStart() -> (x,y)", "GetViewStart() -> (x,y)",
"Get the view start"); "Get the view start", "");
// Set the scale factor, used in PrepareDC // Set the scale factor, used in PrepareDC
void SetScale(double xs, double ys); void SetScale(double xs, double ys);
@@ -122,14 +122,14 @@ public:
%nokwargs CalcScrolledPosition; %nokwargs CalcScrolledPosition;
%nokwargs CalcUnscrolledPosition; %nokwargs CalcUnscrolledPosition;
DocStr(CalcScrolledPosition, "Translate between scrolled and unscrolled coordinates."); DocStr(CalcScrolledPosition, "Translate between scrolled and unscrolled coordinates.", "");
wxPoint CalcScrolledPosition(const wxPoint& pt) const; wxPoint CalcScrolledPosition(const wxPoint& pt) const;
DocDeclA( DocDeclA(
void, CalcScrolledPosition(int x, int y, int *OUTPUT, int *OUTPUT) const, void, CalcScrolledPosition(int x, int y, int *OUTPUT, int *OUTPUT) const,
"CalcScrolledPosition(int x, int y) -> (sx, sy)"); "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; wxPoint CalcUnscrolledPosition(const wxPoint& pt) const;
DocDeclA( DocDeclA(
void, CalcUnscrolledPosition(int x, int y, int *OUTPUT, int *OUTPUT) const, void, CalcUnscrolledPosition(int x, int y, int *OUTPUT, int *OUTPUT) const,

View File

@@ -49,13 +49,13 @@ enum
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
DocStr(wxSplitterWindow, DocStr(wxSplitterWindow,
"wx.SplitterWindow manages up to two subwindows or panes, "wx.SplitterWindow manages up to two subwindows or panes, with an
with an optional vertical or horizontal split which can be optional vertical or horizontal split which can be used with the mouse
used with the mouse or programmatically. or programmatically.", "
");
RefDoc(wxSplitterWindow, " Styles
Styles -------
==================== ======================================
wx.SP_3D Draws a 3D effect border and sash. wx.SP_3D Draws a 3D effect border and sash.
wx.SP_3DSASH Draws a 3D effect sash. wx.SP_3DSASH Draws a 3D effect sash.
wx.SP_3DBORDER Synonym for wxSP_BORDER. wx.SP_3DBORDER Synonym for wxSP_BORDER.
@@ -70,39 +70,40 @@ RefDoc(wxSplitterWindow, "
the minimum pane size other than zero. the minimum pane size other than zero.
wx.SP_LIVE_UPDATE Don't draw XOR line but resize the wx.SP_LIVE_UPDATE Don't draw XOR line but resize the
child windows immediately. child windows immediately.
==================== ======================================
Events Events
------
EVT_SPLITTER_SASH_POS_CHANGING ============================== =======================================
The sash position is in the EVT_SPLITTER_SASH_POS_CHANGING The sash position is in the
process of being changed. May be process of being changed. May be
used to modify the position of used to modify the position of
the tracking bar to properly the tracking bar to properly
reflect the position that would reflect the position that would
be set if the drag were to be be set if the drag were to be
completed at this point. completed at this point.
EVT_SPLITTER_SASH_POS_CHANGED EVT_SPLITTER_SASH_POS_CHANGED
The sash position was The sash position was
changed. May be used to modify changed. May be used to modify
the sash position before it is the sash position before it is
set, or to prevent the change set, or to prevent the change
from taking place. from taking place.
EVT_SPLITTER_UNSPLIT The splitter has been just unsplit. EVT_SPLITTER_UNSPLIT The splitter has been just unsplit.
EVT_SPLITTER_DCLICK The sash was double clicked. The EVT_SPLITTER_DCLICK The sash was double clicked. The
default behaviour is to unsplit default behaviour is to unsplit
the window when this happens the window when this happens
(unless the minimum pane size has (unless the minimum pane size has
been set to a value greater than been set to a value greater than
zero.) 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 class wxSplitterWindow: public wxWindow
{ {
public: public:
@@ -111,19 +112,17 @@ public:
%pythonAppend wxSplitterWindow "self._setOORInfo(self)" %pythonAppend wxSplitterWindow "self._setOORInfo(self)"
%pythonAppend wxSplitterWindow() "" %pythonAppend wxSplitterWindow() ""
RefDoc(wxSplitterWindow, ""); // turn it off for the ctors
DocCtorStr( DocCtorStr(
wxSplitterWindow(wxWindow* parent, wxWindowID id=-1, wxSplitterWindow(wxWindow* parent, wxWindowID id=-1,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style=wxSP_3D, long style=wxSP_3D,
const wxString& name = wxPySplitterNameStr), const wxString& name = wxPySplitterNameStr),
"Constructor. Creates and shows a SplitterWindow."); "Constructor. Creates and shows a SplitterWindow.", "");
DocCtorStrName( DocCtorStrName(
wxSplitterWindow(), wxSplitterWindow(),
"Precreate a SplitterWindow for 2-phase creation.", "Precreate a SplitterWindow for 2-phase creation.", "",
PreSplitterWindow); PreSplitterWindow);
@@ -133,37 +132,37 @@ public:
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style=wxSP_3D, long style=wxSP_3D,
const wxString& name = wxPySplitterNameStr), 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( DocDeclStr(
wxWindow *, GetWindow1() const, wxWindow *, GetWindow1() const,
"Gets the only or left/top pane."); "Gets the only or left/top pane.", "");
DocDeclStr( DocDeclStr(
wxWindow *, GetWindow2() const, wxWindow *, GetWindow2() const,
"Gets the right/bottom pane."); "Gets the right/bottom pane.", "");
DocDeclStr( DocDeclStr(
void , SetSplitMode(int mode), void , SetSplitMode(int mode),
"Sets the split mode. The mode can be wx.SPLIT_VERTICAL or "Sets the split mode. The mode can be wx.SPLIT_VERTICAL or
wx.SPLIT_HORIZONTAL. This only sets the internal variable; wx.SPLIT_HORIZONTAL. This only sets the internal variable; does not
does not update the display."); update the display.", "");
DocDeclStr( DocDeclStr(
wxSplitMode , GetSplitMode() const, wxSplitMode , GetSplitMode() const,
"Gets the split mode"); "Gets the split mode", "");
DocDeclStr( DocDeclStr(
void , Initialize(wxWindow *window), void , Initialize(wxWindow *window),
"Initializes the splitter window to have one pane. This "Initializes the splitter window to have one pane. This should be
should be called if you wish to initially view only a single called if you wish to initially view only a single pane in the
pane in the splitter window."); splitter window.", "");
// Associates the given window with window 2, drawing the appropriate sash // 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, virtual bool , SplitVertically(wxWindow *window1,
wxWindow *window2, wxWindow *window2,
int sashPosition = 0), int sashPosition = 0),
"Initializes the left and right panes of the splitter window. "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).
window1 The left pane. Returns True if successful, False otherwise (the window was already
window2 The right pane. split).
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 SplitVertically should be called if you wish to initially view two
already split). panes. It can also be called at any subsequent time, but the
application should check that the window is not currently split using
SplitVertically should be called if you wish to initially IsSplit.
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( DocDeclStr(
virtual bool , SplitHorizontally(wxWindow *window1, virtual bool , SplitHorizontally(wxWindow *window1,
wxWindow *window2, wxWindow *window2,
int sashPosition = 0), int sashPosition = 0),
"Initializes the top and bottom panes of the splitter window. "Initializes the top and bottom panes of the splitter window.",
"
window1 The top pane. :param window1: The top pane.
window2 The bottom pane. :param window2: The bottom pane.
sashPosition The initial position of the sash. If this :param sashPosition: The initial position of the sash. If this
value is positive, it specifies the size value is positive, it specifies the size of the
of the upper pane. If it is negative, it upper pane. If it is negative, it is absolute value
is absolute value gives the size of the gives the size of the lower pane. Finally, specify 0
lower pane. Finally, specify 0 (default) (default) to choose the default position (half of
to choose the default position (half of
the total window height). the total window height).
Returns True if successful, False otherwise (the window was Returns True if successful, False otherwise (the window was already
already split). split).
SplitHorizontally should be called if you wish to initially SplitHorizontally should be called if you wish to initially view two
view two panes. It can also be called at any subsequent panes. It can also be called at any subsequent time, but the
time, but the application should check that the window is application should check that the window is not currently split using
not currently split using IsSplit."); IsSplit.
");
DocDeclStr( DocDeclStr(
bool , Unsplit(wxWindow *toRemove = NULL), bool , Unsplit(wxWindow *toRemove = NULL),
"Unsplits the window. Pass the pane to remove, or None to "Unsplits the window. Pass the pane to remove, or None to remove the
remove the right or bottom pane. Returns True if right or bottom pane. Returns True if successful, False otherwise (the
successful, False otherwise (the window was not split). window was not split).
This function will not actually delete the pane being This function will not actually delete the pane being
removed; it sends EVT_SPLITTER_UNSPLIT which can be handled removed; it sends EVT_SPLITTER_UNSPLIT which can be handled
for the desired behaviour. By default, the pane being for the desired behaviour. By default, the pane being
removed is only hidden."); removed is only hidden.", "");
DocDeclStr( DocDeclStr(
bool , ReplaceWindow(wxWindow *winOld, wxWindow *winNew), bool , ReplaceWindow(wxWindow *winOld, wxWindow *winNew),
"This function replaces one of the windows managed by the "This function replaces one of the windows managed by the
SplitterWindow with another one. It is in general better to SplitterWindow with another one. It is in general better to use it
use it instead of calling Unsplit() and then resplitting the instead of calling Unsplit() and then resplitting the window back
window back because it will provoke much less flicker. It is because it will provoke much less flicker. It is valid to call this
valid to call this function whether the splitter has two function whether the splitter has two windows or only one.
windows or only one.
Both parameters should be non-None and winOld must specify Both parameters should be non-None and winOld must specify one of the
one of the windows managed by the splitter. If the windows managed by the splitter. If the parameters are incorrect or
parameters are incorrect or the window couldn't be replaced, the window couldn't be replaced, False is returned. Otherwise the
False is returned. Otherwise the function will return True, function will return True, but please notice that it will not Destroy
but please notice that it will not Destroy the replaced the replaced window and you may wish to do it yourself.", "");
window and you may wish to do it yourself.");
DocDeclStr( DocDeclStr(
void , UpdateSize(), void , UpdateSize(),
"Causes any pending sizing of the sash and child panes to "Causes any pending sizing of the sash and child panes to take place
take place immediately. immediately.
Such resizing normally takes place in idle time, in order to Such resizing normally takes place in idle time, in order to wait for
wait for layout to be completed. However, this can cause layout to be completed. However, this can cause unacceptable flicker
unacceptable flicker as the panes are resized after the as the panes are resized after the window has been shown. To work
window has been shown. To work around this, you can perform around this, you can perform window layout (for example by sending a
window layout (for example by sending a size event to the size event to the parent window), and then call this function, before
parent window), and then call this function, before showing showing the top-level window.", "");
the top-level window.");
DocDeclStr( DocDeclStr(
bool , IsSplit() const, bool , IsSplit() const,
"Is the window split?"); "Is the window split?", "");
DocDeclStr( DocDeclStr(
void , SetSashSize(int width), void , SetSashSize(int width),
"Sets the sash size"); "Sets the sash size", "");
DocDeclStr( DocDeclStr(
void , SetBorderSize(int width), void , SetBorderSize(int width),
"Sets the border size"); "Sets the border size", "");
DocDeclStr( DocDeclStr(
int , GetSashSize() const, int , GetSashSize() const,
"Gets the sash size"); "Gets the sash size", "");
DocDeclStr( DocDeclStr(
int , GetBorderSize() const, int , GetBorderSize() const,
"Gets the border size"); "Gets the border size", "");
DocDeclStr( DocDeclStr(
void , SetSashPosition(int position, bool redraw = True), void , SetSashPosition(int position, bool redraw = True),
"Sets the sash position, in pixels. If redraw is Ttrue then "Sets the sash position, in pixels. If redraw is Ttrue then the panes
the panes are resized and the sash and border are redrawn."); are resized and the sash and border are redrawn.", "");
DocDeclStr( DocDeclStr(
int , GetSashPosition() const, int , GetSashPosition() const,
"Returns the surrent sash position."); "Returns the surrent sash position.", "");
DocDeclStr( DocDeclStr(
void , SetMinimumPaneSize(int min), void , SetMinimumPaneSize(int min),
"Sets the minimum pane size in pixels. "Sets the minimum pane size in pixels.
The default minimum pane size is zero, which means that The default minimum pane size is zero, which means that either pane
either pane can be reduced to zero by dragging the sash, can be reduced to zero by dragging the sash, thus removing one of the
thus removing one of the panes. To prevent this behaviour (and panes. To prevent this behaviour (and veto out-of-range sash
veto out-of-range sash dragging), set a minimum size, dragging), set a minimum size, for example 20 pixels. If the
for example 20 pixels. If the wx.SP_PERMIT_UNSPLIT style is wx.SP_PERMIT_UNSPLIT style is used when a splitter window is created,
used when a splitter window is created, the window may be the window may be unsplit even if minimum size is non-zero.", "");
unsplit even if minimum size is non-zero.");
DocDeclStr( DocDeclStr(
int , GetMinimumPaneSize() const, int , GetMinimumPaneSize() const,
"Gets the minimum pane size in pixels."); "Gets the minimum pane size in pixels.", "");
DocDeclStr( DocDeclStr(
virtual bool , SashHitTest(int x, int y, int tolerance = 5), 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( DocDeclStr(
virtual void , SizeWindows(), virtual void , SizeWindows(),
"Resizes subwindows"); "Resizes subwindows", "");
void SetNeedUpdating(bool needUpdating); void SetNeedUpdating(bool needUpdating);
@@ -342,7 +337,7 @@ unsplit even if minimum size is non-zero.");
DocStr(wxSplitterEvent, 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 class wxSplitterEvent : public wxNotifyEvent
{ {
@@ -353,37 +348,34 @@ public:
DocDeclStr( DocDeclStr(
void , SetSashPosition(int pos), void , SetSashPosition(int pos),
"This funciton is only meaningful during "This funciton is only meaningful during EVT_SPLITTER_SASH_POS_CHANGING
EVT_SPLITTER_SASH_POS_CHANGING and and EVT_SPLITTER_SASH_POS_CHANGED events. In the case of _CHANGED
EVT_SPLITTER_SASH_POS_CHANGED events. In the case of events, sets the the new sash position. In the case of _CHANGING
_CHANGED events, sets the the new sash position. In the case events, sets the new tracking bar position so visual feedback during
of _CHANGING events, sets the new tracking bar position so dragging will represent that change that will actually take place. Set
visual feedback during dragging will represent that change to -1 from the event handler code to prevent repositioning.", "");
that will actually take place. Set to -1 from the event
handler code to prevent repositioning.");
DocDeclStr( DocDeclStr(
int , GetSashPosition() const, int , GetSashPosition() const,
"Returns the new sash position while in "Returns the new sash position while in EVT_SPLITTER_SASH_POS_CHANGING
EVT_SPLITTER_SASH_POS_CHANGING and and EVT_SPLITTER_SASH_POS_CHANGED events.", "");
EVT_SPLITTER_SASH_POS_CHANGED events.");
DocDeclStr( DocDeclStr(
wxWindow *, GetWindowBeingRemoved() const, wxWindow *, GetWindowBeingRemoved() const,
"Returns a pointer to the window being removed when a "Returns a pointer to the window being removed when a splitter window
splitter window is unsplit."); is unsplit.", "");
DocDeclStr( DocDeclStr(
int , GetX() const, int , GetX() const,
"Returns the x coordinate of the double-click point in a "Returns the x coordinate of the double-click point in a
EVT_SPLITTER_DCLICK event."); EVT_SPLITTER_DCLICK event.", "");
DocDeclStr( DocDeclStr(
int , GetY() const, int , GetY() const,
"Returns the y coordinate of the double-click point in a "Returns the y coordinate of the double-click point in a
EVT_SPLITTER_DCLICK event."); EVT_SPLITTER_DCLICK event.", "");
}; };

View File

@@ -204,7 +204,7 @@ public:
DocDeclAStr( DocDeclAStr(
virtual void, GetSelection(long* OUTPUT, long* OUTPUT) const, virtual void, GetSelection(long* OUTPUT, long* OUTPUT) const,
"GetSelection() -> (from, to)", "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; virtual wxString GetStringSelection() const;
@@ -258,9 +258,8 @@ public:
virtual wxTextCtrlHitTestResult, HitTest(const wxPoint& pt, virtual wxTextCtrlHitTestResult, HitTest(const wxPoint& pt,
long* OUTPUT, long* OUTPUT) const, long* OUTPUT, long* OUTPUT) const,
"HitTest(Point pt) -> (result, row, col)", "HitTest(Point pt) -> (result, row, col)",
"Find the character at position given in pixels.\n" "Find the character at position given in pixels. NB: pt is in device
"NB: pt is in device coords (not adjusted for the client area\n" coords but is not adjusted for the client area origin nor scrolling", "");
"origin nor scrolling)");
// Clipboard operations // Clipboard operations

View File

@@ -685,10 +685,10 @@ public:
DocDeclAStr( DocDeclAStr(
wxTreeItemId, HitTest(const wxPoint& point, int& OUTPUT), wxTreeItemId, HitTest(const wxPoint& point, int& OUTPUT),
"HitTest(Point point) -> (item, where)", "HitTest(Point point) -> (item, where)",
"Determine which item (if any) belongs the given point. The\n" "Determine which item (if any) belongs the given point. The coordinates
"coordinates specified are relative to the client area of tree ctrl\n" specified are relative to the client area of tree ctrl and the where return
"and the where return value is set to a bitmask of wxTREE_HITTEST_xxx\n" value is set to a bitmask of wxTREE_HITTEST_xxx constants.
"constants.\n"); ", "");
%extend { %extend {

File diff suppressed because it is too large Load Diff

View File

@@ -63,13 +63,13 @@ enum wxCalendarDateBorder
DocStr(wxCalendarDateAttr, DocStr(wxCalendarDateAttr,
"A set of customization attributes for a calendar date, which can be "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 class wxCalendarDateAttr
{ {
public: public:
DocStr(wxCalendarDateAttr, DocStr(wxCalendarDateAttr,
"Create a CalendarDateAttr."); "Create a CalendarDateAttr.", "");
wxCalendarDateAttr(const wxColour& colText = wxNullColour, wxCalendarDateAttr(const wxColour& colText = wxNullColour,
const wxColour& colBack = wxNullColour, const wxColour& colBack = wxNullColour,
const wxColour& colBorder = 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 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 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 Window Styles
------------- -------------
@@ -212,8 +212,6 @@ public:
%pythonAppend wxCalendarCtrl "self._setOORInfo(self)" %pythonAppend wxCalendarCtrl "self._setOORInfo(self)"
%pythonAppend wxCalendarCtrl() "" %pythonAppend wxCalendarCtrl() ""
RefDoc(wxCalendarCtrl, ""); // turn it off for the ctors
DocCtorStr( DocCtorStr(
wxCalendarCtrl(wxWindow *parent, wxCalendarCtrl(wxWindow *parent,
wxWindowID id=-1, wxWindowID id=-1,
@@ -222,11 +220,11 @@ public:
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = wxCAL_SHOW_HOLIDAYS | wxWANTS_CHARS, long style = wxCAL_SHOW_HOLIDAYS | wxWANTS_CHARS,
const wxString& name = wxPyCalendarNameStr), const wxString& name = wxPyCalendarNameStr),
"Create and show a calendar control."); "Create and show a calendar control.", "");
DocCtorStrName( DocCtorStrName(
wxCalendarCtrl(), wxCalendarCtrl(),
"Precreate a CalendarCtrl for 2-phase creation.", "Precreate a CalendarCtrl for 2-phase creation.", "",
PreCalendarCtrl); PreCalendarCtrl);
DocDeclStr( DocDeclStr(
@@ -238,40 +236,40 @@ public:
long style = wxCAL_SHOW_HOLIDAYS | wxWANTS_CHARS, long style = wxCAL_SHOW_HOLIDAYS | wxWANTS_CHARS,
const wxString& name = wxPyCalendarNameStr), const wxString& name = wxPyCalendarNameStr),
"Acutally create the GUI portion of the CalendarCtrl for 2-phase "Acutally create the GUI portion of the CalendarCtrl for 2-phase
creation."); creation.", "");
DocDeclStr( DocDeclStr(
void, SetDate(const wxDateTime& date), void, SetDate(const wxDateTime& date),
"Sets the current date."); "Sets the current date.", "");
DocDeclStr( DocDeclStr(
const wxDateTime&, GetDate() const, const wxDateTime&, GetDate() const,
"Gets the currently selected date."); "Gets the currently selected date.", "");
DocDeclStr( DocDeclStr(
bool, SetLowerDateLimit(const wxDateTime& date = wxDefaultDateTime), bool, SetLowerDateLimit(const wxDateTime& date = wxDefaultDateTime),
"set the range in which selection can occur"); "set the range in which selection can occur", "");
DocDeclStr( DocDeclStr(
bool, SetUpperDateLimit(const wxDateTime& date = wxDefaultDateTime), bool, SetUpperDateLimit(const wxDateTime& date = wxDefaultDateTime),
"set the range in which selection can occur"); "set the range in which selection can occur", "");
DocDeclStr( DocDeclStr(
const wxDateTime&, GetLowerDateLimit() const, const wxDateTime&, GetLowerDateLimit() const,
"get the range in which selection can occur"); "get the range in which selection can occur", "");
DocDeclStr( DocDeclStr(
const wxDateTime&, GetUpperDateLimit() const, const wxDateTime&, GetUpperDateLimit() const,
"get the range in which selection can occur"); "get the range in which selection can occur", "");
DocDeclStr( DocDeclStr(
bool, SetDateRange(const wxDateTime& lowerdate = wxDefaultDateTime, bool, SetDateRange(const wxDateTime& lowerdate = wxDefaultDateTime,
const wxDateTime& upperdate = 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), void, EnableYearChange(bool enable = True),
"This function should be used instead of changing CAL_NO_YEAR_CHANGE "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 style bit directly. It allows or disallows the user to change the year
interactively."); interactively.", "");
DocDeclStr( DocDeclStr(
void, EnableMonthChange(bool enable = True), void, EnableMonthChange(bool enable = True),
"This function should be used instead of changing CAL_NO_MONTH_CHANGE "This function should be used instead of changing CAL_NO_MONTH_CHANGE
style bit. It allows or disallows the user to change the month 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 interactively. Note that if the month can not be changed, the year can
not be changed either."); not be changed either.", "");
DocDeclStr( DocDeclStr(
void, EnableHolidayDisplay(bool display = True), void, EnableHolidayDisplay(bool display = True),
"This function should be used instead of changing CAL_SHOW_HOLIDAYS "This function should be used instead of changing CAL_SHOW_HOLIDAYS
style bit directly. It enables or disables the special highlighting of style bit directly. It enables or disables the special highlighting of
the holidays."); the holidays.", "");
DocDeclStr( DocDeclStr(
void, SetHeaderColours(const wxColour& colFg, const wxColour& colBg), 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( DocDeclStr(
wxColour, GetHeaderColourFg() const, 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( DocDeclStr(
wxColour, GetHeaderColourBg() const, 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( DocDeclStr(
void, SetHighlightColours(const wxColour& colFg, const wxColour& colBg), 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( DocDeclStr(
wxColour, GetHighlightColourFg() const, wxColour, GetHighlightColourFg() const,
"Highlight colour is used for the currently selected date."); "Highlight colour is used for the currently selected date.", "");
DocDeclStr( DocDeclStr(
wxColour, GetHighlightColourBg() const, wxColour, GetHighlightColourBg() const,
"Highlight colour is used for the currently selected date."); "Highlight colour is used for the currently selected date.", "");
DocDeclStr( DocDeclStr(
void, SetHolidayColours(const wxColour& colFg, const wxColour& colBg), void, SetHolidayColours(const wxColour& colFg, const wxColour& colBg),
"Holiday colour is used for the holidays (if CAL_SHOW_HOLIDAYS style is "Holiday colour is used for the holidays (if CAL_SHOW_HOLIDAYS style is
used)."); used).", "");
DocDeclStr( DocDeclStr(
wxColour, GetHolidayColourFg() const, wxColour, GetHolidayColourFg() const,
"Holiday colour is used for the holidays (if CAL_SHOW_HOLIDAYS style is "Holiday colour is used for the holidays (if CAL_SHOW_HOLIDAYS style is
used)."); used).", "");
DocDeclStr( DocDeclStr(
wxColour, GetHolidayColourBg() const, wxColour, GetHolidayColourBg() const,
"Holiday colour is used for the holidays (if CAL_SHOW_HOLIDAYS style is "Holiday colour is used for the holidays (if CAL_SHOW_HOLIDAYS style is
used)."); used).", "");
DocDeclStr( DocDeclStr(
wxCalendarDateAttr*, GetAttr(size_t day) const, wxCalendarDateAttr*, GetAttr(size_t day) const,
"Returns the attribute for the given date (should be in the range "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( DocDeclStr(
void, SetAttr(size_t day, wxCalendarDateAttr *attr), void, SetAttr(size_t day, wxCalendarDateAttr *attr),
"Associates the attribute with the specified date (in the range "Associates the attribute with the specified date (in the range
1...31). If the attribute passed is None, the items attribute is 1...31). If the attribute passed is None, the items attribute is
cleared."); cleared.", "");
DocDeclStr( DocDeclStr(
void, SetHoliday(size_t day), 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( DocDeclStr(
void, ResetAttr(size_t day), void, ResetAttr(size_t day),
"Clears any attributes associated with the given day (in the range "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)", "HitTest(Point pos) -> (result, date, weekday)",
"Returns 3-tuple with information about the given position on the "Returns 3-tuple with information about the given position on the
calendar control. The first value of the tuple is a result code and calendar control. The first value of the tuple is a result code and
determines the validity of the remaining two values. The result codes determines the validity of the remaining two values.",
are: "
The result codes are:
=================== ============================================ =================== ============================================
CAL_HITTEST_NOWHERE hit outside of anything CAL_HITTEST_NOWHERE hit outside of anything
@@ -394,11 +393,11 @@ are:
DocDeclStr( DocDeclStr(
wxControl*, GetMonthControl() const, wxControl*, GetMonthControl() const,
"Get the currently shown control for month."); "Get the currently shown control for month.", "");
DocDeclStr( DocDeclStr(
wxControl*, GetYearControl() const, wxControl*, GetYearControl() const,
"Get the currently shown control for year."); "Get the currently shown control for year.", "");
static wxVisualAttributes static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);

View File

@@ -1505,7 +1505,7 @@ public:
bool operator!=( const wxGridCellCoords& other ) const; bool operator!=( const wxGridCellCoords& other ) const;
%extend { %extend {
PyObject* asTuple() { PyObject* Get() {
PyObject* tup = PyTuple_New(2); PyObject* tup = PyTuple_New(2);
PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->GetRow())); PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->GetRow()));
PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(self->GetCol())); PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(self->GetCol()));
@@ -1513,9 +1513,10 @@ public:
} }
} }
%pythoncode { %pythoncode {
def __str__(self): return str(self.asTuple()) asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
def __repr__(self): return 'wxGridCellCoords'+str(self.asTuple()) def __str__(self): return str(self.Get())
def __len__(self): return len(self.asTuple()) def __repr__(self): return 'wxGridCellCoords'+str(self.Get())
def __len__(self): return len(self.Get())
def __getitem__(self, index): return self.asTuple()[index] def __getitem__(self, index): return self.asTuple()[index]
def __setitem__(self, index, val): def __setitem__(self, index, val):
if index == 0: self.SetRow(val) if index == 0: self.SetRow(val)

View File

@@ -858,7 +858,7 @@ public:
DocDeclStr( DocDeclStr(
void, SetTitle(const wxString& title), void, SetTitle(const wxString& title),
""); "", "");
// Sets space between text and window borders. // Sets space between text and window borders.
void SetBorders(int b); void SetBorders(int b);