Commit Graph

17160 Commits

Author SHA1 Message Date
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
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
Maarten Bent
87308746be Resolve -Wsuggest-override warnings. 2017-02-24 23:37:44 +01:00
VZ
bb8a7dc931 Merge pull request #420 from catalinr/fix_charset_comments
Fix a couple of charset-related comments.

No real changes.
2017-02-24 02:26:18 +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
Catalin
882e109ed5 Improved description of charset values under MSW. 2017-02-23 19:20:20 +02: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
Artur Wieczorek
b37884b2cb Optimize PostScript code generated by wxPostScriptDC
PostScript code to register (and re-encode) given font should be emitted only once. Once registered, the font is available in the entire document and there is no need to register it again.
2017-02-20 21:56:34 +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
Vadim Zeitlin
41045df7ea Remove extraneous semicolons after wxDECL_FOR_STRICT_MINGW32()
This generated -Wpedantic warning about the duplicate semicolons when
compiling applications using wxWidgets in pedantic mode with gcc.
2017-02-20 15:55:47 +01:00
Paul Cornett
4821bb4072 Use ctor initializer for non-trivial data members 2017-02-18 10:48:27 -08:00
Paul Cornett
c64a4c3224 make wxExecute() argv parameter fully const-qualified 2017-02-18 10:14:25 -08:00
stahta01
c9fad20b7b Fix checks for wxUSE_WEBVIEW in MSW config checks
This fixes -Wundef warnings about "wxUSE_WEB" being not defined when OLE
support is disabled.
2017-02-17 22:02:17 +01: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
Vadim Zeitlin
e125c3b657 Allow disabling unsafe implicit conversions in wxString
While we have to keep these conversions enabled by default, they are very
dangerous as they can result in silent data loss on any system not using a
locale with UTF-8 encoding, i.e. always under MSW.

Allow mitigating this by defining wxNO_UNSAFE_WXSTRING_CONV when compiling the
application code using the library, which makes these conversions invisible to
the user code, and so can be used without recompiling the library.

Also add wxUSE_UNSAFE_WXSTRING_CONV which can be set to 0 when compiling the
library to disable these conversions globally for all applications using it.

