Commit Graph

45 Commits

Author SHA1 Message Date
Scott Talbert
f624b8a251 Fix pickling of wx.RealPoint
Fixes: https://github.com/wxWidgets/Phoenix/issues/2644
2024-11-13 23:19:51 -05:00
Scott Talbert
aa1ef7bd75 Update ETG scripts to support wxWidgets 3.1.6 functionality
Fixes #2136.
2022-05-02 22:33:58 -04:00
Robin Dunn
9f2cc54b48 Update copyright years 2020-03-10 11:41:39 -07:00
Robin Dunn
229870f9c9 Add a __bool__ for every __nonzero__ that doesn't already have one 2018-10-12 23:58:16 -07:00
Robin Dunn
974721b93f wxRealPoint::operator* truncates to int before assigning to the new point
object, which seems dumb. So let's make our own implementation which
preserves the floating point result.

(cherry picked from commit 8f07ca5c28)
2018-09-25 12:44:35 -07:00
Mesalu
9e518d9d0c Undo division arithmetic changes, compilation issues 2018-08-30 11:44:26 -07:00
Mesalu
6a9c4c06ea Change scalar arithmetic to utilize the double-precision overloads. 2018-08-30 09:25:38 -07:00
Robin Dunn
b77c88a280 Merge tag 'wxPython-4.0.2' into wxPy-4.0.x
(cherry picked from commit 4c56c39e52)
2018-06-17 22:04:22 -07:00
Robin Dunn
bae2b7f046 Acquire the GIL in the value type Get() methods 2017-05-09 19:29:14 -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
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
4e38994944 Update copyright in etg 2017-02-13 16:14:55 -08:00
Robin Dunn
5f04f3b082 Add more mustHaveApp flags 2017-01-23 20:41:07 -08:00
Robin Dunn
dc73188688 Set a bunch of mustHaveApp flags 2017-01-21 20:13:46 -08:00
Metallicow
ebc8d0d971 trim trailing space etg directory 2016-11-10 12:08:36 -06:00
Robin Dunn
70729b25f6 Fix != comparison for gdicmn classes. Fixes #15772
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@75873 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-11 03:32:49 +00:00
Robin Dunn
00c2a11514 Add and test wx.IntersectRect()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@75628 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-15 07:28:37 +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
6291fd7cc9 Present the math operators for Point, Size, Rect as if they were methods of the class instead of global functions. This helps disambiguate between Point and Size functions due to how both can be equivalent to 2-element sequences.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@73302 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-29 02:33:14 +00:00
Robin Dunn
b24e226a29 undo typo
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@73255 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-22 08:01:30 +00:00
Robin Dunn
8fd23cc51e Don't need to ignore wxSetCursor any more
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@73254 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-22 08:01:25 +00:00
Robin Dunn
5867c12a93 add missing setters for some wx.Rect properties, and also use the autogenerated properties.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71495 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-19 06:22:28 +00:00
Robin Dunn
3bee9be6f8 Fix typo and do a little cleanup
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71017 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-26 19:21:52 +00:00
Robin Dunn
5490349f39 Regardless of the command-line flag there are a few methods that should always release the GIL, those that are expected to block or to take a long time. Add the annotations now in case I ever decide to change the default again.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@70984 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-23 03:20:08 +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
01c3c738a6 Don't use the method name in the pyArgsString
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@70082 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-22 01:22:25 +00:00
Robin Dunn
06a7072ddf docstring fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69972 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-10 04:36:51 +00:00
Robin Dunn
a87c196def Instead of passing sipIsErr into custom functions made for CppMethodDefs and etc. just check PyErr_Occurred after the function returns and then set sipIsErr there.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69400 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-13 04:58:46 +00:00
Robin Dunn
2822bb2cd7 Add ConvertToTypeCode for wxPointList
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69398 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-12 21:31:09 +00:00
Robin Dunn
70467f7621 Add wxStockGDI, use it to delay the initialization of the global stock GDI objects (wx.BLUE_BRUSH, wx.RED, wx.BLACK_PEN, etc.) until the wx.App object is created.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69150 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-20 04:33:19 +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
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
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
Robin Dunn
04f10c5868 Update Phoenix copyright statements to 2011
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@68978 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-03 01:52:23 +00:00
Robin Dunn
4219e02440 * move wxPen to etg/pen.py
* move wxBrush to etg/brush.py
* move wxBookCtrlBase and wxBookCtrlEvent to etg/bookctrl.py
* move wxBitmapButton to etg/bmpbuttn.py
* move wxArrayString MappedType and add wxArrayInt plus some unittests
* add checking for default values for pos and size parameters in fixWindowClass
* set out parameter flags for wxImageHistogram.FindFirstUnusedColour
* Restore layout constraints classes and related methods
* Create a MappedType for wxClientData
* update used of wxClientData in wx.CommandEvent
* Move wxControlWithItems, wxItemContainer and wxControlWithItems to etg/ctrlsub.py
* enable some Append, Insert and Set overloads in wxControlWithItems
* addGetterSetterProps: don't make setter-only properties
* addGetterSetterProps: ensure that the getter can be called with zero args
* addGetterSetterProps: ensure that the setter can be called with just 1 arg
* restore version checking code
* moved DC classes to other etg files to match interface file names.
* allow both overloads for wx.DC.GetTextExtent and GetMultiLineTextExtent by renaming 1
* add wx.DC.GetPartialTextExtents
* and some other stuff

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@68975 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-03 01:42:42 +00:00
Kevin Ollivier
49fda7ada4 Add automatic class property generation, add support for defines, remove layout constraints from the build as they appear not to be generated with the docs for me, and add wrappers for a bunch of classes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@68963 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-30 15:39:33 +00:00
Robin Dunn
9a7f1269c1 Generate CppMethods as a separate function that is called from the wrapper, instead of embedding it in the wrapper itself. This helps us be less SIP-specific and also be able to do things like 'return' the value and use 'self->' instead of having to use variable names that make less sense.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@66348 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-07 02:58:21 +00:00
Robin Dunn
833fa43787 A bit of refactoring
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@66286 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-28 03:43:30 +00:00
Robin Dunn
96717983ad A boatload of changes and additions, all my Phoenix work for the past few days. Lots of lower level classes are wrapped, wxApp is working up through OnInit, plus there's a good start on some unit tests.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@66272 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-27 08:53:17 +00:00
Robin Dunn
b3ba3f0f70 Add etg scripts for the windowid, tracker, kbdstate, mousestate and event header files.
Other etg weaks and cleanups as needed.

