Commit Graph

18684 Commits

Author SHA1 Message Date
Robin Dunn
06bda3e5de Revert change that ended up just moving some lines 2020-04-02 12:59:26 -07:00
Robin Dunn
c532edfe67 Fix class names in the header 2020-04-02 12:51:16 -07:00
Robin Dunn
52d4bad3df
Apply suggestions from code review
Co-Authored-By: VZ <vadim@wxwidgets.org>
2020-04-02 12:35:58 -07:00
Robin Dunn
fb69a2975f Add missing wxOVERRIDE, and some other cleanup 2020-04-01 14:55:08 -07:00
Robin Dunn
6b6a930e9c Update GTK animation classes for the new pattern 2020-04-01 14:16:15 -07:00
Robin Dunn
f641601ea9 Remove the wxOVERRIDEs too 2020-04-01 13:37:38 -07:00
Robin Dunn
085f08aefe Remove the generic-specific methods from the wxAnimation API 2020-04-01 13:30:49 -07:00
Robin Dunn
606f365ea3 Verify the animation impl type matches the animation ctrl type 2020-04-01 12:39:48 -07:00
Robin Dunn
e464453073 * Switch wxAnimation to be a facade over a wxAnimationImpl class.
* Implement wxAnimationGenericImpl
* Update wxGenericAnimationCtrl as needed
2020-04-01 11:53:19 -07:00
Robin Dunn
85bd16fb06 Trim trailing whitespace 2020-03-31 14:02:39 -07:00
Robin Dunn
1608fde659 Add a Create method to the shim class 2020-03-30 15:20:19 -07:00
Robin Dunn
868154ee90 native wxAnimationCtrl derives from the generic class 2020-03-30 15:01:21 -07:00
Robin Dunn
a7f9d5e3c5 * Switch back to using an wxAnimationBase class
* Change the [GS]etAnimation methods to be non-virtual so they can use generic/native types of animation obj
2020-03-30 14:53:11 -07:00
Robin Dunn
08ac4dbad6 Name the base animation class wxGenericAnimation with a wxAnimation shim class 2020-03-27 15:53:03 -07:00
Robin Dunn
488084c2f5 Name the base animation class wxGenericAnimation with a wxAnimation shim class 2020-03-27 14:33:11 -07:00
Robin Dunn
fae15d39a6 * Rename the generic version as wxGenericAnimationCtrl
* Add a simple shim class for the generic wxAnimationCtrl
* Use the generic wxAnimation as the base class (this will probably change...)
2020-03-25 16:29:34 -07:00
Robin Dunn
1fa74df7f4 Remove --disable-nativeanimation and wxUSE_NATIVE_ANIMATIONCTRL 2020-03-25 14:03:28 -07:00
Vadim Zeitlin
360867d37b Remove extra accidentally added blank line in auto-generated file
Just commit the result after running build/update-setup-h.
2020-03-25 12:20:18 +01:00
Robin Dunn
201af608f7 Update description of wxUSE_NATIVE_ANIMATIONCTRL 2020-03-24 19:43:13 -07:00
Robin Dunn
eeedc14a58 DoCanRead is protected in the base class, make it the same in derived classes. 2020-03-24 16:25:00 -07:00
Robin Dunn
398b178431 Compile native or generic animation classes based on wxUSE flags 2020-03-24 14:49:03 -07:00
Robin Dunn
d72ef11e87 Add --disable-nativeanimation configure option, and wxUSE_NATIVE_ANIMATIONCTRL 2020-03-24 13:19:34 -07:00
Vadim Zeitlin
eaaad6471d Merge branch 'aui-delete-tool'
Provide work around for surprising behaviour of
wxAuiToolBar::DeleteTool().

Closes https://github.com/wxWidgets/wxWidgets/pull/1758
2020-03-15 17:10:41 +01:00
Vadim Zeitlin
700eaff131 Add wxAuiToolBar::DestroyTool() and DestroyToolByIndex()
These new functions destroy the associated window too, unlike the
existing DeleteTool() and DeleteByIndex().

