pub struct WebView<T = ()> {Show 15 fields
pub is_handle: bool,
pub objc: ObjcProperty,
pub layer: Layer,
pub objc_delegate: Option<ShareId<Object>>,
pub delegate: Option<Box<T>>,
pub top: LayoutAnchorY,
pub leading: LayoutAnchorX,
pub left: LayoutAnchorX,
pub trailing: LayoutAnchorX,
pub right: LayoutAnchorX,
pub bottom: LayoutAnchorY,
pub width: LayoutAnchorDimension,
pub height: LayoutAnchorDimension,
pub center_x: LayoutAnchorX,
pub center_y: LayoutAnchorY,
}webview only.Fields
is_handle: boolAn internal flag for whether an instance of a Viewfalse - if that one drops, we need to know to
do some extra cleanup.
objc: ObjcPropertyA pointer to the Objective-C runtime view controller.
layer: LayerA reference to the underlying CALayer.
objc_delegate: Option<ShareId<Object>>We need to store the underlying delegate separately from the WKWebView - this is a where
we do so.
delegate: Option<Box<T>>A pointer to the delegate for this view.
top: LayoutAnchorYA pointer to the Objective-C runtime top layout constraint.
leading: LayoutAnchorXA pointer to the Objective-C runtime leading layout constraint.
left: LayoutAnchorXA pointer to the Objective-C runtime left layout constraint.
trailing: LayoutAnchorXA pointer to the Objective-C runtime trailing layout constraint.
right: LayoutAnchorXA pointer to the Objective-C runtime right layout constraint.
bottom: LayoutAnchorYA pointer to the Objective-C runtime bottom layout constraint.
width: LayoutAnchorDimensionA pointer to the Objective-C runtime width layout constraint.
height: LayoutAnchorDimensionA pointer to the Objective-C runtime height layout constraint.
center_x: LayoutAnchorXA pointer to the Objective-C runtime center X layout constraint.
center_y: LayoutAnchorYA pointer to the Objective-C runtime center Y layout constraint.
Implementations
sourceimpl WebView
impl WebView
sourcepub fn new(config: WebViewConfig) -> Self
pub fn new(config: WebViewConfig) -> Self
Returns a default WebView, suitable for customizing and displaying.
sourceimpl<T> WebView<T> where
T: WebViewDelegate + 'static,
impl<T> WebView<T> where
T: WebViewDelegate + 'static,
sourcepub fn with(config: WebViewConfig, delegate: T) -> WebView<T>
pub fn with(config: WebViewConfig, delegate: T) -> WebView<T>
Initializes a new WebView with a given WebViewDelegate. This enables you to respond to events
and customize the view as a module, similar to class-based systems.
Trait Implementations
sourceimpl<T> Layout for WebView<T>
impl<T> Layout for WebView<T>
sourcefn add_subview<V: Layout>(&self, _: &V)
fn add_subview<V: Layout>(&self, _: &V)
Currently, this is a noop. Theoretically there is reason to support this, but in practice I’ve never seen it needed… but am open to discussion.
sourcefn set_needs_display(&self, needs_display: bool)
fn set_needs_display(&self, needs_display: bool)
Sets whether this needs to be redrawn before being displayed. Read more
sourcefn remove_from_superview(&self)
fn remove_from_superview(&self)
Removes a control or view from the superview.
sourcefn set_frame<R: Into<CGRect>>(&self, rect: R)
fn set_frame<R: Into<CGRect>>(&self, rect: R)
Sets the frame for the view this trait is applied to. Read more
sourcefn set_translates_autoresizing_mask_into_constraints(&self, translates: bool)
fn set_translates_autoresizing_mask_into_constraints(&self, translates: bool)
Sets whether the view for this trait should translate autoresizing masks into layout constraints. Read more
Sets whether the view for this is hidden or not. Read more
Returns whether this is hidden or not. Read more
Returns whether this is hidden, or whether an ancestor view is hidden.
sourcefn register_for_dragged_types(&self, types: &[PasteboardType])
fn register_for_dragged_types(&self, types: &[PasteboardType])
Register this view for drag and drop operations. Read more
sourcefn unregister_dragged_types(&self)
fn unregister_dragged_types(&self)
Unregisters this as a target for drag and drop operations. Read more
sourcefn set_posts_frame_change_notifications(&self, posts: bool)
fn set_posts_frame_change_notifications(&self, posts: bool)
Sets whether this posts notifications when the frame rectangle changes. Read more
sourcefn set_posts_bounds_change_notifications(&self, posts: bool)
fn set_posts_bounds_change_notifications(&self, posts: bool)
Sets whether this posts notifications when the bounds rectangle changes. Read more
Auto Trait Implementations
impl<T = ()> !RefUnwindSafe for WebView<T>
impl<T = ()> !Send for WebView<T>
impl<T = ()> !Sync for WebView<T>
impl<T> Unpin for WebView<T>
impl<T = ()> !UnwindSafe for WebView<T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more