Enum conrod::widget::MaybeParent [−][src]
pub enum MaybeParent { None, Some(Id), Unspecified, }
The builder argument for the Widget's parent.
Variants
None
The user specified the widget should not have any parents, so the Root will be used.
Some(Id)
The user gave a specific parent widget.
Unspecified
No parent widget was specified, so we will assume they want the last parent.
Methods
impl MaybeParent
[src]
impl MaybeParent
pub fn get_unchecked(&self, ui: &Ui, x_pos: Position, y_pos: Position) -> Id
[src]
pub fn get_unchecked(&self, ui: &Ui, x_pos: Position, y_pos: Position) -> Id
Convert the MaybeParent into an Option
If Unspecified
, check the positioning to retrieve the Id from there.
If None
, the Ui
's window
widget will be used.
Note: This method does not check whether or not using the window
widget as the parent
would cause a cycle. If it is important that the inferred parent should not cause a cycle,
use get
instead.
pub fn get(
&self,
id: Id,
ui: &Ui,
x_pos: Position,
y_pos: Position
) -> Option<Id>
[src]
pub fn get(
&self,
id: Id,
ui: &Ui,
x_pos: Position,
y_pos: Position
) -> Option<Id>
The same as get_unchecked
, but checks whether or not the widget that we're inferring the
parent for is the Ui
's window (which cannot have a parent, without creating a cycle).
Trait Implementations
impl Copy for MaybeParent
[src]
impl Copy for MaybeParent
impl Clone for MaybeParent
[src]
impl Clone for MaybeParent
fn clone(&self) -> MaybeParent
[src]
fn clone(&self) -> MaybeParent
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for MaybeParent
[src]
impl Debug for MaybeParent
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for MaybeParent
[src]
impl PartialEq for MaybeParent
fn eq(&self, other: &MaybeParent) -> bool
[src]
fn eq(&self, other: &MaybeParent) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &MaybeParent) -> bool
[src]
fn ne(&self, other: &MaybeParent) -> bool
This method tests for !=
.
Auto Trait Implementations
impl Send for MaybeParent
impl Send for MaybeParent
impl Sync for MaybeParent
impl Sync for MaybeParent