Commit Graph

77 Commits

Author SHA1 Message Date
Robin Dunn
1d61826362 * Include inner classes in a ClassDef's allItems
* Enable finding an overload based on its constness
* Add FunctionDef.renameOverload
* Write nested enums before inner classes and ctors in the sip generator.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@70775 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-02 21:53:00 +00:00
Andrea Gavana
47aa4014fa Phoenix: update the sphinx_generator.py file and correct the Sphinx documentation for missing image header, unwanted sections in wx.TextCtrl and other minor cosmetic adjustments.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@70743 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-02-28 22:18:11 +00:00
Robin Dunn
5078b242f4 Add support for the NoTypeName annotation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@70725 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-02-27 23:52:30 +00:00
Andrea Gavana
946bef565d Fix back the documentation builders for Sphinx.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@70435 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-22 16:28:17 +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
f13a31694d Don't always append output to the ReST files. Classes and Enums should just replace the existing file if there is one.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@70244 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-02 23:40:48 +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
c001fd35f6 FIx a couple issues in the pi generator where it is not generating proper code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@70217 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-31 02:45:21 +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
Robin Dunn
ff99019214 Reorder items in the module before the tweaker stage is run such that enums and other constants are processed before the functions and classes that may be using them, etc.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@70215 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-31 02:42:38 +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
d84dec39b0 Add FunctionDef.hasOverloads()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@70072 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-20 22:33:09 +00:00
Robin Dunn
30c809c9f6 only do the ignore trick if we are ignoring, not unignoring.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@70058 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-19 21:06:43 +00:00
Robin Dunn
fbd4a6fa9e If the primary item in a chain of overloaded functions/methods is set ignored then reorder them so one of the overloads that is not ignored (if any) becomes the primary item.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@70053 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-19 20:21:45 +00:00
Robin Dunn
9912e33123 * Add PyFunctionDef and PyClassDef extractor classes, which can be used for defining pure python functions and classes instead of just including them as blocks of text. This way the meta-data is preserved so it can be used by generators such as the sphinx generator.
* Implement wx.CallAfter and wx.CallLater this way for the initial test cases.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@70010 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-15 02:36:01 +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
a236ea1867 * Use all_raise_py_exception=True in the %Module directive.
* remove pyRaisesException (May want to add it back later with different meaning...)
* Fix use of const for CppMethods
* Make flattenNode optionally not rstrip the string segments

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69906 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-02 01:10:49 +00:00
Robin Dunn
fd0a62c1c4 check for overloads when it's a CppMethod too
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69779 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-11-17 03:51:02 +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
8f8c7a3d43 Add the ability to raise a wx.PyAssertionError when a wxASSERT (or other similar debug macros) fail. To do this support for the /RaisesPyException/ annotation is added, but it defaults to turned on for every function or non-ctor method.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69723 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-11-10 02:43:05 +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
0d968c165c move tool script to bin dir
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69653 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-11-03 04:44:26 +00:00
Robin Dunn
2f8c6383dc Woraround warning for auto property starting with a digit, and give it a new name
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69651 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-11-03 04:39:15 +00:00
Robin Dunn
a69a655a47 Add ability to make properties from PyMethods too if suitable ones are present.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69631 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-11-02 03:36:40 +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
4c3663e283 Add extracting and using of class template info
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69575 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-29 06:04:32 +00:00
Robin Dunn
36e4395f88 * Add CppMethods to overload lists if there is already a matching Method.
* Look at all overloads when adding auto properties

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69539 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-26 05:21:47 +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
7ac7596aaa Add support for nested classes to the extractors and sip_generator
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69414 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-14 01:28:32 +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
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
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
acd9efe43a Skip ArraySize args in the pyArgsString, and deal correctly with inOut args
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69395 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-12 21:23:31 +00:00
Robin Dunn
d0523eba2d don't output an extra newline in the docstring for constructors
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69370 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-11 00:39:25 +00:00
Robin Dunn
8e2363a505 tweak the output of the docstrings a little, and also save a copy of it in case it is needed later
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69336 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-09 07:43:29 +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
60be5b7dfc Make it possible for parameters to be ignored. It works in regular wrappers for args on the end of the list that have default values, and also for things like functions that have their C++ code replaced with .setCppCode
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69301 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-04 07:54:49 +00:00
Robin Dunn
8f9862b23e Add the ability to create class properties from Python methods
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69260 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-01 07:20:19 +00:00
Robin Dunn
8f21965c05 Just cleanup a little excess whitespace
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69235 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-29 20:56:53 +00:00
Robin Dunn
9dbcd04fa7 Use %DefaultDocstringFormat and write the %Docstrings indented inside the classes as expected to make the generated .sip files easier for mere humans to read and understand.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69234 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-29 20:55:57 +00:00
Kevin Ollivier
aaca0c1ffe More work on wxDVC support, including DataViewItem support and GetValue override work, along with a few misc. things, and add a script in etgtools to create new etg files given command line params.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69197 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-25 06:09:42 +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
Kevin Ollivier
1aa87b9104 Another batch of new classes. With this, aside from wxRadioBox since it still has the ambiguous base issue for GetDefaultBorder, all the wxPython Classic unittest suite runs, and impressively, pretty much just reports missing methods (maybe undoc'ed or Classic-only ones) and a couple missing bits like PyAssertionError.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69146 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-18 16:37:38 +00:00
Robin Dunn
25a28bf6cc * Enable the use of the KeepReference annotation
* Use keepReference=True for the dc and buffer args in the buffered DCs to ensure that the target DC and the buffer are not GC's before the buffered DC is.
* Change #defines to output a "const int NAME" instead of an enum.  It looks lots better, and is closer to the truth.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69139 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-18 04:52:28 +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
75b3dafeb8 Clarify a comment
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69130 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-17 19:49:33 +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