Commit Graph

62088 Commits

Author SHA1 Message Date
Tobias Taschner
89890a3462
Do not define _GNU_SOURCE on apple 2017-01-03 21:33:34 +01:00
Tobias Taschner
4edafd8a8c
Added CMakeLists.txt for minimal sample for testing and demo 2017-01-03 20:56:50 +01:00
Tobias Taschner
8e1a4799ac
Add CMake to Travis-CI 2017-01-03 20:56:50 +01:00
Tobias Taschner
8b6ffa4066
Move travis-ci script to shell file
This will allow easier integration for testing other build systems
2017-01-03 20:56:40 +01:00
Tobias Taschner
b8706dac1c
Add more CMake toolset types to appveyor.bat 2017-01-03 20:56:39 +01:00
Tobias Taschner
9338e68371
Add CMake to Appveyor
Build with “Visual Studio 12 (2013)” 32-bit Release DLLs
Other configurations can later be added in the appveyor.yml
2017-01-03 20:53:12 +01:00
Tobias Taschner
e885de58eb
Add documentation on using CMake with wxWidgets 2017-01-03 20:53:11 +01:00
Tobias Taschner
da2b8ea812
Add CMake build system
Add CMake build system for libraries, tests and samples
update_files.py converts build/files into CMake format.
build/update-setup-h has been modified to update build/cmake/setup.h.in.
2017-01-03 20:53:10 +01:00
Tobias Taschner
ee197fd913
Add missing files to build/files
OSX_SHARED, GTK AUI and WebView
2017-01-03 20:52:45 +01:00
Paul Cornett
0a5f6e07f5 build fix for wxUSE_WINRT==0 2017-01-02 20:23:33 -08:00
Vadim Zeitlin
e777bd9ebd Slightly improve comment wording in MSW wxBitmap creation code
No real changes.
2017-01-03 02:54:36 +01:00
Vadim Zeitlin
092e772848 Use wxAlphaPixelData for default native bitmaps in the unit test
The unit test added in 607b800444 didn't work on
the systems using 32 bpp screens, i.e. almost all of them, because it tried to
use 24 bpp wxNativePixelData with them.

Fix this by using wxAlphaPixelData, which won't work on non 32 bpp systems,
and so is still not ideal, but at least makes the test work on most systems by
default.

See #17666.
2017-01-03 02:51:55 +01:00
Vadim Zeitlin
e3c245c226 Select the bitmap out of wxDC before using it in the unit test
The unit test added in 607b800444 had a bug as
it tried to use the bitmap directly while it was still selected into a
wxMemoryDC, which wasn't guaranteed to work and resulted in an assert.

Fix this by destroying wxMemoryDC earlier.

See #17666.
2017-01-03 02:50:26 +01:00
Vadim Zeitlin
4b4c572d5f Make wxTextCtrl Lines() unit test more robust
Verify that the last logical line was wrapped at least once, not exactly once,
as it could be wrapped more times depending on the font size.
2017-01-03 02:39:57 +01:00
Paul Cornett
c15d804197 Different fix for GetBordersForSizer()
Try to determine the borders the same way GTK+ does it.
This seems to avoid incorrect results before widget is realized.
See #17239, #15872
2017-01-02 08:31:35 -08: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
Eric Jensen
caaa08be07 Disable optimizations in wxQuantize() for MSVC to avoid crash
Compiler seems to generate incorrect code for the dithering code taken from
libjpeg, where it is known to create problems too, so use the same workaround
as libjpeg uses and disable optimizations for this function.

This is unsatisfactory and it would be great to find a way to tweak the code
to avoid the problem, but it's still better than crashing.

See #17764.
2016-12-31 16:56:18 +01: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
Jeff Davidson
6293d7427c Really fix event dispatching in Mac modal event loops
Manually dispatching events to eligible windows is error-prone and
should really be the responsibility of the system. But the old
approach of blocking in nextEventMatchingMask:untilDate:inMode:dequeue
seems to fail because while this blocks, events can't even enter the
queue.

Thus, revert to the old logic, but instead of blocking in
nextEventMatchingMask, first block on processing the input source via
[NSRunLoop runMode:beforeDate].

This resolves the original problem which was also fixed by the commit
4a83fd4696 but doesn't seem to introduce any
regressions, and seems to be a much cleaner fix overall.

See #17737.

Closes https://github.com/wxWidgets/wxWidgets/pull/365
2016-12-27 16:51:24 +01:00
Steve Browne
59d26b0bad Keep disabled status when wxBitmapComboBox is recreated in wxMSW
If a disabled wxBitmapComboBox had to be recreated, it lost its disabled
status and became unexpectedly enabled.

Fix this by explicitly disabling it back in RecreateControl() if necessary.

Closes https://github.com/wxWidgets/wxWidgets/pull/376
2016-12-27 16:40:31 +01:00
Paul Cornett
2a371515df Fix build error with wxUSE_NOTIFICATION_MESSAGE==0 2016-12-22 22:13:34 -08:00
Paul Cornett
42b2675806 Fix build error with wxUSE_DRAG_AND_DROP==0 2016-12-22 22:12:45 -08:00
Paul Cornett
64f1d760c6 Improve handling of wxUSE_FONTMAP==0 case with wxMSW
wxEncodingToCodepage() can be used when wxUSE_FONTMAP==0
Also avoid unreachable code warning with MSVC when using whole program optimization
2016-12-22 22:09:41 -08:00
Paul Cornett
2155eb2fde Fix generic wxWindow when used in toolbar
GtkToolbar uses item minimum size as actual size, so don't use 0 as minimum
for toolbar children.

