Commit Graph

2776 Commits

Author SHA1 Message Date
New Pagodi
15ee1ebd12 Improve generating wxSTC code and documentation
Several new features were implemented in gen_iface.py and accompanying '.in' files:
1. Added an option to parse provisional section in Scintilla.iface. When global variable GENERATE_PROVISIONAL_ITEMS is set to 1, methods and values in this section receive corresponding wxSTC items.
2. Deprecated section in Scintilla.iface is not skipped, but parsed and corresponding wxSTC items are created (marked as deprecated in the code and documentation).
3. Added a set 'notMappedSciValues' that can be used to prevent the creation of specific wxSTC values which are intended to be handled manually.
4. For deprecated constants there is generated a code to raise respective warnings during the compilation.

Closes #17671.
2017-03-06 18:38:56 +01:00
Artur Wieczorek
feee67e6a1 Optimize selecting font in generated PostScript code
Emit code to select PostScript font only if it is needed (not at every call to SetFont(), but only if font has been really changed prior to a text drawing operation).
2017-03-04 19:07:04 +01:00
New Pagodi
2278bb0dfa Update wxSTC documentation stuff
1. All stuff to generate documentation is moved from 'gen_iface.py' to a separate module 'gen_docs.py'. It contains several new structures to support maintenance of the documentation:
 categoriesList - A list of the categories and an optional description.
 docsMap - A dictionary that assigns each method to one of the categories.
 docOverrides - A dictionary that can be used to replace the docstring from the iface file.
 docSubstitutions - A dictionary that can be used to replace a few words from the docstring in the iface file.
 extendedDocs - A dictionary that can be used to add extended documentation.
 sinceAnnotations - A dictionary that can be used to add '@since' annotations.

2. Documentation is reformatted and updated:
 - Added a table of contents.
 - Broke the methods into sections.
 - Added docs for previously undocumented methods.
 - Altered docs that were unhelpful or misleading.
 - Added  '@since 3.1.0' notes and '@since 3.1.1' notes.
 - Altered docs which contained references to Scintilla macros or other problematic text.

Closes #17680.
2017-02-28 22:49:43 +01:00
mgimenez
52130e43ab Minor documentation fix
'heightLine" parameter is not applicable to the function being described.

Closes #17806.
2017-02-25 18:52:23 +01:00
New Pagodi
ee609de199 Fix names for some wxSTC constants
Generally, Scintilla constants which names beginning with 'SCXX' are mapped to wxSTC names by by stripping out the 'SC' before prepending 'wxSTC_', for example SCWS_INVISIBLE gets mapped to wxSTC_WS_INVISIBLE. Unfortunately, this common rule of mapping the names is not applied to the (legacy) names beginning with 'SCVS_' and 'SCMOD_'.
For the sake of consistency, also these names should conform to the common naming convention, so gen_iface.py is updated to generate conformant names for all affected prefixes. Legacy names are preserved for backward compatibility but commented deprecated and no longer referenced in the documentation.

Closes #17808.
2017-02-25 18:05:59 +01:00
New Pagodi
98720ee7a4 Fix names of newly introduced wxSTC constants
In 68888ca0a2 there were introduced new wxSTC constants representing Scintilla SCTD_* parameters. Unfortunately, their names don't conform to naming convention of other constants and therefore should be changed. For the sake of consistency, Scintilla SCTD_* names should be mapped to wxSTC_TD_* ones.

Closes #17807.
2017-02-23 23:03:40 +01:00
Artur Wieczorek
71305cff62 Add sanity checks for input string in wxHexToDec()
Check if the length of the string is appropriate and if it contains hexadecimal characters.
Also document this function.

Closes #12814.
2017-02-23 20:49:59 +01:00
Artur Wieczorek
2934f77660 Fix and document wxDecToHex()
1. Integer instead of floating point arithmetic should be used in calculations.
2. Because this function always returns 2 hexadecimal characters, its parameter type should be changed from 'int' to 'unsigned char' to avoid misunderstandings and prevent misuses.

Closes #12612.
2017-02-23 20:48:03 +01:00
New Pagodi
6bf083857f Update wxStyledTextCtrl documentation
Table of contents is added to the documentation for wxSTC and the brief list of methods is broken into categories corresponding to this table. Documentation of several methods is rearranged and edited.

Closes #17803.
2017-02-21 00:32:55 +01:00
Lauri Nurmi
b8192cb8e1 Allow hiding command line arguments from Usage()
Add wxCMD_LINE_HIDDEN wxCmdLineParser flag allowing to hide options and/or
parameters.

A hidden/unlisted argument is processed as usual, but not shown in the output
given by Usage(). A use case for such could be diagnostics switches that
should exist but are not useful to the end user.

