pub trait ZoomActionExt: 'static {
// Required methods
fn get_focal_point(&self) -> Point;
fn get_transformed_focal_point(&self) -> Point;
fn get_zoom_axis(&self) -> ZoomAxis;
fn set_zoom_axis(&self, axis: ZoomAxis);
fn connect_zoom<F: Fn(&Self, &Actor, &Point, f64) -> bool + 'static>(
&self,
f: F,
) -> SignalHandlerId;
fn connect_property_zoom_axis_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId;
}
Expand description
Required Methods§
Sourcefn get_focal_point(&self) -> Point
fn get_focal_point(&self) -> Point
Sourcefn get_transformed_focal_point(&self) -> Point
fn get_transformed_focal_point(&self) -> Point
Sourcefn get_zoom_axis(&self) -> ZoomAxis
fn get_zoom_axis(&self) -> ZoomAxis
Sourcefn set_zoom_axis(&self, axis: ZoomAxis)
fn set_zoom_axis(&self, axis: ZoomAxis)
Sourcefn connect_zoom<F: Fn(&Self, &Actor, &Point, f64) -> bool + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_zoom<F: Fn(&Self, &Actor, &Point, f64) -> bool + 'static>( &self, f: F, ) -> SignalHandlerId
The ::zoom signal is emitted for each series of touch events that change the distance and focal point between the touch points.
The default handler of the signal will call
ActorExt::set_scale
on actor
using the ratio of the first
distance between the touch points and the current distance. To
override the default behaviour, connect to this signal and return
false
.
§actor
the Actor
attached to the action
§focal_point
the focal point of the zoom
§factor
the initial distance between the 2 touch points
§Returns
true
if the zoom should continue, and false
if
the zoom should be cancelled.
fn connect_property_zoom_axis_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.