[−][src]Struct fui_controls::RelativeLayout
Warning!
RelativeLayout is designed to work with Popup control.
It works correctly only when:
- Placed as a top control (covers whole window).
- References to controls on lower layouts.
Referencing controls placed on the same layout can cause panics because of recursive borrowing controls during layout phase.
Fields
placement: RelativePlacement
clicked_outside: Callback<()>
Implementations
impl RelativeLayout
[src]
pub fn builder() -> RelativeLayoutBuilder<((), ())>
[src]
Create a builder for building RelativeLayout
.
On the builder, call .placement(...)
(optional), .clicked_outside(...)
(optional) to set the values of the fields (they accept Into
values).
Finally, call .build()
to create the instance of RelativeLayout
.
impl RelativeLayout
[src]
pub fn to_view(
self,
style: Option<Box<dyn Style<Self>>>,
context: ViewContext
) -> Rc<RefCell<StyledControl<Self>>>
[src]
self,
style: Option<Box<dyn Style<Self>>>,
context: ViewContext
) -> Rc<RefCell<StyledControl<Self>>>
Trait Implementations
impl Style<RelativeLayout> for DefaultRelativeLayoutStyle
[src]
fn setup(
&mut self,
_data: &mut RelativeLayout,
_control_context: &mut ControlContext
)
[src]
&mut self,
_data: &mut RelativeLayout,
_control_context: &mut ControlContext
)
fn handle_event(
&mut self,
data: &mut RelativeLayout,
_control_context: &mut ControlContext,
_drawing_context: &mut dyn DrawingContext,
_event_context: &mut dyn EventContext,
event: ControlEvent
)
[src]
&mut self,
data: &mut RelativeLayout,
_control_context: &mut ControlContext,
_drawing_context: &mut dyn DrawingContext,
_event_context: &mut dyn EventContext,
event: ControlEvent
)
fn measure(
&mut self,
data: &mut RelativeLayout,
control_context: &mut ControlContext,
drawing_context: &mut dyn DrawingContext,
size: Size
)
[src]
&mut self,
data: &mut RelativeLayout,
control_context: &mut ControlContext,
drawing_context: &mut dyn DrawingContext,
size: Size
)
fn set_rect(
&mut self,
_data: &mut RelativeLayout,
control_context: &mut ControlContext,
_rect: Rect
)
[src]
&mut self,
_data: &mut RelativeLayout,
control_context: &mut ControlContext,
_rect: Rect
)
fn get_rect(&self, _control_context: &ControlContext) -> Rect
[src]
fn hit_test(
&self,
_data: &RelativeLayout,
control_context: &ControlContext,
point: Point
) -> HitTestResult
[src]
&self,
_data: &RelativeLayout,
control_context: &ControlContext,
point: Point
) -> HitTestResult
fn to_primitives(
&self,
_data: &RelativeLayout,
control_context: &ControlContext,
drawing_context: &mut dyn DrawingContext
) -> (Vec<Primitive>, Vec<Primitive>)
[src]
&self,
_data: &RelativeLayout,
control_context: &ControlContext,
drawing_context: &mut dyn DrawingContext
) -> (Vec<Primitive>, Vec<Primitive>)
Auto Trait Implementations
impl !RefUnwindSafe for RelativeLayout
impl !Send for RelativeLayout
impl !Sync for RelativeLayout
impl Unpin for RelativeLayout
impl !UnwindSafe for RelativeLayout
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> UnsafeAny for T where
T: Any,
T: Any,