Commit Graph

65249 Commits

Author SHA1 Message Date
Paul Cornett
de57bcd1bc Fix drawing background before drawing toolbar bitmap
The Cairo origin is already set up for the widget
2018-11-16 23:25:31 -08:00
Paul Cornett
0bcd7f9b51 Fix sizing of generic windows in wxToolBar with GTK+3.
Broken by ee0b07fc31. See #18269
2018-11-16 23:20:33 -08:00
Artur Wieczorek
1ba0f055e2 Use dedicated function to get screen position of wxComboCtrl popup
Closes #13462.
2018-11-16 18:51:37 +01:00
Artur Wieczorek
ea7f86d9f7 Use wxVector<int> instead of wxArrayInt 2018-11-14 22:37:16 +01:00
Artur Wieczorek
c05fac0ade Don't re-enter wxComboCtrlBase::HidePopup
Under wxMSW this method is re-entered due to triggering EVT_ACTIVATE when EVT_LEFT_UP is being already handled.
We need to prevent this to avoid generating spurious EVT_TEXT events and raising errors on calling SetFocus().

Closes #18260.
2018-11-14 21:30:35 +01:00
Artur Wieczorek
ae3e581bb9 Don't set wxComboCtrl value twice
The value is set once in wxComboPopup::Dismiss() so there is no need to set it again and generate spurious EVT_TEXT event.

See #18260.
2018-11-14 21:25:52 +01:00
Stefan Csomor
edecb26899 adapting xcodeproj to generic imaglist.cpp 2018-11-14 12:06:36 +01:00
Vadim Zeitlin
8fb1152eee Fix error about duplicate PNG image handler in the drawing sample
Add the handler earlier, as creating the handler main frame uses
wxArtProvider::GetBitmap() which can add the PNG handler on some
platforms (e.g. macOS, when using wxTangoArtProvider), so calling
wxImage::AddHandler() again after creating the frame could result in a
debug error message about adding the same handler twice.
2018-11-13 16:11:24 +01:00
Artur Wieczorek
8793e7fc11 Reduce the scope of variables using to index the loops 2018-11-12 23:54:11 +01:00
Artur Wieczorek
dfc5b35b04 Don't make a local copy of the entire array
Use reference to the member array instead.
2018-11-12 23:42:32 +01:00
Artur Wieczorek
3e50405b5f Update index of selected item of wxOwnerDrawnComboBox popup on inserting new item
We have to update index of the currently selected item if value of inserted item is the same as the value of currently selected item (we take lower index in this case) or if new item is inserted before the current selection (current selection index has to be increased in this case).

Closes #14153.
2018-11-12 23:18:09 +01:00
Vadim Zeitlin
65ac801c40 Make separator click sensitivity in wxHeaderCtrl DPI-dependent
Sensitivity should be greater for high DPI displays to allow the user
clicking as far from the separator in this case as with standard DPI.

Also define a named constant for this value instead of using it
directly.

See https://github.com/wxWidgets/wxWidgets/pull/972
2018-11-12 00:10:56 +01:00
John Gehrig
b07305234c Fix dragging beyond the rightmost column in generic wxHeaderCtrl
Dragging a column header in a wxHeaderCtrl and dropping it past the
rightmost column resulted in a crash due to accessing a column with
invalid index.

Fix this and correctly move the column to the last position when this
happens instead.

This bug notably affected dragging columns in wxGrid.

Closes https://github.com/wxWidgets/wxWidgets/pull/972
2018-11-12 00:08:13 +01:00
Vadim Zeitlin
6e3f818da1 Fix formatting of change log entries for consistency
Capitalize the entries, keep them under 80 columns and terminate with
full stop.

Also fix a typo.

No real changes.
2018-11-11 19:46:58 +01:00
Andy Robinson
fe4f35b0a3 Make wxFrame::EnableFullScreenView() work under macOS 10.11+
We must explicitly turn on NSWindowCollectionBehaviorFullScreenAuxiliary
flag to prevent the window from becoming shown in full screen.

