Trait wry::WebViewBuilderExtUnix
source · pub trait WebViewBuilderExtUnix<'a> {
// Required method
fn new_gtk<W>(widget: &'a W) -> Self
where W: IsA<Container>;
}
Required Methods§
sourcefn new_gtk<W>(widget: &'a W) -> Self
fn new_gtk<W>(widget: &'a W) -> 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.