Commit Graph

3085 Commits

Author SHA1 Message Date
Steven Lamerton
00ddcfa18a Add WebKit2 description to docs 2017-04-23 08:39:33 +01:00
Scott Talbert
cbe0a1f049 Add support for WebKit2GTK+ in wxWebView 2017-04-22 20:00:48 +01:00
Vadim Zeitlin
f6d9d7962e Revert wrong fix for wxDateTime timezone conversion to/from local
This reverts commit aaddf6be7f as it broke
handling of dates when local time zone is BST, whose offset not counting DST
is 0, as for UTC, but which still should be handled as local timezone,
see #17220.

With the current wxDateTime handling of time zones, FromTimezone(Local)
doesn't make much sense anyhow, so abandon attempts to try making it work as
to really do it we need to specify the time zone being converted from too, as
explained in the second point of #10445.

See #16585.
2017-04-19 17:07:44 +02:00
Metallicow
8c8d8c4d3a Fix "ont" (instead of "one") typo in wxSTC
Correct "ont" to "one" in several places.
2017-04-18 12:25:46 +02:00
Artur Wieczorek
06963940fb Change current font only if new graphics font is successfully created
If new graphics font couldn't be created successfully there is no need
to reset current font by updating it to wxNullGraphicsFont.

Closes #17790.
2017-04-17 18:57:31 +02:00
Artur Wieczorek
7f9453dfdf Handle unsuccessful creation of graphics font in Direct2D
Apparently, DirectWrite fonts can be created only from TrueType fonts and
therefore only such fonts can be used with Direct2D-based wxGraphicsContext.
When unsuported GDI font is passed to CreateFont() then no graphics font is
created and this unsuccessful attempt is signalled by returning
wxNullGraphicsFont. This null object can be used in e.g. wxGC::SetFont()
to check if font was actually created.

See #17790.
2017-04-17 18:57:02 +02:00
jprotopopov
9b1afaa7a6 Don't crash in wxFFile::Eof() and Error() if file is closed
Assert and return false instead, this is more developer-friendly.

Add unit tests to check that these functions really work as expected when
called on a closed file.

Closes #17828.
2017-04-01 18:43:13 +02:00
Artur Wieczorek
113cec4ab2 Update wxPropertyGrid documentation
Completed documentation for topics marked as uncompleted.
2017-03-27 18:54:16 +02:00
Takeshi Abe
1f20b73c11 Remove wrong MSW notes from wx*ChoiceDialog documentation
Both wxCENTRE flag and dialog position are supported under MSW, so don't say
that they are not.
2017-03-25 03:22:17 +01:00
Vadim Zeitlin
3eda902331 Merge branch 'more-xdg-dirs'
Add possibility to use wxStandardPaths and, hence, wxFileConfig, in
XDG-compliant (but backwards-incompatible) mode.

Closes #17727.
2017-03-15 00:49:11 +01:00
New Pagodi
91a2869b0e Extend FindText() to return end position of matched text in wxSTC
New 5th parameter of FindText() can be used to receive the end position of matched text returned by SCI_FINDTEXT API.

Closes #17305.
Closes https://github.com/wxWidgets/wxWidgets/pull/23
2017-03-13 20:21:41 +01:00
New Pagodi
187c4692c8 Fix regression in mouse click event handling in wxSTC
In EVT_RIGHT_DOWN event handler introduced in 68888ca0a2 we need to propagate event to process it further in EVT_RIGHT_UP handler. This is important especially for wxGTK and wxOSX where EVT_RIGHT_UP is used to generate a context menu event.

Closes #17817.
2017-03-12 17:03:36 +01:00
Vadim Zeitlin
5cf9fcbb1a Add wxStandardPaths::ConfigFileConv enum for clarity and safety
Use an enum instead of type-unsafe "int" for the second parameter of the
recently added wxStandardPaths::MakeConfigFileName().

This also avoids unnatural dependency of wxStandardPaths on
wxCONFIG_USE_SUBDIR constant defined in a higher level wxFileConfig class.

No real changes, but just make things a bit more robust and hopefully more
clear.
2017-03-09 17:53:14 +01:00
Vadim Zeitlin
4bf6ae8d7c Make FileLayout_XXX elements of an enum
Slight improvement to the previous commit: make FileLayout_Classic and
FileLayout_XDG elements of an enum instead of using an untyped "int" for them
which didn't really make any sense because these values are not bit masks but
exclusive choices for the layout.

Also rewrite the checks for them to use "switch" instead of "if" to be warned
by the compiler if we ever add another enum value but forget to update the
code to handle it.

Finally, improve the documentation (add missing "@since") and comments.
2017-03-09 17:23:20 +01:00
Martin Koegler
d56d127d3f Implement XDG file layout 2017-03-08 22:30:21 +01:00
Martin Koegler
8d5d00db9d Implement MakeConfigFileName 2017-03-08 22:29:55 +01:00
New Pagodi
1bcb30f6d7 Add wxStyledTextCtrl::AutoCompGetCurrentText()
Added support for SCI_AUTOCGETCURRENTTEXT API.

Closes #16263.
2017-03-07 19:15:46 +01:00
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