Struct limn_core::widget::Widget
[−]
[src]
pub struct Widget(_);
Methods
impl Widget
[src]
pub fn new<S: Into<String>>(name: S) -> Self
[src]
Creates a new, named Widget
, ex. "glcanvas".
The Widget
can then be referred to by name
pub fn from_modifier<T: Component + WidgetModifier>(component: T) -> Self
[src]
pub fn from_modifier_style<C: Component + WidgetModifier + 'static, T: ComponentStyle<Component = C> + Debug + Send>(
style: T
) -> Self
[src]
style: T
) -> Self
pub fn from_modifier_style_class<C: Component + WidgetModifier + 'static, T: ComponentStyle<Component = C> + Debug + Send>(
style: T,
class: &str
) -> Self
[src]
style: T,
class: &str
) -> Self
ⓘImportant traits for &'a mut Ipub fn set_draw_state<T: Draw + Component + 'static>(
&mut self,
draw_state: T
) -> &mut Self
[src]
ⓘImportant traits for &'a mut I
&mut self,
draw_state: T
) -> &mut Self
ⓘImportant traits for &'a mut Ipub fn set_draw_style<I: Into<DrawStyle>>(&mut self, style: I) -> &mut Self
[src]
ⓘImportant traits for &'a mut I
ⓘImportant traits for &'a mut Ipub fn set_cursor_hit_fn<F: Fn(Rect, Point) -> bool + 'static>(
&mut self,
cursor_hit_fn: F
) -> &mut Self
[src]
ⓘImportant traits for &'a mut I
&mut self,
cursor_hit_fn: F
) -> &mut Self
ⓘImportant traits for &'a mut Ipub fn add_filter<M: Filter + 'static>(&mut self, filter: M) -> &mut Self
[src]
ⓘImportant traits for &'a mut I
ⓘImportant traits for &'a mut Ipub fn add_handler<E: 'static, T: EventHandler<E> + 'static>(
&mut self,
handler: T
) -> &mut Self
[src]
ⓘImportant traits for &'a mut I
&mut self,
handler: T
) -> &mut Self
ⓘImportant traits for &'a mut Ipub fn add_handler_fn<E: 'static, T: FnMut(&E, EventArgs) + 'static>(
&mut self,
handler: T
) -> &mut Self
[src]
ⓘImportant traits for &'a mut I
&mut self,
handler: T
) -> &mut Self
pub fn layout(&mut self) -> LayoutGuardMut
[src]
pub fn layout_vars(&self) -> LayoutVars
[src]
pub fn props(&self) -> PropsGuard
[src]
pub fn add_prop(&mut self, property: Property)
[src]
pub fn remove_prop(&mut self, property: Property)
[src]
pub fn draw_state(&mut self) -> DrawStateGuard
[src]
pub fn downgrade(&self) -> WidgetWeak
[src]
pub fn id(&self) -> WidgetId
[src]
ⓘImportant traits for &'a mut Ipub fn set_name(&mut self, name: &str) -> &mut Self
[src]
ⓘImportant traits for &'a mut I
ⓘImportant traits for &'a mut Ipub fn set_debug_color(&mut self, color: Color) -> &mut Self
[src]
ⓘImportant traits for &'a mut I
pub fn name(&self) -> String
[src]
pub fn debug_color(&self) -> Option<Color>
[src]
pub fn has_updated(&self) -> bool
[src]
pub fn set_updated(&self, has_updated: bool)
[src]
pub fn bounds(&self) -> Rect
[src]
pub fn update<F, T: Draw + 'static>(&mut self, f: F) where
F: FnOnce(&mut T),
[src]
F: FnOnce(&mut T),
pub fn update_filter<F, T: Filter + 'static>(&mut self, f: F) where
F: FnOnce(&mut T),
[src]
F: FnOnce(&mut T),
ⓘImportant traits for &'a mut Ipub fn add_child<U: Into<Widget>>(&mut self, child: U) -> &mut Self
[src]
ⓘImportant traits for &'a mut I
pub fn remove_child(&mut self, child: Widget)
[src]
pub fn remove_widget(&mut self)
[src]
pub fn parent(&self) -> Option<Widget>
[src]
pub fn children(&self) -> Vec<Widget>
[src]
pub fn child(&self, name: &str) -> Option<Widget>
[src]
pub fn event<T: 'static>(&self, data: T)
[src]
pub fn event_subtree<T: 'static>(&self, data: T)
[src]
pub fn event_bubble_up<T: 'static>(&self, data: T)
[src]
pub fn trigger_event(&self, ui: &mut Ui, type_id: TypeId, event: &Any) -> bool
[src]
pub fn draw(&mut self, crop_to: Rect, renderer: &mut RenderBuilder, debug: bool)
[src]
pub fn is_under_cursor(&self, cursor: Point) -> bool
[src]
impl Widget
[src]
ⓘImportant traits for &'a mut Ipub fn linear_layout(&mut self, settings: LinearLayoutSettings) -> &mut Self
[src]
ⓘImportant traits for &'a mut I
Set this widgets container to be a LinearLayout
.
Children added to this widget will be arranged along one axis without overlapping.
ⓘImportant traits for &'a mut Ipub fn grid(&mut self, num_columns: usize) -> &mut Self
[src]
ⓘImportant traits for &'a mut I
Set this widgets container to be a GridLayout
.
Children added to this widget will be arranged in a grid.
impl Widget
[src]
ⓘImportant traits for &'a mut Ipub fn enable_hover(&mut self) -> &mut Self
[src]
ⓘImportant traits for &'a mut I
impl Widget
[src]
ⓘImportant traits for &'a mut Ipub fn make_focusable(&mut self) -> &mut Self
[src]
ⓘImportant traits for &'a mut I
impl Widget
[src]
ⓘImportant traits for &'a mut Ipub fn make_draggable(&mut self) -> &mut Self
[src]
ⓘImportant traits for &'a mut I
Make a widget receive drag events.
Trait Implementations
impl Clone for Widget
[src]
fn clone(&self) -> Widget
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq for Widget
[src]
fn eq(&self, other: &Widget) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl Eq for Widget
[src]
impl Hash for Widget
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Debug for Widget
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more