Closes #16552.
2020-03-15 17:09:51 +01:00
Vadim Zeitlin
5a9938aa67 Merge branch 'log-dangling-else-warns'
Fix dangling else warnings in wxLog macros.

See https://github.com/wxWidgets/wxWidgets/pull/1755
2020-03-15 17:05:23 +01:00
Vadim Zeitlin
8b2237cd2d Make row/column drag-resizing in wxGrid "live"
Update the column width immediately, as it's being dragged, instead of
drawing a temporary line showing the new column boundary using wxINVERT.

This results in better user experience, as it the effect of changing the
column width can be immediately seen (especially important for non-left
aligned columns or columns using ellipsizition) and, equally if not more
importantly, fixes wxGrid drag-resize not showing any visible UI at all
with wxGTK3 and wxOSX where wxINVERT is not implemented.
2020-03-11 22:00:01 +01:00
Vadim Zeitlin
3d1de5c31b Make interface between wxGridHeaderCtrl and wxGrid more explicit
Rename the functions used from wxGridHeaderCtrl event handlers to start
with DoHeader prefix to make it clear that they're (only) used by it in
an attempt to make things more clear and more uniform.

No real changes.
2020-03-11 21:59:15 +01:00
Vadim Zeitlin
5986584fc0 Fix position in dummy wxMouseEvent used by wxGridHeaderCtrl
This probably doesn't matter much, but use the correct mouse position in
this event, expressed in wxGrid coordinate system instead of using
screen coordinates.
2020-03-11 21:59:15 +01:00
Vadim Zeitlin
52b7267aac Add wxGrid::m_dragMoveCol field separate from m_dragRowOrCol
Don't reuse the same m_dragRowOrCol variable for both the index of the
row or column being drag-resized and for the index of the column being
drag-moved. Reusing it was confusing and made it more difficult what the
code was doing and what invariants were preserved in it, and just wasn't
worth saving a few bytes per wxGrid object.

No real changes.
2020-03-11 21:59:15 +01:00
Vadim Zeitlin
05c5891bf6 Slightly simplify wxGrid refresh logic
Use new ShouldRefresh() helper instead of testing for !GetBatchCount()
before calling Refresh().

Also check for GetBatchCount() inside CalcDimensions() itself, which
means that it can now be called unconditionally.

No real changes.
2020-03-11 21:59:15 +01:00
Vadim Zeitlin
586d0e6ee6 Make wxGrid::GetBatchCount() const
There is really no reason for this simple accessor not to be const.
2020-03-11 21:59:15 +01:00
Vadim Zeitlin
c2b0edefbd Also remove unused wxGrid wxEVT_ERASE_BACKGROUND handler
It is never used anyhow, as wxGrid is entirely covered by its children
windows.
2020-03-11 21:59:15 +01:00
Vadim Zeitlin
e671386d1a Use wxBG_STYLE_PAINT for wxGridWindow
This is more explicit, efficient and simpler than defining an empty
wxEVT_ERASE_BACKGROUND handler, which is not needed any longer.
2020-03-11 21:59:15 +01:00
Vadim Zeitlin
a5807b8fcf Remove unnecessary wxGrid::OnPaint()
This method was explicitly defined to do nothing, so just remove it.

No real changes.
2020-03-11 21:59:15 +01:00
Vadim Zeitlin
b08b697665 Merge branch 'grid-tests-refactor'
Refactor wxGrid tests to make it easier to run individual ones.

See https://github.com/wxWidgets/wxWidgets/pull/1759
2020-03-11 21:56:29 +01:00
Vadim Zeitlin
9203f685ee Check the expected WebView2 interface is defined
This results in a single intelligible error instead of a hundred of less
clear ones in case our code is compiled against an out of date SDK
version.

There doesn't seem to be any way to check the version directly, so just
check that the interface which hadn't been defined in the previous
version is defined now to check for it indirectly.
2020-03-11 19:26:39 +01:00
Vadim Zeitlin
8802657490 Add wxGrid::IsUsingNativeHeader()
It is convenient to have this function if only in order to be able to
call GetGridColHeader() safely, i.e. without triggering an assert if
native header is not being used.
2020-03-11 18:41:16 +01:00
Vadim Zeitlin
71ed744c76 Simplify wxLogXXX() macros implementation at some cost of brevity
Avoid using plenty of intermediate macros, which made the code quite
difficult to understand and just wxDO_IF() helper directly instead.

