Trait components::ZoomActionExt [−][src]
pub trait ZoomActionExt: 'static {
pub fn get_focal_point(&self) -> InternalPoint;
pub fn get_transformed_focal_point(&self) -> InternalPoint;
pub fn get_zoom_axis(&self) -> ZoomAxis;
pub fn set_zoom_axis(&self, axis: ZoomAxis);
pub fn connect_zoom<F>(&self, f: F) -> SignalHandlerId
where
F: 'static + Fn(&Self, &Actor, &InternalPoint, f64) -> bool;
pub fn connect_property_zoom_axis_notify<F>(&self, f: F) -> SignalHandlerId
where
F: 'static + Fn(&Self);
}Required methods
pub fn get_focal_point(&self) -> InternalPoint[src]
pub fn get_transformed_focal_point(&self) -> InternalPoint[src]
pub fn get_zoom_axis(&self) -> ZoomAxis[src]
pub fn set_zoom_axis(&self, axis: ZoomAxis)[src]
pub fn connect_zoom<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&Self, &Actor, &InternalPoint, f64) -> bool, [src]
F: 'static + Fn(&Self, &Actor, &InternalPoint, f64) -> bool,
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.
pub fn connect_property_zoom_axis_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&Self), [src]
F: 'static + Fn(&Self),
Implementors
impl<O> ZoomActionExt for O where
O: IsA<ZoomAction>, [src]
impl<O> ZoomActionExt for O where
O: IsA<ZoomAction>, [src]pub fn get_focal_point(&self) -> InternalPoint[src]
pub fn get_transformed_focal_point(&self) -> InternalPoint[src]
pub fn get_zoom_axis(&self) -> ZoomAxis[src]
pub fn set_zoom_axis(&self, axis: ZoomAxis)[src]
pub fn connect_zoom<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O, &Actor, &InternalPoint, f64) -> bool, [src]
F: 'static + Fn(&O, &Actor, &InternalPoint, f64) -> bool,
pub fn connect_property_zoom_axis_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O), [src]
F: 'static + Fn(&O),