Greg Spencer
8ef5e2f046
Add OrderedFocusTraversalPolicy and FocusTraversalGroup to all… ( #49235 )
...
This change adds a way to provide explicit focus order for a part of the widget tree.
It adds FocusTraversalPolicyGroup, which in many ways is similar to DefaultFocusTraversal, except that it groups a widget subtree together so that those nodes are traversed as a group. DefaultFocusTraversal doesn't work as one would expect: If there is more than one DefaultFocusTraversal inside of a focus scope, the policy can change depending on which node was asked to move "next", which can cause unexpected behavior. The new grouping mechanism doesn't have that problem. I deprecate DefaultFocusTraversal in this PR.
It also adds OrderedFocusTraversalPolicy, which is a policy that can be supplied to FocusTraversalPolicyGroup to set the policy for a sub-tree. It looks for FocusTraversalOrder inherited widgets, which use a FocusOrder to do the sorting. FocusOrder has two subclasses: NumericalFocusOrder (which sorts based on a double), and LexicalFocusOrder, which sorts based on a String.
As part of doing this, I refactored the way FocusTraversalPolicy is implemented so that it has more default implementation methods, and exposes a new protected member: sortDescendants, which makes it easier for developers to make their own policy subclasses: they only need to implement sortDescendants to get a new ordering behavior, but can also still override any of the default implementation behaviors if they need different behavior.
I was able to do this without breaking the API (AFAICT).
2020-02-11 09:18:39 -08:00
..
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2019-12-16 15:03:02 -08:00
2019-11-27 15:04:02 -08:00
2020-01-27 14:36:02 -08:00
2019-11-27 15:04:02 -08:00
2019-12-16 15:03:02 -08:00
2019-11-27 15:04:02 -08:00
2020-01-27 14:36:02 -08:00
2019-12-16 15:03:02 -08:00
2020-01-27 14:36:02 -08:00
2019-11-27 15:04:02 -08:00
2020-02-04 16:33:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2019-12-20 18:43:01 -08:00
2019-11-27 15:04:02 -08:00
2020-01-06 17:41:54 +01:00
2020-01-29 13:05:49 -05:00
2019-12-16 15:03:02 -08:00
2019-12-03 19:48:01 -08:00
2019-12-16 15:03:02 -08:00
2020-01-31 19:18:03 -08:00
2020-01-07 12:13:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2020-01-07 16:32:04 +01:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2019-12-20 18:43:01 -08:00
2019-12-16 15:03:02 -08:00
2019-12-16 15:03:02 -08:00
2019-12-16 15:03:02 -08:00
2019-11-27 15:04:02 -08:00
2019-12-30 13:09:14 -08:00
2019-11-27 15:04:02 -08:00
2020-01-13 10:08:01 -08:00
2020-02-10 10:03:03 -08:00
2020-01-07 16:32:04 +01:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2020-01-27 14:36:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2020-01-06 17:41:54 +01:00
2020-01-30 11:38:00 -08:00
2020-01-06 17:41:54 +01:00
2020-01-27 14:36:02 -08:00
2019-12-19 02:23:01 -08:00
2020-01-27 14:36:02 -08:00
2020-01-27 14:36:02 -08:00
2019-11-27 15:04:02 -08:00
2020-02-10 20:55:48 -05:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2020-01-07 16:32:04 +01:00
2019-11-27 15:04:02 -08:00
2020-01-07 16:32:04 +01:00
2019-11-27 15:04:02 -08:00
2020-01-27 14:36:02 -08:00
2020-02-10 14:33:31 -08:00
2020-02-11 09:18:39 -08:00
2020-02-11 09:18:39 -08:00
2019-11-27 15:04:02 -08:00
2019-12-16 15:03:02 -08:00
2020-02-03 20:39:49 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2020-01-06 17:41:54 +01:00
2019-11-27 15:04:02 -08:00
2020-01-07 16:32:04 +01:00
2019-11-27 15:04:02 -08:00
2020-01-29 13:43:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2019-12-16 15:03:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2019-12-21 14:03:01 -08:00
2019-12-16 15:03:02 -08:00
2019-11-27 15:04:02 -08:00
2019-12-16 15:03:02 -08:00
2019-12-16 15:03:02 -08:00
2019-11-27 15:04:02 -08:00
2020-02-10 14:23:01 -08:00
2020-01-14 09:38:02 -08:00
2019-11-27 15:04:02 -08:00
2020-01-06 17:41:54 +01:00
2019-12-16 15:03:02 -08:00
2020-01-24 19:03:01 -08:00
2020-01-06 17:41:54 +01:00
2020-01-06 17:41:54 +01:00
2020-01-06 17:41:54 +01:00
2019-11-27 15:04:02 -08:00
2019-12-20 18:43:01 -08:00
2020-01-21 16:43:03 -08:00
2020-01-09 08:23:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2020-01-07 16:32:04 +01:00
2019-11-27 15:04:02 -08:00
2020-01-14 16:18:48 +00:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2020-01-06 17:41:54 +01:00
2019-11-27 15:04:02 -08:00
2020-01-21 16:43:03 -08:00
2019-11-27 15:04:02 -08:00
2020-01-27 14:36:02 -08:00
2020-01-28 15:03:01 -08:00
2019-12-16 15:03:02 -08:00
2019-11-27 15:04:02 -08:00
2019-12-16 15:03:02 -08:00
2020-01-27 14:36:02 -08:00
2020-01-27 14:36:02 -08:00
2020-01-28 15:03:01 -08:00
2020-01-27 14:36:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2020-02-07 18:23:02 -08:00
2020-01-31 12:53:03 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2019-12-20 18:43:01 -08:00
2019-12-16 15:03:02 -08:00
2020-01-27 23:56:41 -08:00
2019-12-16 15:03:02 -08:00
2019-12-16 15:03:02 -08:00
2019-11-27 15:04:02 -08:00
2020-01-27 14:36:02 -08:00
2020-01-27 14:36:02 -08:00
2019-11-27 15:04:02 -08:00
2020-01-27 14:36:02 -08:00
2019-11-27 15:04:02 -08:00
2020-01-27 14:36:02 -08:00
2019-11-27 15:04:02 -08:00
2020-01-27 14:36:02 -08:00
2019-12-16 15:03:02 -08:00
2019-12-16 15:03:02 -08:00
2019-11-27 15:04:02 -08:00
2020-01-27 14:36:02 -08:00
2020-01-06 17:41:54 +01:00
2019-12-16 15:03:02 -08:00
2020-01-06 17:41:54 +01:00
2019-11-27 15:04:02 -08:00
2020-01-24 19:03:01 -08:00
2020-02-05 10:53:01 -08:00
2019-12-16 15:03:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2020-02-06 13:19:46 -08:00
2020-01-27 14:36:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2020-01-27 14:36:02 -08:00
2020-01-27 14:36:02 -08:00
2020-01-06 17:41:54 +01:00
2019-11-27 15:04:02 -08:00
2020-01-27 14:36:02 -08:00
2019-11-27 15:04:02 -08:00
2020-01-27 14:36:02 -08:00
2020-01-27 14:36:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2019-12-16 15:03:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2020-01-27 14:36:02 -08:00
2020-01-07 16:32:04 +01:00
2020-01-27 14:36:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2020-01-02 11:47:28 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2020-01-27 14:36:02 -08:00
2019-12-16 15:03:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2020-01-07 16:32:04 +01:00
2020-01-07 16:32:04 +01:00
2019-11-27 15:04:02 -08:00
2020-01-31 18:30:21 +01:00
2020-01-07 16:32:04 +01:00
2019-11-27 15:04:02 -08:00
2020-01-06 17:41:54 +01:00
2019-11-27 15:04:02 -08:00
2020-01-06 17:41:54 +01:00
2020-01-06 17:41:54 +01:00
2020-01-27 14:36:02 -08:00
2020-01-02 11:47:28 -08:00
2020-02-10 14:16:49 -08:00
2020-01-27 14:36:02 -08:00
2020-01-30 14:18:09 -08:00
2019-11-27 15:04:02 -08:00
2020-01-27 14:36:02 -08:00
2020-01-27 14:36:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2020-01-27 14:36:02 -08:00
2020-01-21 16:43:03 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2019-12-16 12:23:03 -08:00
2019-11-27 15:04:02 -08:00
2020-01-27 14:36:02 -08:00
2020-01-27 14:36:02 -08:00
2020-01-27 14:36:02 -08:00
2019-11-27 15:04:02 -08:00
2020-01-06 17:41:54 +01:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2020-01-31 12:58:03 -08:00
2020-01-27 14:36:02 -08:00
2020-01-06 17:41:54 +01:00
2019-11-27 15:04:02 -08:00
2019-12-16 15:03:02 -08:00
2020-01-06 17:41:54 +01:00
2020-01-27 14:36:02 -08:00
2019-12-16 15:03:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2020-01-06 17:41:54 +01:00
2019-12-16 15:03:02 -08:00
2020-01-02 11:47:28 -08:00
2020-01-06 17:41:54 +01:00
2019-11-27 15:04:02 -08:00
2020-01-29 17:02:57 -08:00
2020-01-27 14:36:02 -08:00
2020-02-07 16:35:55 +01:00
2020-02-07 18:23:02 -08:00
2020-01-27 14:36:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2019-12-16 15:03:02 -08:00
2019-11-27 15:04:02 -08:00
2020-01-27 14:36:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2019-11-27 15:04:02 -08:00
2019-12-16 12:23:03 -08:00
2020-01-27 14:36:02 -08:00
2019-11-27 15:04:02 -08:00