Commit Graph

68 Commits

Author SHA1 Message Date
Robin Dunn
23fa4115ca More tweaks and fixes from testing the demo modules 2016-08-01 19:53:37 -07:00
Robin Dunn
d8c7b21911 More Clone methods that need to be marked as Factories. 2016-06-22 14:33:05 -07:00
Robin Dunn
24e2b78806 Lots more docs changes.
Add a generator that updates a persistent mapping of item (functions, classes, etc.) to the module names they are a member of.

Remove the NO_MODULE dictionary as we're tracking all the item --> module names now.

Consolidate the 2 removeWxPrefix implementations to just one.

Fix taking out too much space in the class index when removing the :ref: for unknown items, which caused ReST problems.

Use pyName if it is set

When renaming classes we also need to change the className in the method objects

Properly deal with nested classes
2016-05-22 23:39:40 -07:00
Robin Dunn
cb701bd77e Reinstate the size_t MappedType with compile-time bit size checking
Replace the use of size_t in custom code with ulong so SIP doesn't try to use the MappedType there (it only uses pointers for them.)
2016-03-04 21:05:46 -08:00
Robin Dunn
efb3824a17 comment tweaks 2015-03-17 13:22:10 -07:00
Robin Dunn
62a222180b Sip needs to see declarations of TryBefore/TryAfter in all classes where it might be overridden. Otherwise searching for event handlers could fail in some cases. 2015-03-07 14:44:13 -08:00
Robin Dunn
60e42e6627 Fix typo in comment
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@77733 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-19 23:20:12 +00:00
Robin Dunn
336911e737 Allow Destroy to be overridden (virtualized)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@75813 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-06 08:04:35 +00:00
Robin Dunn
ed516efe78 If a name has already been prefixed with 'wx.' then leave it alone.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@74143 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-08 23:34:56 +00:00
Robin Dunn
480bc21a84 Add a tool function that ignores one overloaded method if another overload only differs in constness. Use it in richtextbuffer.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@74137 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-08 23:31:44 +00:00
Robin Dunn
13d5942cbb Add wxArrayPtrWrapperTemplate to wrap the wxArrays using the pointer version of the macro
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@74135 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-08 23:30:44 +00:00
Robin Dunn
5f21090a6f OnEnabled is gone
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@73760 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-03-31 05:05:57 +00:00
Robin Dunn
2981869eca Fix typo
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@73703 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-03-22 01:29:48 +00:00
Robin Dunn
bbe768fcdc Allow fixWindowClass and similar tweakers to turn off the ignored flag for all protected methods.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@73500 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-02-12 05:12:39 +00:00
Robin Dunn
35fd2e16bf Update copyright year
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@73416 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-01-21 02:13:03 +00:00
Robin Dunn
295d3f6442 * Upgrade to the newest six module (1.2.0) and call it six instead of wx2to3.
* Tweak six a little, adding its license text since we'll only be distributing the module, fix the name of the dummy moves module, and add a PY33 constant since the change in memoryview affects our code.

* Update all modules already using the old wx2to3

* Tweak lots of unit tests and other modules to work with Python 3.3 (still a few more that will need some work.)

* Try to deal with memoryview changes in Py3.3, without much luck...

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@73195 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-16 01:15:41 +00:00
Robin Dunn
5b8bc4fe17 Use textfile_open when loading core.pi to avoid encoding errors in Python3
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@73194 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-16 01:15:21 +00:00
Robin Dunn
73d6fb4baa Chop the names at '(' if any when checking if the name is in the core module
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@73077 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-30 22:31:30 +00:00
Robin Dunn
794a237843 Sometimes when we remove the wx prefix we really want to make it be "wx.Name" instead.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@73037 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-27 01:23:36 +00:00
Robin Dunn
8829d26dde Add tweaks for things like output args, ownership transfers, etc.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@72854 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-01 22:51:13 +00:00
Robin Dunn
489cb9eb1a Adapt wxListWrapperTemplate so it can also be used with plain wxList objects, with a fake type specific wrapper class created for them.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@72122 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-17 01:06:01 +00:00
Robin Dunn
f0924fce36 Add wx.Choicebook, wx.Listbook, wx.Toolbook and wx.Treebook
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71813 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-20 17:10:42 +00:00
Robin Dunn
b38aa2c9c3 HasTransparentBackground is protected in some classes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71655 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-06 01:14:48 +00:00
Robin Dunn
787cfb858e Add and use the wxPyThreadBlocker class.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71603 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-30 03:24:34 +00:00
Robin Dunn
b41df0b779 Many, many (many!) changes needed to build and run the Phoenix extension modules with Python 3. Where possible changes were made such that the code works with both Python 2.7 and 3.2 without conditionals. In general the following types of changes were made:
* Changed imports to use either absolute or explicit relative imports.  Implicit relative imports are no longer allowed.

 * Changes to accomodate standard library classes or modues moving to other locations, or being removed entirely.

 * Changes related to print becoming a function, execfile being removed, u'' no longer allowed, and other syntax related issues.

 * Working around C APIs that have changed or simply vanished. (PyInt, PyString, PyBytes, etc.)

 * Dealing with text file objects using strings vs binary file objects using bytes, auto-encoding, and etc.

 * Replacing the use of PyCObject with PyCapsule and dealing with an apparent bug where PyCapsule objects can't be imported from submodules within a package.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71554 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-24 23:28:02 +00:00
