Commit Graph

65126 Commits

Author SHA1 Message Date
Vadim Zeitlin
1c68979fb4 Move wxCTZ() documentation to the appropriate place
The documentation comment belongs to interface/wx/math.h, not the header
under include.

Also change the argument type to wxUint32 as the non-gcc version only
works for 32 bit values.
2018-11-05 19:27:53 +01:00
Vadim Zeitlin
b00a24af60 Document wxJoystickEvent event changes
In particular, list the incompatible change in the corresponding section
and explain how to update the existing code.
2018-11-05 19:27:53 +01:00
Vadim Zeitlin
4198107086 Fix wxJoystickEvent documentation after the last commit
Remove left over part of the old sentence.

Also add a link to GetButtonChange() to GetButtonOrdinal()
documentation.
2018-11-05 19:27:53 +01:00
Mick Phillips
291a880d0c Synchronize joystick events between all ports
Generate wxJoystickEvent with the same fields under all platforms by
making the Linux and macOS versions follow MSW convention of using
"1 << N" for the changed button.

Add GetButtonOrdinal() accessor which can be used to retrieve just N.

Closes #18233.
2018-11-05 19:27:36 +01:00
Vadim Zeitlin
cf980cf5e3 Merge branch 'cmake-gstreamer-d2d' of https://github.com/MaartenBent/wxWidgets
CMake improvements: better gstreamer and Direct2D support.

See https://github.com/wxWidgets/wxWidgets/pull/1014
2018-11-05 18:51:10 +01:00
Artur Sochirca
fdee5e7bc9 Replace another occurrence of deprecated wxUSE_GENERICDATAVIEWCTRL
Use wxHAS_GENERIC_DATAVIEWCTRL instead, to complete the changes of
bc92ed9d85, see
https://github.com/wxWidgets/wxWidgets/pull/827

Closes https://github.com/wxWidgets/wxWidgets/pull/1016
2018-11-05 18:44:59 +01:00
Václav Slavík
aaa13cf520 Fix font description for non-. decimal separators
Fix wxNativeFontInfo::ToString and FromString to work correctly under
locales that don't use '.' for decimal separator. The code incorrectly
parsed descriptions using ToCDouble and this '.', but wrote them out
using locale's native separator. Fixed by using FromCDouble for output
too.
2018-11-05 18:30:09 +01:00
Stefan Csomor
b77aa4782d Forcing paint after show on 10.14
layer-backed views do not get a refresh when shown, but wx-user code might depend on the assumption that they do
2018-11-05 14:37:54 +01:00
Maarten Bent
55c50f36dc Disable webview in static build
Prevent link errors of test_gui with webview libraries.
2018-11-04 23:44:06 +01:00
Maarten Bent
de4eecc575 Install additional packages on Travis CI
Install packages for gstreamer, webkit, opengl and libsecret.
First check if the package is available.
2018-11-04 22:00:32 +01:00
Vadim Zeitlin
baf3dda57e Merge branch 'editlbox-fixes'
Cosmetic fixes to wxEditableListBox buttons appearance and some code
modernization.

See https://github.com/wxWidgets/wxWidgets/pull/1012
2018-11-04 17:56:10 +01:00
Vadim Zeitlin
31f5f2dc08 Rename a variable in wxEditableListBox code for clarity
Rename "centered" into "flagsCentered" to make it more obvious that this
variable contains wxSizerFlags.
2018-11-04 17:54:52 +01:00
Maarten Bent
9554cb49d8 Fix build when enabling wxD2D_DEVICE_CONTEXT_SUPPORTED
Add missing GUID and function for dynamic linking.
2018-11-04 16:49:14 +01:00
Maarten Bent
e1e5169e4b CMake: enable Direct2D graphics context by default
Disable it when the d2d1.h header is not found.
When using MSVC, match the behaviour of setup.h.
2018-11-04 16:49:14 +01:00
Maarten Bent
5c4741430a CMake: move find_package for lzma and secretstore to init.cmake 2018-11-04 16:35:58 +01:00
Maarten Bent
e1b725d5be CMake: mark package variables as advanced
Silence pkg_check_modules message.
2018-11-04 16:35:58 +01:00
Maarten Bent
d293f94d95 CMake: improve finding gstreamer
Support checking for multiple versions, first check gstreamer-1.0, then gstreamer-0.10.
Add support for finding gstreamer-player.
Specify the required components, add the include directories and link with the libraries of the found components.
Set the setup variables wxUSE_GSTREAMER and wxUSE_GSTREAMER_PLAYER.
2018-11-04 16:35:57 +01:00
Vadim Zeitlin
84d3ee10cc Merge branch 'simplify-imagelist'
Merge Mac-specific and generic wxImageList versions and modernize the
code.

