Commit Graph

67405 Commits

Author SHA1 Message Date
Maarten Bent
3d1a8ef54e Fix 'switch label contains default but no case' warning 2019-11-27 21:25:13 +01:00
Maarten Bent
0c212421f5 Fix building wxDebugReport without wxUSE_OWNER_DRAWN
replace wxCheckListBox with wxListBox.
2019-11-27 21:24:33 +01:00
Maarten Bent
5fefe1df11 wxUSE_ACCESSIBILITY requires wxUSE_OLE 2019-11-27 21:24:33 +01:00
Maarten Bent
3d9ee4852a CMake: fix build with wxUSE_OLE disabled
wxDirDialog falls back to using wxGenericDirDialog, add this file to the
sources.
2019-11-27 21:24:33 +01:00
Maarten Bent
b42de093f6 CMake: disable wxUSE_MIMETYPE when wxUSE_TEXTFILE is disabled 2019-11-27 21:24:32 +01:00
Maarten Bent
51fc85f16a CMake: disable options when ole or ActiveX is not available 2019-11-27 21:24:32 +01:00
Paul Cornett
ae7fcc440c Use C++11 default copy ctor for wxUniCharRef
It's a little simpler, and still suppresses -Wdeprecated-copy warnings
2019-11-25 21:27:09 -08:00
Paul Cornett
4990515aba Avoid clang-cl -Wnon-virtual-dtor warning
Extend the existing workaround to all compilers, not just GCC
2019-11-25 21:16:00 -08:00
Paul Cornett
ef99c2a6db Avoid warning from clang-cl about unrecognized pragma 2019-11-25 21:05:35 -08:00
Paul Cornett
d3ea00b40f Remove an extraneous semicolon 2019-11-25 20:59:21 -08:00
Paul Cornett
173f035bc2 Suppress a GCC -Wcast-function-type warning
We're setting the same event handler GTK uses internally, so the warning isn't helpful
2019-11-25 20:58:16 -08:00
Paul Cornett
d85794e87f Remove some unnecessary GTK preprocessor version checks
The contained code no longer uses anything version-specific
2019-11-25 20:54:51 -08:00
Paul Cornett
0fab5eb071 Allow scrollwheel events when mouse is captured with GTK3, see #18593 2019-11-25 20:52:12 -08:00
Paul Cornett
abaccbc2e2 Fixes for checkbox rendering with GTK3
Size should include border and padding. Margin values seem to be for a checkbox with text
label, so don't include margin. Check mark should be drawn inside border and padding.
2019-11-24 23:31:09 -08:00
Artur Wieczorek
7b86958b25 Fix wxColour::GetAsString called for non-solid colour
Don't return RGB values if colour is not solid
and hence cannot be represented with these values.
Non-solid colour should be reported as an unknown
RGB value, e.g. '??????'.

Closes #18596.
2019-11-24 19:49:59 +01:00
Paul Cornett
fee30940b6 Take wxDC transformations into account when resetting clipping with GTK3
The paint update region is in device coordinates, it needs to be converted to
current logical coordinates to apply correctly. See #18584, #18560
2019-11-23 08:41:31 -08:00
Artur Wieczorek
e763ae96ac Fix wxSystemAppearance::GetName()
'NSApp.effectiveAppearance' is available for macOS
10.14+ not 10.9.

Closes #18595.
2019-11-22 18:41:43 +01:00
Maarten Bent
84edda2ba0 Fix wxSpinCtrl arrow position in RTL layout and High DPI
Just use hardcoded 2px overlap between the text control and the spin
buttons, as it doesn't seem to depend on the DPI and works in both LTR
and RTL modes, unlike the existing code, which claimed to work but
actually didn't.

Closes https://github.com/wxWidgets/wxWidgets/pull/1660
2019-11-22 15:23:07 +01:00
Vadim Zeitlin
a77b8f85bf Merge branch 'display-unique-modes' of https://github.com/MaartenBent/wxWidgets
Return unique modes from wxDisplay::GetModes() and minor improvements to
the display sample.

