pub struct HtmlWindow<'open> { /* private fields */ }
Expand description
A window capable of displaying HTML content inside.
It’s API mimics egui’s Window API.
Note: hframe
is automatically aware of this window.
Implementations§
Source§impl<'open> HtmlWindow<'open>
impl<'open> HtmlWindow<'open>
Sourcepub fn new(title: &str) -> Self
pub fn new(title: &str) -> Self
Create a new HtmlWindow.
This function mimics new
from egui’s Window. It takes the window title
which must be unique as it is used to compute the window id and also to
set ids for HTML elements. Check the id
method if you want to set a
different id.
Sourcepub fn content(self, content: &str) -> Self
pub fn content(self, content: &str) -> Self
Set/change the HTML content of the window.
The initially provided HTML will be used to generete the HTML element. As long as the HTML doesn’t change, this will not re-render the content.
If you change the content, then the HTML will be re-rendered which is useful if you need to display controlled and reactive content.
Auto Trait Implementations§
impl<'open> Freeze for HtmlWindow<'open>
impl<'open> RefUnwindSafe for HtmlWindow<'open>
impl<'open> Send for HtmlWindow<'open>
impl<'open> Sync for HtmlWindow<'open>
impl<'open> Unpin for HtmlWindow<'open>
impl<'open> !UnwindSafe for HtmlWindow<'open>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more