See https://github.com/wxWidgets/wxWidgets/pull/1001
2018-11-04 14:15:16 +01:00
Daniel Kulp
26f0e816ca Send wxEVT_AUINOTEBOOK_PAGE_CHANGED after changing the page
For consistency with the other similar events and because it is more
useful for the code handling it, send this event when the new page is
already shown instead of doing it before showing it.

Closes https://github.com/wxWidgets/wxWidgets/pull/1007
2018-11-03 22:56:15 +01:00
Blake Eryx
65827a0572 Remove unnecessary c_str() calls from the samples
Pass wxStrings directly to wxString::Format("%s") and similar
pseudo-vararg functions, there is no need for c_str() there since
wxWidgets 2.9.

Closes https://github.com/wxWidgets/wxWidgets/pull/1009
2018-11-03 22:52:57 +01:00
Vadim Zeitlin
f24892127d Remove unnecessary wxUSE_TOOLTIPS check in wxEditableListBox code
SetToolTip() is defined (as doing nothing) even if wxUSE_TOOLTIPS==0, so
just call it directly as this allows to save on both the preprocessor
check and the check for the button validity.
2018-11-03 22:45:37 +01:00
Vadim Zeitlin
397b5ff01e Use wxSizerFlags-based API in wxEditableListBox
No real changes, just make the code more clear by using wxSizerFlags.
2018-11-03 22:43:10 +01:00
Vadim Zeitlin
18e2b58e5b Remove unnecessary border around wxEditableListBox buttons
This border was added under MSW for some reason, but doesn't seem to be
necessary (any longer?).

Closes #18265.
2018-11-03 22:39:57 +01:00
Artur Wieczorek
63c602c3d2 Explicitly declare iterators in the function templates 2018-11-02 12:10:22 +01:00
Paul Cornett
dfb48b47f5 Add version checks for gtk_widget_get_scale_factor() 2018-11-01 11:06:53 -07:00
Paul Cornett
ed442cd574 Draw background before drawing toolbar bitmap.
The background may not have been painted for us.
2018-11-01 11:05:41 -07:00
Artur Wieczorek
abf9678337 Revert changes in Editor Config file made by mistake in 5fbe3cab 2018-11-01 18:37:34 +01:00
Artur Wieczorek
161bb592ce Use wxVector<int> instead of wxArrayInt 2018-11-01 18:22:22 +01:00
Artur Wieczorek
e7357eafa2 Declare array explicitly as a wxVector instead of using wxArrayPGProperty alias 2018-11-01 18:19:56 +01:00
Artur Wieczorek
5fbe3cab76 Don't reset wxPGProperty editor if focus is switched between its components
As long as focus is being switched only between subcontrols of the active editor the state of the edited wxPGProperty remains unchanged and there is no need to explicitly reset the editor.
Unwanted editor resets could happen if such internal focus changes would be captured in EVT_IDLE handler.

Closes #18162.
2018-11-01 18:11:58 +01:00
Paul Cornett
dc0cf732a2 Provide scale factor to wxGtkStyleContext where it might matter. 2018-11-01 09:58:27 -07:00
Paul Cornett
e13a2cfd03 Make wxGtkStyleContext ctor explicit, just to be safe 2018-11-01 08:50:59 -07:00
Paul Cornett
5ff0d3a458 Improve wxRendererGTK drawing with HiDPI 2018-11-01 00:11:31 -07:00
Vadim Zeitlin
4405176bb9 Return correct scale factor for not yet realized windows in wxGTK
wxWindow::GetContentScaleFactor() always returned 1 before the window
was shown in wxGTK, which was rather annoying as typically icons are
initialized on application startup, i.e. before showing the windows, and
so the wrong scale factor was silently used for them.
2018-10-31 20:24:06 -07:00
Vadim Zeitlin
8e817f8a0e Don't send events from wxTextCtrl::ChangeValue("") in wxGTK
ChangeValue() must not send events, but did in wxGTK when changing the
contents of a wxTextCtrl to be empty when it had been non-empty before.

Closes #18264.
2018-11-01 02:04:01 +01:00
Vadim Zeitlin
5ee0edde99 Merge branch 'propagate-inform-first-dir'
Fix some layouts involving wxWrapSizer by correctly propagating
InformFirstDirection() call to the nested sizers that need it.

See https://github.com/wxWidgets/wxWidgets/pull/988
2018-11-01 00:13:18 +01:00
Vadim Zeitlin
c01328c2da Don't crash due to accessing invalid bitmaps in wxAUI code
Neither GetWidth() nor GetScaledWidth() (nor the corresponding
height-related methods) can be called if the bitmap is invalid and the
resulting assert led to a crash when it happened in wxAuiToolBarArt
drawing code, as it was triggered on each redraw.