git-svn-id: https://svn.wxwidgets.org/svn/wx/sandbox/trunk/Phoenix@66189 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-18 08:11:31 +00:00
Robin Dunn
b9e74764ec More properties, magic methods and unit tests for gdicmn
git-svn-id: https://svn.wxwidgets.org/svn/wx/sandbox/trunk/Phoenix@66148 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-14 07:57:09 +00:00
Robin Dunn
24c86126d9 Add magic methods to wx.Size and add unit tests for wx.Size. Also a bit of related refactoring and cleanup.
git-svn-id: https://svn.wxwidgets.org/svn/wx/sandbox/trunk/Phoenix@66147 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-14 01:29:52 +00:00
Robin Dunn
4621365d2d Add sequence protocol methods and other goodies to wx.Point
git-svn-id: https://svn.wxwidgets.org/svn/wx/sandbox/trunk/Phoenix@66129 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-12 22:25:18 +00:00
Robin Dunn
2c4ebc512e Add file headers to the rest of the source files, don't bother with cvs keywords, fix some typos, etc.
git-svn-id: https://svn.wxwidgets.org/svn/wx/sandbox/trunk/Phoenix@66114 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-11 00:54:15 +00:00
Robin Dunn
ab37739a9b initial commit of experimental Phoenix code
git-svn-id: https://svn.wxwidgets.org/svn/wx/sandbox/trunk/Phoenix@66111 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-11 00:08:20 +00:00