[−][src]Struct widgetry::widgets::Widget
Fields
widget: Box<dyn WidgetImpl>
layout: LayoutStyle
rect: ScreenRectangle
bg: Option<Drawable>
bg_batch: Option<GeomBatch>
id: Option<String>
Implementations
impl Widget
[src]
pub fn centered(self) -> Widget
[src]
pub fn centered_horiz(self) -> Widget
[src]
pub fn centered_vert(self) -> Widget
[src]
pub fn centered_cross(self) -> Widget
[src]
pub fn evenly_spaced(self) -> Widget
[src]
pub fn fill_width(self) -> Widget
[src]
pub fn fill_height(self) -> Widget
[src]
pub fn flex_wrap(self, ctx: &EventCtx<'_>, width: Percent) -> Widget
[src]
pub fn force_width(self, width: f64) -> Widget
[src]
pub fn force_width_pct(self, ctx: &EventCtx<'_>, width: Percent) -> Widget
[src]
pub fn get_width_for_forcing(&self) -> f64
[src]
pub fn bg(self, color: Color) -> Widget
[src]
pub fn outline(self, thickness: f64, color: Color) -> Widget
[src]
pub fn corner_rounding<R: Into<CornerRounding>>(self, value: R) -> Widget
[src]
pub fn container(self) -> Widget
[src]
pub fn padding<I: Into<EdgeInsets>>(self, insets: I) -> Widget
[src]
pub fn padding_top(self, pixels: usize) -> Widget
[src]
pub fn padding_left(self, pixels: usize) -> Widget
[src]
pub fn padding_bottom(self, pixels: usize) -> Widget
[src]
pub fn padding_right(self, pixels: usize) -> Widget
[src]
pub fn margin<I: Into<EdgeInsets>>(self, insets: I) -> Widget
[src]
pub fn margin_above(self, pixels: usize) -> Widget
[src]
pub fn margin_below(self, pixels: usize) -> Widget
[src]
pub fn margin_left(self, pixels: usize) -> Widget
[src]
pub fn margin_right(self, pixels: usize) -> Widget
[src]
pub fn margin_horiz(self, pixels: usize) -> Widget
[src]
pub fn margin_vert(self, pixels: usize) -> Widget
[src]
pub fn align_left(self) -> Widget
[src]
pub fn align_right(self) -> Widget
[src]
pub fn align_bottom(self) -> Widget
[src]
pub fn align_vert_center(self) -> Widget
[src]
fn abs(self, x: f64, y: f64) -> Widget
[src]
pub fn named<I: Into<String>>(self, id: I) -> Widget
[src]
impl Widget
[src]
pub fn new(widget: Box<dyn WidgetImpl>) -> Widget
[src]
pub fn draw_batch(ctx: &EventCtx<'_>, batch: GeomBatch) -> Widget
[src]
pub fn text_entry(
ctx: &EventCtx<'_>,
prefilled: String,
exclusive_focus: bool
) -> Widget
[src]
ctx: &EventCtx<'_>,
prefilled: String,
exclusive_focus: bool
) -> Widget
pub fn dropdown<T: 'static + PartialEq + Clone + Debug, I: Into<String>>(
ctx: &EventCtx<'_>,
label: I,
default_value: T,
choices: Vec<Choice<T>>
) -> Widget
[src]
ctx: &EventCtx<'_>,
label: I,
default_value: T,
choices: Vec<Choice<T>>
) -> Widget
pub fn custom_row(widgets: Vec<Widget>) -> Widget
[src]
Creates a row with the specified widgets. No margins or other layouting is applied.
pub fn row(widgets: Vec<Widget>) -> Widget
[src]
Creates a row with the specified widgets. Every member gets a default horizontal margin.
pub fn custom_col(widgets: Vec<Widget>) -> Widget
[src]
Creates a column with the specified widgets. No margins or other layouting is applied.
pub fn col(widgets: Vec<Widget>) -> Widget
[src]
Creates a column with the specified widgets. Every member gets a default vertical margin.
pub fn nothing() -> Widget
[src]
pub fn to_geom(
self,
ctx: &EventCtx<'_>,
exact_pct_width: Option<f64>
) -> (GeomBatch, Polygon)
[src]
self,
ctx: &EventCtx<'_>,
exact_pct_width: Option<f64>
) -> (GeomBatch, Polygon)
pub fn horiz_separator(ctx: &mut EventCtx<'_>, pct_width: f64) -> Widget
[src]
pub fn vert_separator(ctx: &mut EventCtx<'_>, height_px: f64) -> Widget
[src]
impl Widget
[src]
pub(crate) fn draw(&self, g: &mut GfxCtx<'_>)
[src]
fn get_flexbox(
&self,
parent: Node,
stretch: &mut Stretch,
nodes: &mut Vec<Node>
)
[src]
&self,
parent: Node,
stretch: &mut Stretch,
nodes: &mut Vec<Node>
)
fn apply_flexbox(
&mut self,
stretch: &Stretch,
nodes: &mut Vec<Node>,
dx: f64,
dy: f64,
scroll_offset: (f64, f64),
ctx: &EventCtx<'_>,
recompute_layout: bool,
defer_draw: bool
)
[src]
&mut self,
stretch: &Stretch,
nodes: &mut Vec<Node>,
dx: f64,
dy: f64,
scroll_offset: (f64, f64),
ctx: &EventCtx<'_>,
recompute_layout: bool,
defer_draw: bool
)
fn get_all_click_actions(&self, actions: &mut HashSet<String>)
[src]
fn currently_hovering(&self) -> Option<&String>
[src]
fn restore(&mut self, ctx: &mut EventCtx<'_>, prev: &Panel)
[src]
fn consume_geometry(self, batch: &mut GeomBatch)
[src]
pub fn is_btn(&self, name: &str) -> bool
[src]
fn find(&self, name: &str) -> Option<&Widget>
[src]
fn find_mut(&mut self, name: &str) -> Option<&mut Widget>
[src]
fn take(&mut self, name: &str) -> Option<Widget>
[src]
pub(crate) fn take_just_draw(self) -> JustDraw
[src]
Auto Trait Implementations
impl !RefUnwindSafe for Widget
[src]
impl !Send for Widget
[src]
impl !Sync for Widget
[src]
impl Unpin for Widget
[src]
impl !UnwindSafe for Widget
[src]
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Downcast for T where
T: Any,
T: Any,
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn as_any(&self) -> &(dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
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.
pub 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>,