Closes #11830.
2017-02-12 02:29:30 +01:00
Vadim Zeitlin
4cc45797a1 Fix wxUSE_DC_TRANSFORM_MATRIX comment in wx/setup_inc.h
Propagate the change done in 49000defcf to the
generated include/wx/msw/setup0.h file to wx/setup_inc.h, so that this change
won't be lost during future regenerations.
2017-02-12 02:27:22 +01:00
Cătălin Răceanu
05b980aba1 Fix wxMSW wxSpinCtrl appearance: show arrows inside the control
As recommended in the "Spin Controls" MSDN documentation (see
https://msdn.microsoft.com/en-us/library/windows/desktop/dn742439.aspx), put
the spin control inside the associated "buddy" edit control and not near it.

Closes #12297.

Closes https://github.com/wxWidgets/wxWidgets/pull/410
2017-02-11 23:39:31 +01:00
Artur Wieczorek
8e47b3ca97 Support multiline strings in wxPostScriptDC::DrawText() and DrawRotatedText()
'show' operator in PostScript doesn't support printing newlines, so we need to split the string into lines manually and print each line separately.

Closes #17798.
2017-02-11 23:05:37 +01:00
Václav Slavík
288a301b97 Don't corrupt pasted UTF-16 text in wxOSX
Fix breakage introduced by 587067bc68:
pasting text could mangle some Unicode characters if it was in UTF-16.
The code in that commit converted newlines all right, but it also
converted _any_ occurrence of 0x0d to 0x0a, which wasn't very Unicode
friendly.

Fixed by partially reverting the change and adding a dedicated UTF-16
variant of wxMacConvertNewlines13To10() instead.
2017-01-29 13:55:56 +01:00
Artur Wieczorek
cd676d1663 Clean up DrawText() and DrawRotatedText() (wxPostScriptDC)
Move shared code to the separate method DrawAnyText() instead of duplicating it.
2017-01-27 23:02:58 +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
Vadim Zeitlin
26c3094932 Add declarations to fix the build with MinGW 5.3.0 in C++11 mode
Fix the build with -std=c++11 (instead of -std=gnu++11) by providing even
more declarations for the functions wrongly excluded from MinGW headers in
"strict ANSI" mode ourselves.
2017-01-20 21:24:40 +01:00
Tobias Taschner
3206df50c4 Add Microsoft Visual Studio 2017 solution file for building wxMSW
Allow building with VS15 out of the box.

Closes https://github.com/wxWidgets/wxWidgets/pull/353
2017-01-16 17:02:10 +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
5ae9694506 Don't use DLL export declarations on wxDoc{Child,Parent}FrameAny
These classes only have inline methods and so don't need to be exported in the
first place and, moreover, doing it results in link problems where these
templates are instantiated for a type not used inside the library itself.

Closes #17777.
2017-01-15 17:07:43 +01:00
Vadim Zeitlin
0b6319b506 Merge branch 'mingw32-5.3-fixes'
Work around several problems in the latest MinGW (not w64) 5.3 release.
2017-01-15 17:00:14 +01:00
Vadim Zeitlin
6c827301d1 Fix regex library compilation after MinGW _stricmp() fixes
Don't use extern "C" in C code.
2017-01-14 01:16:51 +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
Vadim Zeitlin
22406c7d86 Fix configure build with MinGW 5.3.0
Provide our own wcsnlen() declaration as the function is detected by configure
but is not declared in MinGW headers.

Closes #17762.
2017-01-14 00:07:44 +01:00
Vadim Zeitlin
7c22e4257b Fix build with MinGW 5.3 in debug mode
Due to a bug in MinGW (see https://sourceforge.net/p/mingw/bugs/2322/),
_stricmp() and _strnicmp() declarations are not visible when compiling without
optimizations. Work around this by declaring them ourselves.

See #17762.
2017-01-13 23:52:13 +01:00
Vadim Zeitlin
7477e94b2d Fix build problems due to "missing" newer MSW APIs with MinGW 5.3.0
Set WINVER/_WIN32_WINNT ourselves before letting MinGW to set them to very low
values corresponding to Windows 2000 on its own and preventing our code from
seeing any later additions to the Windows API, such as AttachConsole()
function used in src/msw/app.cpp.

Closes #17677.
2017-01-13 23:40:37 +01:00
Vadim Zeitlin
572db9c0a1 Extract setting WINVER/_WIN32_WINNT to a separate file
This will allow reusing it from other places.
2017-01-13 23:39:52 +01:00
Václav Slavík
587067bc68 Fix pasting multiline text in wxOSX to not use \r
Use wxMacConvertNewlines13To10(), not wxMacConvertNewlines10To13() when
copying content from native pasteboard. Perform this conversion not only
for 8bit text, but for UTF-16 one (which is the one actually used on
modern OS X versions) as well.
2017-01-11 16:48:19 +01:00
Václav Slavík
5d87c70eba Mimic native focus handling in wxStatusBar on macOS
Improve the logic for determining whether the statusbar should be
renderer as for active/key window or a background one.
wxTopLevelWindow::IsActive() is not a sufficient test because it returns
false in some situations when the statusbar need to appear as active
(another floating window) and also didn't account for window-modal
sheets (which don't change statusbar appearance either).
2017-01-11 12:42:42 +01:00
René Kijewski
92f80a18c6 Test for wxUSE_BASE64 in wxRegConfig
When you compile wxWidgets with base64 support disabled, then
wxConfigBase does not declare DoReadBinary and DoWriteBinary.
Add a guard to wxRegConfig, so wxOVERRIDE won't cause an error.
2017-01-10 18:29:33 +01: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
Václav Slavík
e99abe513a Fix wxFULL_REPAINT_ON_RESIZE handling in wxMSW
Fix regression introduced in d4e595adb0
where the wxFULL_REPAINT_ON_RESIZE flag was accidentally ignored in most cases.
2017-01-06 14:33:24 +01:00
Václav Slavík
2b342e8777 Don't leak associations in wxCocoaDataViewControl
Fix ClearColumns() to release associations between m_OutlineView and
native Cocoa control when re-creating the latter. Previously it only
created a new association, but left the old one with no-deleted native
control in the map.

Fixes #17485.
2017-01-05 16:35:04 +01:00
Paul Cornett
5e906d80d8 Fix build with wxNO_RTTI
Since CreateFromUnknownDC() can return NULL anyway, just always define it,
and have it always return NULL with wxNO_RTTI
See #17765
2017-01-01 11:01:49 -08:00
Carl Godkin
0698da3d6b Resize name column in wxFileListCtrl to be as wide as possible
To avoid truncating the names of the files shown in this column, allocate all
the available space to it.

Closes #17757.
2016-12-27 17:23:00 +01:00
Paul Cornett
42b2675806 Fix build error with wxUSE_DRAG_AND_DROP==0 2016-12-22 22:12:45 -08:00
Vadim Zeitlin
d4e595adb0 Add wxWindow::CreateUsingMSWClass() helper function
This method allows to use the Windows class to use for the window being
created instead of always using "wxWindow" or "wxWindowNR".

This can be useful to make it possible to handle some windows specially from
outside the application, e.g. use specific class names for accessibility
purposes as will be done by the next commit.
2016-12-18 22:39:06 +01:00
Vadim Zeitlin
842c441f01 Allow registering only a single window class in wxMSW
Add a flag to let wxApp::GetRegisteredClassName() register just a single Win32
class instead of always registering two of them: the "normal" (but rarely used)
version and the "NR" version used unless wxFULL_REPAINT_ON_RESIZE style is
specified.

With the new RegClass_OnlyNR, only the latter is registered and used.

This is not used yet, but will be soon.
2016-12-18 22:39:04 +01:00
Vadim Zeitlin
097f8a7f14 Refactor code finding the name of the windows class to use in wxMSW
Determine which class name to use in MSWCreate() caller instead of doing it
partly there and partly in MSWCreate() itself, which used to add the "NR"
suffix if necessary -- now it doesn't do this any more and just really created
the window using the given class.

No real changes, just prepare for future enhancements.
2016-12-18 22:39:02 +01:00
Vadim Zeitlin
34f8ae85e0 Simplify wxPersistentTLW code and avoid warnings in it
Use wxPoint and wxSize instead of individual "int" variables to make the code
slightly shorter and avoid clang warnings about "y" and "h" being possibly
uninitialized (which couldn't happen, but the compiler didn't understand it,
at least in non-optimized builds).
2016-12-14 02:21:40 +01:00
Václav Slavík
8b5387bc3d Enable wxUSE_ACCESSIBILITY by default (MSW)
Compile accessibility support on Windows by default now that the generic
wxDataViewCtrl control implements accessible interface. After the
changes from 7dab555f71, accessibility
support is much more lightweight and doesn't interfere with normal win32
behavior, so this change shouldn't affect accessibility-unaware code in
any way.
2016-12-13 18:56:20 +01:00