Just use bitmap size of (0, 0) if we're not going to draw it anyhow.

Closes #18263.
2018-10-31 23:43:17 +01:00
Vadim Zeitlin
a316942c18 Don't use "extern" when initializing wxCurrentPopupWindow
Avoid (harmless) warning about the variable being initialized and
declared "extern" added by 56c4191168.
2018-10-31 23:26:02 +01:00
Blake Eryx
c1a2d2c967 Show using dynamic splash screen contents in the sample
Demonstrate how dynamic information can be shown in the splash screen
overlaying the static bitmap.

Closes https://github.com/wxWidgets/wxWidgets/pull/958
2018-10-31 23:23:31 +01:00
Evileye
28f7e6130d Fix wxDateTime::ParseFormat() when matching TZ offset and in DST
Don't skip MakeFromTimeZone() for the current time zone, this is still
necessary.

Fixes a failure in the unit tests when running during a DST period with
TZ=Europe/London, for example.

Closes https://github.com/wxWidgets/wxWidgets/pull/966
2018-10-31 23:16:03 +01:00
Vadim Zeitlin
83a7b49954 Always store wxBitmap objects in wxGenericImageList
There doesn't seem to be any point in storing pointers to wxBitmap or
wxIcon and storing the objects directly allows to avoid an extra heap
allocation and all the code dealing with freeing memory when replacing
or removing images from the list, making things much simpler.

Also use wxVector<> for storage instead of the obsolete and ugly
wxObjectList.

There shouldn't be any user-visible changes.
2018-10-31 15:35:30 +01:00
Vadim Zeitlin
3b5441f59e Deprecate wxGenericImageList::GetBitmapPtr()
This function was in effect deprecated since 2.5.5 (!) and it's not
finally time to do it formally and to stop using it in wxWidgets own
code.
2018-10-31 15:35:30 +01:00
Vadim Zeitlin
61e4534bd2 Deprecate useless wxGenericImageList::Create() overload
This overload doesn't do anything and doesn't exist in the MSW version,
so deprecate it.
2018-10-31 15:32:23 +01:00
Tobias Taschner
394b26bc36 Fix wxGetDiskSpace() documentation
The function is actually declared in utils.h and not in filefn.h
2018-10-31 10:26:11 +01:00
Paul Cornett
8c99df373a Fix handling of scaled bitmaps in wxToolBar with GTK+3
We have to draw them ourselves to get the size right.
See #18225
2018-10-30 22:59:07 -07:00
Vadim Zeitlin
8a76b8072a Merge branch 'text-event-tests'
Improve and extend wxTextCtrl unit tests.

See https://github.com/wxWidgets/wxWidgets/pull/996
2018-10-31 02:27:16 +01:00
Václav Slavík
e5beb4e93f Improve wxDataViewMainWindow::RefreshRow speed
RefreshRow() is called very frequently, and in particular after every
ItemChanged notification. Calling GetEndOfLastCol() in it repeatedly is
extremely inefficient in presence of auto-sizing columns, and doesn't
make much sense anyway - controls with significant space unoccupied by
columns are rare, and rendering of such unused space is efficient (just
background erase). It is therefore more performant to simply refresh
the entire row instead of repeatedly and expensively calculating the
smallest rectangle that needs repainting.

Fixes previously wrong calculation of the refreshed rectangle in
RefreshRows() in the process.

Fixes major performance regression introduced in
77c7c80696.

Closes https://github.com/wxWidgets/wxWidgets/pull/970
2018-10-30 23:50:40 +01:00
Silent
6fff1c37b5 Avoid using mismatched translations for wxWizard buttons
Cache labels for "Next>" or "Finish" button in wxWizard so that their
translations stay consistent throughout wizard's lifetime: previously,
this button could use a label in a different language if the currently
used translations have changed since the wizard creation, as this label
was recreated on every page change, unlike the other labels which were
only translated once in the very beginning.

Closes https://github.com/wxWidgets/wxWidgets/pull/1000
2018-10-30 23:45:12 +01:00
Vadim Zeitlin
28e9ea6bd6 Simplify wxGenericImageList::Add() logic
Also improve the readability of the assert condition in it, this should
hopefully make it simpler to understand.

No real changes.
2018-10-30 22:40:48 +01:00
Vadim Zeitlin
26c6db4b90 Replace wxGenericImageList::m_{width,height} with m_size
Using a single wxSize variable is slightly simpler and shorter than
using 2 ints.

No real changes.
2018-10-30 22:01:32 +01:00