Closes https://github.com/wxWidgets/wxWidgets/pull/390
2017-02-20 17:53:04 +01:00
Vadim Zeitlin
d15bbcacd2 Merge branch 'rmv_symbols_3' of https://github.com/catalinr/wxWidgets
Remove obsolete mentions of Windows 9x, Windows CE and OS/2.
2017-02-20 17:46:45 +01:00
New Pagodi
7a88b05882 Fill gaps in documentation of wxSTC events
Completed "Todo" items for wxStyledTextEvent, added a section describing what each of the event types do, documented the event methods.

Closes #17800.
2017-02-19 08:28:07 +01:00
Paul Cornett
c64a4c3224 make wxExecute() argv parameter fully const-qualified 2017-02-18 10:14:25 -08:00
New Pagodi
e68cafaf94 Remove references to never generated wxSTC events
EVT_STC_KEY and EVT_STC_URIDROPPED events are never generated so there is no need to reference them in the code and documentation. For backwards compatibility reasons their declarations are not entirely removed but marked as deprecated.

Closes #17688.
2017-02-16 18:18:13 +01:00
New Pagodi
68888ca0a2 Upgrade Scintilla component to 3.7.2
Closes #17705.

Closes https://github.com/wxWidgets/wxWidgets/pull/409
2017-02-12 19:56:21 +01:00
Scott Talbert
b1fd65a903 Document missing wxGrid methods
Add documentation for the previously undocumented
IsCellEditControlShown(), Deselect{Col,Row,Cell}() and SetAttr().
2017-02-05 02:50:53 +01:00
Robin Dunn
84c1e48957 Merge pull request #344 from RobinD42/master-cherrypick-wxPy
Docs and other updates for wxPython
2017-01-23 20:05:45 -08:00
Robin Dunn
ae288823c9 wxSystemSettings does not inherit from wxObject 2017-01-23 15:05:04 -08:00
Vadim Zeitlin
7da7d85977 Fix typo in wxRect::{x,y} documentation
Use "top-left" instead of "top-level".

Closes #17778.
2017-01-20 14:32:12 +01:00
Manuel Martin
b28dd88994 Improve new wxGLCanvas compatibility with old hardware and code
Combined patch with the following changes:
- Don't add wxGLAttributes::Defaults() when the attributes-list is NULL.
- Add display default attributes used in wx versions before 3.1 when the
  attributes-list is NULL. These attributes are different for each platform.
- Fix wxMSW PixelFormatDescriptor initialization.
- Don't set color buffers when RGBA() is used.
- Fix setting colour sizes in OS X and a few other fixes.
- Make documentation more clear about these subjects.

Closes #17425.
2017-01-16 03:25:49 +01:00
Vadim Zeitlin
da36cbff06 Don't over promise in wxItemContainer documentation
It only accepts std::vector<wxString>, not std::vector<T> for any type
convertible to wxString as both the documentation and the code misleadingly
claimed.
2017-01-14 00:25:35 +01:00
Robin Dunn
9e5dd50914 Revert some changes from incorrect merge that discarded formatting, etc. 2017-01-06 16:43:21 -08:00
Václav Slavík
e71be91ebe Add API to create wxGraphicsContext from win32 HDC
Add wxGraphicsContext::CreateFromNativeHDC() and wxGraphicsRenderer::
CreateContextFromNativeHDC() to allow creation not only from native
renderer object, but also from HDC, which is something universally
supported by win32 implementations.
2017-01-06 14:35:09 +01:00
Tobias Taschner
e0a2e09031 Update year in copyright notices to 2017
Use 2017 instead of 2016, mostly in version info files.

Closes https://github.com/wxWidgets/wxWidgets/pull/379
2017-01-04 11:25:00 +01:00
Cătălin Răceanu
4d20de73bd Describe better which windows are affected by wxWindowDisabler
It affects only windows shown on the screen and not already disabled.

Closes https://github.com/wxWidgets/wxWidgets/pull/366
2016-12-12 23:27:32 +01:00
Václav Slavík
ff1dba498e Add wxDataViewValueAdjuster
Add wxDataViewRenderer:: SetValueAdjuster() and a
wxDataViewValueAdjuster class. This can be used to customize rendering
of values depending on whether they are highlighted (selection) or not,
without having to implement an entire new custom renderer.
2016-12-11 15:20:42 +01:00
Vadim Zeitlin
fcbaf584e3 Document that using 70 as size doesn't work in wxFont ctor
Mention the workaround of using SetPointSize(70) instead.

See #12315.
2016-12-09 14:26:38 +01:00
Mat M
4f0c6c9a3a Amend documentation regarding image/selected image parameters
Make it clear that the "image" argument is only used if it's valid.
2016-12-05 01:30:53 +01:00
Vadim Zeitlin
a5529fc16c Improve documentation of CreateTextSizer() widthMax argument
Also fix the version since which it is available.

