[−][src]Struct pixel_widgets::backend::wgpu::Ui
Wrapper for Ui that adds wgpu rendering.
Requires the "wgpu" feature.
Implementations
impl<M: Model, E: 'static + EventLoop<Command<M::Message>>, L: 'static + Loader> Ui<M, E, L>[src]
pub fn new(
model: M,
event_loop: E,
loader: L,
viewport: Rectangle,
format: TextureFormat,
device: &Device
) -> Self[src]
model: M,
event_loop: E,
loader: L,
viewport: Rectangle,
format: TextureFormat,
device: &Device
) -> Self
Constructs a new Ui using the default style.
This is not recommended as the default style is very empty and only renders white text.
pub fn draw<'a>(
&'a mut self,
device: &Device,
queue: &Queue,
render_pass: &mut RenderPass<'a>
)[src]
&'a mut self,
device: &Device,
queue: &Queue,
render_pass: &mut RenderPass<'a>
)
Generate a DrawList for the view.
Methods from Deref<Target = Ui<M, E, L>>
pub async fn set_stylesheet<U: AsRef<str>>(
&mut self,
url: U
) -> Result<(), Error>[src]
&mut self,
url: U
) -> Result<(), Error>
Constructs a new Ui asynchronously by first fetching a stylesheet from a
.pwss data source.
pub fn replace_stylesheet(&mut self, style: Arc<Style>)[src]
Replace the current stylesheet with a loaded new stylesheet
pub fn reload_stylesheet<U: 'static + AsRef<str> + Send>(&mut self, url: U)[src]
Replace the current stylesheet with a new one
pub fn graphics(&self) -> Graphics<L>[src]
Get a Graphics loader
pub fn resize(&mut self, viewport: Rectangle)[src]
Resizes the viewport. This forces the view to be rerendered.
pub fn command(&mut self, command: Command<M::Message>)[src]
Updates the model after a Command has resolved.
pub fn update(&mut self, message: M::Message)[src]
Updates the model with a message. This forces the view to be rerendered.
pub fn event(&mut self, event: Event)[src]
Handles an Event.
pub fn needs_redraw(&self) -> bool[src]
Returns true if the ui needs to be redrawn. If the ui doesn't need to be redrawn the
Commands from the last draw may be used again.
pub fn draw(&mut self) -> DrawList[src]
Generate a DrawList for the view.
Trait Implementations
impl<M: Model, E: EventLoop<Command<M::Message>>, L: Loader> Deref for Ui<M, E, L>[src]
type Target = Ui<M, E, L>
The resulting type after dereferencing.
pub fn deref(&self) -> &Self::Target[src]
impl<M: Model, E: EventLoop<Command<M::Message>>, L: Loader> DerefMut for Ui<M, E, L>[src]
Auto Trait Implementations
impl<M, E, L> !RefUnwindSafe for Ui<M, E, L>[src]
impl<M, E, L> Send for Ui<M, E, L> where
M: Send, [src]
M: Send,
impl<M, E, L> Sync for Ui<M, E, L> where
E: Sync,
M: Sync, [src]
E: Sync,
M: Sync,
impl<M, E, L> Unpin for Ui<M, E, L> where
E: Unpin, [src]
E: Unpin,
impl<M, E, L> !UnwindSafe for Ui<M, E, L>[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
T: Any,
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> From<T> for T[src]
impl<T> Instrument for T[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
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>,