ferroui_xaml_interactivity/behaviors/
interactive_behavior_base.rs1use crate::{StyledElementBehaviorImpl, StyledElementBehaviorOfT};
4use ferroui_base::interactivity::{Interactive, RoutingStrategies};
5use ferroui_base::{ferro_class, ferro_properties, FerroObjectImpl, FerroProperty, StaticType, StyledElementImpl, StyledProperty};
6
7#[repr(C)]
10pub struct InteractiveBehaviorBase {
11 base: StyledElementBehaviorOfT,
12}
13
14ferro_class!(InteractiveBehaviorBase: StyledElementBehaviorOfT);
15ferroui_base::ferro_impl_classes!(InteractiveBehaviorBase: FerroObjectImpl, StyledElementImpl, StyledElementBehaviorImpl);
16
17ferro_properties! {
18 impl InteractiveBehaviorBase {
19 pub fn routing_strategies_property() -> StyledProperty<RoutingStrategies> {
21 FerroProperty::register::<InteractiveBehaviorBase, _>("RoutingStrategies", RoutingStrategies::BUBBLE)
22 }
23 }
24}
25
26impl InteractiveBehaviorBase {
27 pub fn construct() -> Self {
29 Self { base: StyledElementBehaviorOfT::construct(<Interactive as StaticType>::TYPE) }
30 }
31
32 pub fn routing_strategies(&self) -> RoutingStrategies {
34 self.get_value(Self::routing_strategies_property())
35 }
36
37 pub fn set_routing_strategies(&self, value: RoutingStrategies) {
38 self.set_value(Self::routing_strategies_property(), value)
39 }
40}