See https://github.com/wxWidgets/wxWidgets/pull/1659
2019-11-22 15:22:22 +01:00
Vadim Zeitlin
d51a9f9686 Use "wxWidgets application" in the manifests descriptions
We don't use "wxWindows" since many years.
2019-11-22 15:21:15 +01:00
GH Cao
c0c2260944 Add MSW manifests for ARM and ARM64 platforms
Closes https://github.com/wxWidgets/wxWidgets/pull/1657
2019-11-22 15:17:40 +01:00
Vadim Zeitlin
2bc6e50ede Wrap variable initializations after '=' consistently
Replace a few occurrences of

        type var
            = value;

with

        type var =
            value;

which is used much more widely in wx sources for consistency.

Also get rid of a couple of such lines, when it could be done easily.

No real changes.
2019-11-22 00:53:45 +01:00
Maarten Bent
136a43f033 Fix building display sample without wxUSE_DISPLAY 2019-11-21 23:43:04 +01:00
Maarten Bent
c4e54c78fd Select active mode in display sample
Update sample to use SizerFlags.
Set a minimum size to the dialog.
2019-11-21 23:43:02 +01:00
Maarten Bent
44cd0409cd Return unique modes from wxDisplay::GetModes 2019-11-21 23:18:12 +01:00
Stefan Csomor
59d1cb8756 improving autorelease memory handling
life sample was using up memory when running in a tight loop, because the normal event autorelease pool was never reached
2019-11-20 16:23:52 +01:00
Jouk
db2e571c1b Add samples/event/chessboard.cpp to be compiled into the sample on OpenVMS 2019-11-19 08:33:38 +01:00
Jouk
c7be8c9798 merge changes recently made to setup.h.in into setup.h_vms 2019-11-19 08:31:09 +01:00
Vadim Zeitlin
5cf9c735cb Handle taskbar updates not removing notification icons from it
Fix bug with not being able to update wxTaskBarIcon under MSW after a
DPI scale change or [dis]connection of another monitor using different
DPI: this resulted in "TaskbarCreated" message being sent by the system,
which we handled by trying to create the taskbar icon again. However in
this case, recreating it failed, presumably because it still existed, as
modifying the existing icon still worked.

Change the handle of "TaskbarCreated" to try both adding and updating
the icon, as it seems that we can't be sure whether we still have it or
not when we get this message.

Refactor the existing code to specify the operation to perform when
calling the new DoSetIcon(). This actually makes things slightly simpler
for it, as it doesn't need to update m_iconAdded inside it any more.

Closes #18588.
2019-11-18 19:14:38 +01:00
Vadim Zeitlin
64ee3bebb4 Merge branch 'long-string-format'
Fix using "%s" with long (>65KiB) strings when using our own printf()
implementation.

See https://github.com/wxWidgets/wxWidgets/pull/1654
2019-11-18 15:07:00 +01:00
Vadim Zeitlin
29db4e7d83 Remove extraneous parenthesis in --without-libjbig help message
No real changes, this is purely cosmetic.
2019-11-17 23:50:54 +01:00
Vadim Zeitlin
91dc325ca9 Don't disable wxGraphicsContext if Cairo not available under Mac
This breaks Mac build by default and shouldn't be done. In fact, Cairo
should be used only optionally under MSW and Mac, where it's not always
needed, so add a new configure option to request it.
2019-11-17 23:49:21 +01:00
Artur Wieczorek
bdee154c96 Fix build with wxUSE_CAIRO==1 under wxMSW/wxOSX
'bmpSource' is declared later but we can check
original bitmap 'bmp' for 'alpha flag' instead
because 'bmpSource' is just a non-const copy
of 'bmp'.
2019-11-17 22:17:27 +01:00
Artur Wieczorek
3ca6e04d61 Allow building library with Cairo under wxOSX
Enable checking for Cairo in the configure script.
2019-11-17 22:14:38 +01:00
Vadim Zeitlin
8cba51978e Add a check for using wxString::Format() with a very long string
This used to fail until it was fixed in the previous commit.

See #18586.
2019-11-17 18:30:33 +01:00
Vadim Zeitlin
8005c59615 Stop truncating all wxString::Printf() arguments to 65535 chars
There is absolutely no good reason to do it and it resulted in
silently truncating all the string formatted using "%s" to their first
65535 characters when using our wxPrintf() implementation.

