Trait wry::WebViewExtUnix
source · pub trait WebViewExtUnix: Sized {
// Required methods
fn new_gtk<W>(widget: &W) -> Result<Self>
where W: IsA<Container>;
fn webview(&self) -> WebView;
fn reparent<W>(&self, widget: &W) -> Result<()>
where W: IsA<Container>;
}
Expand description
Additional methods on WebView
that are specific to Linux.
Required Methods§
sourcefn new_gtk<W>(widget: &W) -> Result<Self>
fn new_gtk<W>(widget: &W) -> Result<Self>
Create the webview inside a GTK container widget, such as GTK window.
- If the container is
gtk::Box
, it is added usingBox::pack_start(webview, true, true, 0)
. - If the container is
gtk::Fixed
, its size request will be set using the (width, height) bounds passed in and will be added to the container usingFixed::put
using the (x, y) bounds passed in. - For all other containers, it will be added using
gtk::prelude::ContainerExt::add
§Panics:
- Panics if
gtk::init
was not called in this thread.
Object Safety§
This trait is not object safe.