This makes individual macros definitions slightly longer, but allows to
get rid of several helper macros, so the total number of lines is
actually smaller but, more importantly, the new code is much easier to
parse for a human reader.
2020-03-10 02:42:08 +01:00
Vadim Zeitlin
8c378b44e2 Add wxDO_IF() helper macro
This will be used for wxLogXXX() macros reimplementation in the next
commit.
2020-03-10 02:42:08 +01:00
Lauri Nurmi
32ead5a0ff Fix dangling else warnings at all wx(V)LogXXX calls
Earlier this was fixed for some but not all variants of wx(V)LogXXX.

See #11829.
2020-03-10 02:42:08 +01:00
Lauri Nurmi
bf6dae2151 Remove outdated and wrong comment about making functions const
The comment suggested Get{First,Next,Prev,Last}Line() should be changed
to const functions once compilers understand the 'mutable' keyword.

Hopefully now, after 19 years, compilers do understand the 'mutable'
keyword, but regardless of that the functions should not be const, as
they very clearly modify the state of the object that is observable
through the public interface.

Closes https://github.com/wxWidgets/wxWidgets/pull/1750
2020-03-06 01:08:19 +01:00
Tobias Taschner
613687ecb5 Updated wxWebViewEdge for SDK 0.9.430
This first beta release of the WebView2 SDK has many identifiers
renamed and webview interfaces split to Host and WebView.

Closes https://github.com/wxWidgets/wxWidgets/pull/1743
2020-02-29 15:40:45 +01:00
Vadim Zeitlin
ebc0f056c0 Make wxTemp[F]File classes non default ctor explicit
There should really be no reason to ever implicitly convert a string to
a file.
2020-02-21 14:56:06 +01:00
Dummy
3e0780e811 Add wxTempFFile, similar to wxTempFile but using buffered I/O
Also add wxTempFFileOutputStream.

Closes #18673.
2020-02-21 14:52:40 +01:00
Paul Cornett
05d19797a5 Revert to using our own drag-move code for wxGTK wxMiniFrame with non-Wayland backends
At least one WM (KDE's KWin) does not generate X11 configure events when dragging
a window using gtk_window_begin_move_drag(). We need the configure events so we
can generate wxMoveEvent, which AUI needs in order to re-attach a floating pane.
This is functionally a revert of b8789b9d6f for backends other than Wayland.
See #18372 #18669
2020-02-19 20:26:08 -08:00
Vadim Zeitlin
a4906f1222 Change wxGetTopLevelParent() to take wxWindowBase
This makes it more convenient to use when building wxUniv, when
wxWindow$TOOLKIT objects are wxWindowBase but not actually wxWindow.

No real changes.
2020-02-17 19:49:23 +01:00
Artur Wieczorek
5bc020e844 Implement getters for members of wxPGWindowList
There is no reason to expose wxPGWindowList member variables. They should
be set in ctors and retrieved with getters.
2020-02-12 17:09:25 +01:00
Kvaz1r
6697b576b2 Close AUI MDI children when the parent frame is closed
This ensures that the parent frame doesn't close if any of the children
can't be closed and also that all children are closed before the parent
if they do agree to close.

Closes https://github.com/wxWidgets/wxWidgets/pull/1734

Closes #15170.
2020-02-11 22:41:26 +01:00
Vadim Zeitlin
789858a4d9 Merge branch 'secret-service-check'
Check if secret service can be used under Unix.

See https://github.com/wxWidgets/wxWidgets/pull/1733
2020-02-11 22:36:03 +01:00
Vadim Zeitlin
b18169a0e4 Merge branch 'paint-debug'
Detect invalid use of wxPaintDC/wxPaintEvent better.

See https://github.com/wxWidgets/wxWidgets/pull/1732
2020-02-11 22:35:33 +01:00