Closes #18586.
2019-11-17 18:30:33 +01:00
PB
8cf8c918b9 Correct and update code in new event class example
The code in the example showing how to create a new event class
confusingly used several names for the event type.

Fix this and also prefix the name of the new event type with "EVT_" to
match wxWidgets convention for naming event types.

Also explicitly mark the parts that are not needed if only Bind() is
used for event handling.

Closes https://github.com/wxWidgets/wxWidgets/pull/1586
2019-11-17 17:11:52 +01:00
Igor Korot
68de1b2acf Fix initial value returned from wxRichTextCtrl::IsModified()
A just created control shouldn't be considered modified, so reset its
modified state in Create().

And add a unit test checking that IsModified() really behaves as
expected.

Closes https://github.com/wxWidgets/wxWidgets/pull/1652
2019-11-17 17:04:15 +01:00
Vadim Zeitlin
b690caba84 Replace CPPUNIT_XXX macros with CHECKs
This results in better error messages and also allows the test to
continue executing even if a check fails.
2019-11-16 17:05:06 +01:00
Vadim Zeitlin
505e694347 Get rid of useless VarArgTestCase test fixture
We don't need it any more, just define individual tests as independent
test cases.

This required using some other pointer instead of "this" in one of the
tests, but it doesn't really matter which pointer we use there anyhow.

No real changes.
2019-11-16 17:01:57 +01:00
PB
33da780ecf Add sample code showing how to create a new wxEvent class
In the event sample, show how create and use a new
wxEvent-derived class.

Closes https://github.com/wxWidgets/wxWidgets/pull/1633
2019-11-16 00:56:23 +01:00
Vadim Zeitlin
785ad3b63b Merge branch 'ellipsize-fixes'
Fix ellipsization of strings containing mnemonics and TABs and also
improve handling of trailing spaces (by ignoring them).

See https://github.com/wxWidgets/wxWidgets/pull/1649
2019-11-16 00:51:56 +01:00
Vadim Zeitlin
db846f15ab Disable wxMediaCtrl and wxWebView when OLE is disabled in wxMSW
Avoid errors in wx/msw/chkconf.h during compilation by proactively
turning these options off in configure if wxUSE_OLE==0.
2019-11-15 17:09:43 +01:00
Vadim Zeitlin
37d8b6018c Remove test for ole2.h from configure
This is unnecessary, this header should always be available, so it was a
waste of time to check for it at best and, actually, this broke the
Cygwin build under AppVeyor as configure didn't find the header somehow,
even if compiling the code using it works perfectly well.
2019-11-15 17:06:17 +01:00
Vadim Zeitlin
428d47f534 Merge branch 'wxwebviewieimpl' of https://github.com/MaartenBent/wxWidgets
Actually allow using wxWebVieWIE-specific methods for setting the
emulation level.

Make it possible to include wx/msw/webvieW_ie.h by removing inclusion of
the private headers from it, which was in turn achieved by moving all
the implementation details into a private class.

See https://github.com/wxWidgets/wxWidgets/pull/1647
2019-11-14 17:26:00 +01:00
Vadim Zeitlin
2da8426ed6 Merge branch 'gtk-spin-width-from-text'
Fixes for wxSpinCtrl::GetSizeFromTextSize() and best size in wxGTK.

Closes #18568.

See https://github.com/wxWidgets/wxWidgets/pull/1645
2019-11-14 16:07:05 +01:00
Maarten Bent
e67c814765 Make webview_missing.h a private header 2019-11-14 00:04:56 +01:00
Maarten Bent
9455fe2d21 Move wxWebViewIE specific functions to correct interface class 2019-11-14 00:04:48 +01:00
Maarten Bent
67ace7b243 Move wxWebViewIE classes to private header
Cleanup includes.
2019-11-13 23:56:40 +01:00
Maarten Bent
7e682a09d6 Add wxWebViewIEImpl class for all private wxWebViewIE members and functions
Move wxWebViewIE::Find implementation to wxWebViewIEImpl because it has a lot
of member accesses.
2019-11-13 23:46:13 +01:00