Closes #18168.
2018-11-11 19:46:58 +01:00
Artur Wieczorek
4e2d26b22e Keep wxPGProperty editor focused while refreshing the property
Active property's editor should remain focused after refreshing the property.
2018-11-11 11:21:52 +01:00
Artur Wieczorek
d27a1b2770 Create standard dialog buttons with dedicated function
Use CreateStdDialogButtonSizer() function instead of constructing wxStdDialogButtonSizer manually.
2018-11-11 11:15:12 +01:00
jbbbms
87195cf3ea Put wxDECLARE_EVENT_TABLE at the end of wxTextCtrl declaration
This fixes the access specifier effectively used for the members
following these macros, as it's changed to "public" inside them, meaning
that e.g. m_privateContextMenu was actually public even though it was
ostensibly declared in the private section and the intention was for it
to be private.

Closes #16038.
2018-11-10 23:37:33 +01:00
Vadim Zeitlin
c252ececda Consistently set m_enableOffset for wxMacCoreGraphicsContext
Previously it was set to true if content scale factor was less or equal
to 1 in some places or if it was strictly less than 2 in some others.

Fix this by adding a new helper SetEnableOffsetFromScaleFactor()
function and using it everywhere to consistently only enable offset for
non-high DPI displays in all cases.
2018-11-10 23:29:54 +01:00
Vadim Zeitlin
5b891e9ffc Merge branch 'dvc-getitemrect'
Make wxDataViewCtrl::GetIremRect() work under all platforms and improve
tests, documentation and fix a couple of other problems in the same code
area.

See https://github.com/wxWidgets/wxWidgets/pull/1015
2018-11-10 22:38:05 +01:00
Artur Wieczorek
c86f795914 Move shared wxVector utilities to one place 2018-11-10 22:27:57 +01:00
Artur Wieczorek
43f7e35c52 Explicitly return Boolean value as declared 2018-11-10 20:56:24 +01:00
Artur Wieczorek
e2115d0d6f Remove unneeded calls to c_str() 2018-11-10 20:44:54 +01:00
Artur Wieczorek
322d6874c3 Use wxVector<> instead of wxArrayPGProperty 2018-11-10 20:43:58 +01:00
Artur Wieczorek
c606a7fc9f Store format as wxString
Using wxString here is simpler and not misleading.
2018-11-10 20:41:00 +01:00
Artur Wieczorek
7911d50335 Use locale-specific date format
There is no need to construct format string manually.
2018-11-10 20:39:57 +01:00
Artur Wieczorek
f3b6e6d3b5 Fix date format specification in wxDatePickerCtrlGeneric with wxUSE_INTL=0
Conversion specification for preferred date representation is "%x", not "x".
2018-11-10 14:59:27 +01:00
Artur Wieczorek
41898c8dc4 Compilation fix for wxUSE_INTL=0 build 2018-11-10 14:49:52 +01:00
Vadim Zeitlin
664b8c153f Don't export sorted dynamic arrays from the shared library
This shouldn't be necessary and doing it seems to result in duplicate
symbol errors when using MSVC under some not completely elucidated
circumstances.

See https://github.com/utelle/wxpdfdoc/pull/48

Closes https://github.com/wxWidgets/wxWidgets/pull/1013
2018-11-10 12:17:53 +01:00
Vadim Zeitlin
463deb03c9 Merge branch 'gtk-dpi'
A bunch of improvements for per-monitor DPI support in wxGTK and
wxGraphicsContext more generally.