See #17756, #17704
2016-12-21 10:25:32 -08:00
Vadim Zeitlin
22216b70e7 Fix wxOSX build in 32 bits
Exclude code added in 92dc929b3f from build in
32 bit mode because it fails to compile, apparently due to missing Objective-C
runtime support for per-instance variables in 32 bit runtime.
2016-12-21 00:15:15 +01:00
Vadim Zeitlin
fcde9e1f40 No real changes, just remove hard TABs from macOS wxDVC code
And some trailing spaces too for good measure.
2016-12-21 00:09:59 +01:00
Vadim Zeitlin
7cddac83a9 Merge branch 'custom-msw-class'
Allow using custom Windows class names for our windows and use this to give a
unique class name allowing to identify it in the screen readers to
wxDataViewCtrl.

Closes https://github.com/wxWidgets/wxWidgets/pull/373
2016-12-20 21:51:09 +01:00
Vadim Zeitlin
9ff563b0f8 Use special "wxDataView" Windows class name in wxMSW
This makes it possible for the screen readers to handle wxDataViewCtrl
specially and better than by default.
2016-12-20 21:50:51 +01:00
Jouk
4e1a7fa885 strerror_r is not available on OpenVMS systems 2016-12-20 10:06:32 +01:00
Jouk
d9e7553b06 Supress warning when compiling on an OpenVMS system 2016-12-20 10:04:55 +01:00
Vadim Zeitlin
2c1e6a5435 Fix not-quite-harmless warning in wxAVMediaBackend code
Take the "player" of the right type in -[wxAVView initWithFrame:player:]
method: we need a wxAVPlayer, which has a writable "playerLayer" field that we
set, and not an arbitrary AVPlayer here.

This fixes a warning which could become a problem if anything else than
wxAVPlayer was ever passed as parameter to this function.
2016-12-19 22:34:45 +01:00
Laurent Poujoulat
632997e449 Fix parsing RGBA string in wxColour::FromString()
Using "%20c" in scanf() doesn't work unless we really have exactly 20
characters, so use "%20[^)]" to take up to 20 characters until the closing
parenthesis instead.

Closes #17739.
2016-12-19 19:42:54 +01:00
Vadim Zeitlin
fa83c0eef3 Recognize CP1258 (Windows Vietnamese) encoding in wxMSW
Just handle it in wxEncodingToCodepage() as the other encodings.

Closes #17753.
2016-12-19 19:16:24 +01:00
Scott Furry
068e0f6ec4 Fix build breaking typo in wxDataViewCtrl accessibility code
Dereference the pointer before casting it to unsigned int.
2016-12-19 19:13:53 +01: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
Paul Cornett
30a71c39f5 Reset static widget pointers when widgets are destroyed
See #17751
2016-12-18 12:10:25 -08:00
Paul Cornett
e0bcae1257 Allow initializing wxWidgets multiple times against one instance of GTK+, episode 3
See #17751
2016-12-18 08:11:59 -08:00
Vadim Zeitlin
aac66ea877 Fix wrong value used for wxFONTENCODING_MACROMANIAN in wxMSW
The correct code page for this encoding is 10010, see

https://msdn.microsoft.com/en-us/library/windows/desktop/dd317756.aspx

Closes #17752.
2016-12-18 13:42:14 +01:00
Paul Cornett
d711c5c625 Remove unnecessary module variable 2016-12-17 10:26:01 -08:00
Paul Cornett
4691926791 Dispose of GtkWidgets used by wxSystemSettings 2016-12-17 10:24:29 -08:00
Paul Cornett
fbbc2170a6 Revert db9858a9 and 7d193c60, "Allow initializing wxWidgets multiple times"
See #17751
2016-12-16 23:37:48 -08:00
Paul Cornett
7d193c601d Allow initializing wxWidgets multiple times against one instance of GTK+, part 2
See #17751
2016-12-16 20:16:40 -08:00
Václav Slavík
6e885992f5 Fix rendering of inert wxDVC cells in wxOSX
Disabled appearance should only be used for disabled rows of otherwise
activable or editable renderers, not for inert ones. A typical example
is a bitmap renderer which rendered bitmaps slightly lighter due to its
disabled appearance. With this fix, the behavior is now consistent
across the three implementations.
2016-12-16 19:09:52 +01:00
Martin Srebotnjak
b13a923d0e Update Slovenian translations 2016-12-16 14:10:16 +01:00
Paul Cornett
db9858a93c Allow initializing wxWidgets multiple times against one instance of GTK+
See #17751
2016-12-15 19:37:12 -08:00
Paul Cornett
85302845ab avoid unused variable warning with GTK2 after 61c8a7ca 2016-12-14 09:32:11 -08:00
Tim Kosse
5dc97cc2ca Take alpha into account in wxImage::ResampleBicubic()
Just like in ResampleBox() (see b99ad85b6f),
ResampleBicubic() needs to also weigh pixels by their respective alpha value.

Closes #17748.
2016-12-14 15:07:49 +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