@@ -35,8 +35,6 @@ pub struct TextEditOutput {
35
35
///
36
36
/// Attention: You also need to `store` the updated state.
37
37
#[ derive( Clone , Default ) ]
38
- #[ cfg_attr( feature = "serde" , derive( serde:: Deserialize , serde:: Serialize ) ) ]
39
- #[ cfg_attr( feature = "serde" , serde( default ) ) ]
40
38
pub struct TextEditState {
41
39
cursor_range : Option < CursorRange > ,
42
40
@@ -45,15 +43,12 @@ pub struct TextEditState {
45
43
ccursor_range : Option < CCursorRange > ,
46
44
47
45
/// Wrapped in Arc for cheaper clones.
48
- #[ cfg_attr( feature = "serde" , serde( skip) ) ]
49
46
pub ( crate ) undoer : Arc < Mutex < Undoer > > ,
50
47
51
48
// If IME candidate window is shown on this text edit.
52
- #[ cfg_attr( feature = "serde" , serde( skip) ) ]
53
49
pub ( crate ) has_ime : bool ,
54
50
55
51
// Visual offset when editing singleline text bigger than the width.
56
- #[ cfg_attr( feature = "serde" , serde( skip) ) ]
57
52
pub ( crate ) singleline_offset : f32 ,
58
53
}
59
54
@@ -1020,28 +1015,6 @@ fn events(
1020
1015
None
1021
1016
}
1022
1017
}
1023
-
1024
- #[ cfg( feature = "accesskit" ) ]
1025
- Event :: AccessKitActionRequest ( accesskit:: ActionRequest {
1026
- action : accesskit:: Action :: SetTextSelection ,
1027
- target,
1028
- data : Some ( accesskit:: ActionData :: SetTextSelection ( selection) ) ,
1029
- } ) => {
1030
- if id. accesskit_id ( ) == * target {
1031
- let primary =
1032
- ccursor_from_accesskit_text_position ( id, galley, & selection. focus ) ;
1033
- let secondary =
1034
- ccursor_from_accesskit_text_position ( id, galley, & selection. anchor ) ;
1035
- if let ( Some ( primary) , Some ( secondary) ) = ( primary, secondary) {
1036
- Some ( CCursorRange { primary, secondary } )
1037
- } else {
1038
- None
1039
- }
1040
- } else {
1041
- None
1042
- }
1043
- }
1044
-
1045
1018
_ => None ,
1046
1019
} ;
1047
1020
0 commit comments