Commit Graph

135 Commits

Author SHA1 Message Date
Robin Dunn
6bf050289f Virtualize Get/SetProperty 2017-07-21 13:23:09 -07:00
Robin Dunn
2e706e7aba Set wx.RefCounter objects to be owned by C++.
Set the /Transfer/ annotation on the ctors, because the C++ objects will always own themselves and will delete themselves when their C++ refcount drops to zero.
2017-05-23 13:18:53 -07:00
Robin Dunn
efa81882e3 Also allow numpy arrays for sequence conversions to value types 2017-04-17 17:22:50 -07:00
Robin Dunn
0b57a79ab0 Merge branch 'master' into release-prep 2017-04-15 10:30:48 -07:00
Robin Dunn
52facb4d7f Add a GetIM() method to Colour, Point, Size, Rect and other ‘value’ types.
GetIM() returns a replicant of the original object that is immutable, so it can be used as a dictionary key, or etc., but still gives access to the properties by name, which using the Get() method to get a tuple of the values does not do.
2017-04-14 19:19:26 -07:00
Robin Dunn
a4e226c7fd Merge branch 'master' into release-prep 2017-04-13 20:51:26 -07:00
Robin Dunn
708e2487dc Since we know it is a Tuple or List we can use PySequence_Fast_GET_ITEM 2017-04-12 14:32:50 -07:00
Robin Dunn
b01729f4ef Tighten up allowed types in auto sequence conversions
Instead of allowing generic sequences to be convertible to wxPoint, wxSize, and others, explicitly allow only tuples and lists.  This is needed because these types also have methods that make them look like sequences, which meant that you could pass a wxSize where a wxPoint is expected, and so on.

Even worse is nonsense stuff like:

    wx.Point(10,20) == wx.Size(10,20)

evaluating to True.
2017-04-12 13:57:08 -07:00
Robin Dunn
9c87092819 Turn off the generation of the .pi files. The new official standard is .pyi files. 2017-02-13 21:24:54 -08:00
Robin Dunn
9d172ddc8a Update copyright in etgtools 2017-02-13 16:18:47 -08:00
Robin Dunn
c2a63a93f4 Using the NoTypeName annotation solves the wxLongLong_t issue 2017-01-22 19:50:45 -08:00
Robin Dunn
a69601c7c4 Set mustHaveApp for all window classes 2017-01-21 19:07:59 -08:00
Metallicow
067569d785 Trim trailing space etgtools directory 2016-12-05 16:26:04 -06:00
Robin Dunn
efa9c5982a Also check for ‘winid’ in fixTopLevelWindowClass 2016-11-11 19:40:39 -08:00
Robin Dunn
5268ebbc73 Add the rest of the AUI modules and classes 2016-10-27 18:49:41 -07:00
Robin Dunn
981c05d968 Enable arraywWrapperTemplate to also be able to handle arrays of pointers to objects. 2016-10-27 08:38:02 -07:00
Robin Dunn
407714eea3 Fix typo 2016-09-30 13:41:36 -07:00
Robin Dunn
054067ae71 Don't set the id parameter default to wx.ID_ANY if there is a default. 2016-08-02 10:50:07 -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