Closes https://github.com/wxWidgets/wxWidgets/pull/995
2018-11-10 12:15:27 +01:00
VZ
cce9ef9d53 Fix compatibility breakage with wxMask::Create() in wxOSX (#1019)
Defining a Mac-specific Create(wxMemoryBuffer) overload hid the other
Create() overloads, which are actually part of the public API, so they
couldn't be used any longer since the changes of
e7d21f6638

Fix this by renaming this Create() to OSXCreate(), to avoid hiding the
base class methods.

Also remove Mac-specific ctor taking wxMemoryBuffer, this is confusing
and can be avoided by just calling OSXCreate() directly in the only
place where it is used.
2018-11-09 17:52:58 +01:00
Stefan Csomor
e484a2db19 force subview refresh on macOS 10.14
even on dark mode not all NSViews have their own layer, therefore don’t take that as a condition, because a child of such a view still might be layer-backed and need an explicit redraw.
Avoid spurious redraws for not visible windows (especiall important for not-yet fully constructed views or views during destruction)
2018-11-08 15:04:42 +01:00
Artur Wieczorek
bf3cfe16d4 Remove irrelevant TODO note from documentation
Function is marked as deprecated so TODO note is no longer relevant.
2018-11-07 22:25:19 +01:00
Artur Wieczorek
9e378480c2 Iterate over all characters of a wxString with iterator 2018-11-07 22:12:56 +01:00
Vadim Zeitlin
3d18e1a2b4 Merge branch 'joystick-fixes'
Harmonize joystick events between different platforms.

See https://github.com/wxWidgets/wxWidgets/pull/1017
2018-11-07 18:33:26 +01:00
Paul Cornett
8929b3d3de Use a more robust check for the GNU C Library
_GNU_SOURCE alone is not definitive
2018-11-05 21:09:13 -08:00
Vadim Zeitlin
caa270a1af Bring Mac wxDataViewCtrl::GetItemRect() in sync with other ports
Return empty rectangle if the item is not currently visible, for
whatever reason, and use physical coordinates for the rectangle origin.

This makes the unit test for GetItemRect() pass under macOS too.
2018-11-06 04:17:27 +01:00
Vadim Zeitlin
767639276f Disable failing wxDataViewCtrl::IsExpanded() test under Mac
For some unfathomable reason IsExpanded() returns wrong value for one of
the items. This should be fixed, but for now just leave a warning in the
test but don't fail it.

Also document this bug to at least spare people some surprises.
2018-11-06 04:03:34 +01:00
Vadim Zeitlin
bfe11f233f Really implement wxGCDC::GetPPI()
Return the DPI of the associated window, if any, instead of the
hard-coded 72*72.
2018-11-06 03:36:53 +01:00
Vadim Zeitlin
d5c43831b5 Really implement wxGraphicsContext::GetDPI()
Return the DPI of the associated window, if any, instead of always
returning hard-coded 72*72.
2018-11-06 03:36:53 +01:00
Vadim Zeitlin
5e53b22bd4 Add wxGraphicsContext::GetWindow()
This method allows to retrieve the window this context is associated
with, if any.

Add "wxWindow*" argument to wxGraphicsContext ctor and provide the
window pointer to it when available, i.e. when creating the context from
a wxWindow directly or from wxWindowDC, which is also associated with a
window, in platform-specific code.

No real changes yet.
2018-11-06 03:36:53 +01:00
Artur Wieczorek
d735e444f1 Refer to wxPGProperty associated with wxPGComboBox editor in all drawing operations
Store wxPGProperty for which wxPGComboBox editor is activated and use
this reference in all further drawing operations instead of retrieving
each time currently selected wxPGProperty which during the entire
lifetime of the editor is the same as property selected on editor
activation.

See #18211.
2018-11-05 22:38:39 +01:00
Vadim Zeitlin
190601c47f Translate the warning shown by wxHyperlinkCtrl::SendEvent()
As anything shown to the user, this string must be translated, so use
_() around it instead of wxT().

Also reword the string a little; remove unnecessary call to .c_str() and
use a const reference instead of making a copy of the URL unnecessarily.
2018-11-05 19:38:18 +01:00
Vadim Zeitlin
3e246c767f Return true from wxHyperlinkCtrl::MSWOnNotify()
As SendEvent() not only sends the event about clicking on the link, but
also opens the link in the default browser if this event was not
processed (which wasn't really obvious from its name, so at least
mention it in its comment), the event is actually always handled and so
MSWOnNotify() must return true, not false (and definitely not 0) to
indicate it.

Closes #18266.
2018-11-05 19:35:44 +01:00
Vadim Zeitlin
ef92b92691 Add unit test for wxCTZ
Check that the new function works reasonably correctly.
2018-11-05 19:27:53 +01:00
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