Robin Dunn
fffbf482ea check for a parameter named 'winid' too.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71530 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-22 00:17:39 +00:00
Robin Dunn
2bd3ad68b6 Move the ConvertToSubClas code to a tool function so it can be reused elsewhere.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71409 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-10 22:39:18 +00:00
Robin Dunn
4b4b9a1210 Add wxDatePickerCtrl and wxCalendarCtrl to wx.adv
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71165 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-10 03:23:46 +00:00
Robin Dunn
7b1a32fd70 Also give the title param of TLWs a default value if it doesn't have one already.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71106 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-05 19:01:18 +00:00
Robin Dunn
f525cad436 Acquire the GIL for INCREF's where needed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@70901 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-14 20:56:04 +00:00
Robin Dunn
497e10bd43 Add wrappers for the NameStr globals and a few other tweaks to get the code in core.pi to be valid
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@70258 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-04 05:57:19 +00:00
Robin Dunn
a22be70a88 * make clean_sphinx a command function
* Move sphinx specific stuff to the sphinx command out of the etg command
* Make it possible to not run the docs generator
* Don't update some files unless they are newer or changed

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@70221 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-31 09:50:25 +00:00
Robin Dunn
0b4f57082d Use the getDocsGenerator factory and allow command line args to determine which docs generator is instantiated.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@70216 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-31 02:43:39 +00:00
Andrea Gavana
ca4746f13c - Initial commit of the Python scripts to ReSTify the XML documentation.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@70205 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-30 19:17:09 +00:00
Robin Dunn
a47c664ec3 Prevent from generating some syntax errors in the pi_generator, and other generator tweaks
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@70080 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-22 01:20:25 +00:00
Robin Dunn
00361262c2 Allow DoFreeze and DoThaw to be virtualized
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69735 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-11-10 23:52:33 +00:00
Robin Dunn
c71618bb5e Keep the virtual keyword on InformFirstDirection and SetCanFocus
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69669 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-11-05 04:42:07 +00:00
Robin Dunn
c3dd6b1245 Move some common stuff to a fixSizerClass function
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69623 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-31 23:43:22 +00:00
Robin Dunn
e26a3ebaee Move the Point2D_helpers code into a template function so it can be used for other types too.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69535 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-26 04:48:04 +00:00
Robin Dunn
766baba0a6 M0ve the call to addAutoProperties into the doCommonTweaks function, but make it not generate the auto properties if there are already properties in the class or the class explicitly clears the alllowAutoProperties flag, turning it off.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69520 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-24 21:35:29 +00:00
Robin Dunn
470c088a85 * Add the pi generator (for "Python Interface" files used by WingIDE and maybe others.)
* Some improvements in docstring generation
* refactor and shuffle some code around

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69497 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-21 08:09:26 +00:00
Robin Dunn
ee1f7f2548 Rename addGetterSetterProps --> addAutoProperties
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69412 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-13 19:04:40 +00:00
Robin Dunn
94319dcd95 * add changeTypeNames to manipulate all items in a module changing typeA to typeB
* Fix the convertFoo templates to try using an exising object first, and then converting from a sequence.  This saves time and also possible object leaks.
* Enable optionally adding ConvertToTypeCode to wxListWrapperTemplate
* Clean up and simplify  wxArrayWrapperTemplate

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69396 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-12 21:27:43 +00:00
Robin Dunn
bdcf743e89 Some fixes for Array WrapperTemplate and ListWraperTemplate dealign with raising IndexError and using references instead of values in some places
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69333 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-09 07:31:03 +00:00
Robin Dunn
e44dd28fd4 * Replacing method code with .setCppCode is now not SIP-specific. The generated code creates a new function to place the code in, like CppMethodDef does, so the given code can use 'self' and return values instead of using special SIP variables.
* added setCppCode_sip for when SIP-specific stuff is needed.
* Adding the 'const' on to const methods had somehow been forgotten, fix that.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69187 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-25 04:06:16 +00:00
Robin Dunn
91a404fd22 FIx the %Extract used in the wxListWrapper and wxArrayWrapper templates to include the module name
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69136 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-18 04:40:55 +00:00
Robin Dunn
40c6a0d468 * Add generation of docstrings
* addPyMethod can now take a deprecated=True arg 
* Deprecate some python methods
* Deprecate PyEvtHandler

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69126 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-17 19:46:26 +00:00
Kevin Ollivier
fdb9319c3e Adding several new classes, some transfer annotations, and a start on a dataview model (compiles but is still a work in progress).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69098 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-16 05:15:38 +00:00
Robin Dunn
cdc4fa7a6e * Don't generate the property if the getter is static
* Give a WARNING if there is no unittest file for the etg file.  This can be suppressed for the modules that really do not need one.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69090 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-15 16:12:40 +00:00
Robin Dunn
d949d1dad1 * Update version number
* Since they are almost always needed for window classes, move the calls to
  removeVirtuals and addWindowVirtuals into the fixWindowClass and
  fixTopLevelWindowClass functions.

* Add wxWithImages to the interface headers and create wrappers for it and use
  it as a base of wxBoockCtrlBase.

* Add a new wx.deprecated() function that can handle properties and classes in
  addition to callables. It issues a custom warning, wxPyDeprecationWarning
  since the stock DeprecationWarning is filtered out by default in Python 2.7.

* Deprecate PyWindow and similar aliases

* Deprecate wx.Window.SetDimensions


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69050 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-11 00:33:10 +00:00