Trait components::ContentExt [−][src]
pub trait ContentExt: 'static { pub fn get_preferred_size(&self) -> Option<(f32, f32)>; pub fn invalidate(&self); pub fn connect_attached<F>(&self, f: F) -> SignalHandlerId
where
F: 'static + Fn(&Self, &Actor); pub fn connect_detached<F>(&self, f: F) -> SignalHandlerId
where
F: 'static + Fn(&Self, &Actor); }
Required methods
pub fn get_preferred_size(&self) -> Option<(f32, f32)>
[src]
Retrieves the natural size of the self
, if any.
The natural size of a Content
is defined as the size the content
would have regardless of the allocation of the actor that is painting it,
for instance the size of an image data.
width
return location for the natural width of the content
height
return location for the natural height of the content
Returns
true
if the content has a preferred size, and false
otherwise
pub fn invalidate(&self)
[src]
Invalidates a Content
.
This function should be called by Content
implementations when
they change the way a the content should be painted regardless of the
actor state.
pub fn connect_attached<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&Self, &Actor),
[src]
F: 'static + Fn(&Self, &Actor),
pub fn connect_detached<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&Self, &Actor),
[src]
F: 'static + Fn(&Self, &Actor),
Implementors
impl<O> ContentExt for O where
O: IsA<Content>,
[src]
impl<O> ContentExt for O where
O: IsA<Content>,
[src]pub fn get_preferred_size(&self) -> Option<(f32, f32)>
[src]
pub fn invalidate(&self)
[src]
pub fn connect_attached<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O, &Actor),
[src]
F: 'static + Fn(&O, &Actor),
pub fn connect_detached<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O, &Actor),
[src]
F: 'static + Fn(&O, &Actor),