See 73f6f622f9
2016-12-01 14:54:08 +01:00
Tobias Schlager
73f6f622f9 Allow specifying the maximum width of static text in dialogs
This patch allows specification of the maximum width of static texts
created with wxDialog::CreateTextSizer.

The patch preserves backwards compatibility by setting the previous
width value as the default argument value.

Closes https://github.com/wxWidgets/wxWidgets/pull/355
2016-12-01 14:06:43 +01:00
VZ
4212202a9a Add support for cache directory to wxStandardPaths::GetUserDir()
This has direct equivalent under macOS and when using XDG.

See #17727.
2016-11-29 19:32:14 +01:00
Vadim Zeitlin
fec4d61377 Merge branch 'syserrormsgstr'
Add thread-safe wxSysErrorMsgStr() to be used instead of wxSysErrorMsg().

Closes https://github.com/wxWidgets/wxWidgets/pull/343
2016-11-27 15:08:31 +01:00
Vadim Zeitlin
9e24755d00 Minor improvements to wxSysErrorMsgStr() documentation
Link to the new function, instead of wxSysErrorMsg(), from the other functions
documentation.

Also mention that this function is new since 3.1.0.
2016-11-27 15:02:53 +01:00
Robin Dunn
016d8f5af4 Fix instances of e.g. and i.e. 2016-11-22 10:49:58 -08:00
Robin Dunn
fcc453848b Add missing GetPageImage 2016-11-22 10:38:39 -08:00
Robin Dunn
0dfe73c21e Add public attributes to wxAuiPaneInfo 2016-11-22 10:37:59 -08:00
Robin Dunn
aaa1a51a59 Additions and fixes for AUI class interfaces 2016-11-22 10:37:15 -08:00
Robin Dunn
90059c0cf9 Add AUI event types 2016-11-22 10:32:13 -08:00
Václav Slavík
7833c65c2a Add wxGraphicsContext::CreateFromUnknownDC()
A convenience helper for writing generic code that may operate on
different kinds of DCs, all supported by wxGraphicsContext, but without
knowing its specific type.
2016-11-22 14:51:39 +01:00
Lauri Nurmi
bdb3f6fea7 Use more descriptive argument names for wxCopyFile() and others
Use more clear "src" and "dest" names for wxConcatFiles, wxCopyFile, and
wxRenameFile functions arguments instead of non-self-descriptive file1, file2,
etc used before.

No real changes.
2016-11-21 18:22:22 +01:00
Lauri Nurmi
343318d73e Add a thread-safe wxSysErrorMsgStr()
Implement wxSysErrorMsg's functionality without using static buffers;
have the caller provide the buffer. When the caller uses the original
API and does not provide a buffer, a static buffer is still used.
wxSysErrorMsgStr() returns a wxString.

Also use strerror_r() instead of strerror() on platforms other than MSW.
2016-11-21 19:15:19 +02:00
Paul Cornett
d24fbc7808 Implement wxLB_NO_SB style
See https://github.com/wxWidgets/wxWidgets/pull/346
2016-11-19 08:36:26 -08:00
Vadim Zeitlin
5ffb8de44d Mention that wxOSX doesn't implement SetLayoutDirection()
At least avoid wasting people time with debugging why it doesn't work.
2016-11-17 02:02:06 +01:00
Lauri Nurmi
9a90816f0b Remove false information about static arrays and wxTRANSLATE
It is not forbidden to have function calls in static initializers, and
such code compiles fine, contrary to claims made by the text. Explain the
real reason why wxTRANSLATE is necessary.
2016-10-31 09:34:41 +01:00
Lauri Nurmi
49137ba1e1 Use a better example for wxTRANSLATE
Since even the text itself acknowledged the example is bad, use another
example that is not bad.
2016-10-31 09:34:41 +01:00
Artur Wieczorek
9b8f46df36 Implement wxDataViewCustomRenderer::GetAccessibleDescription()
This is a default description of the renderer content (for accessibility purposes).
Thanks to this implementation there is not necessary to override GetAccessibleDescription() in the renderers derived from wxDataViewCustomRenderer.
2016-10-30 20:59:51 +01:00
Artur Wieczorek
d9fbde805b Implement wxDataViewRenderer::GetAccessibleDescription() method
The purpose of this method is to provide a textual description of the renderer's content to the class implementing accessibility framework in wxDVC (wxDataViewCtrlAccessible).
It is exposed if wxUSE_ACCESSIBILITY is set to 1.
2016-10-24 21:52:22 +02:00
Robin Dunn
60aa5d8e41 fix code snippet 2016-10-21 20:17:38 -07:00
Robin Dunn
6b335c8ca4 Add missing wxPropertySheetDialog methods and fix a typo. 2016-10-21 20:16:53 -07:00
Robin Dunn
ec0a91464e Add missing ctors and dtor for wxPropertyGridManager 2016-10-21 20:15:50 -07:00