pub trait INSView: INSResponder {
Show 19 methods
// Provided methods
fn m_init_with_frame(frame: NSRect) -> Self
where Self: Sized + FromId { ... }
fn m_init_with_coder(coder: NSCoder) -> Self
where Self: Sized + FromId { ... }
fn m_prepare_for_reuse(&self) { ... }
fn p_superview(&self) -> NSView { ... }
fn p_subviews<V>(&self) -> NSArray<V>
where V: INSView { ... }
fn p_window(&self) -> NSWindow { ... }
fn p_opaque_ancestor(&self) -> Self
where Self: Sized + FromId { ... }
fn p_is_descendant_of(&self, view: NSView) -> bool { ... }
fn p_ancestor_shared_with_view(&self, view: NSView) -> NSView { ... }
fn p_enclosing_menu_item(&self) -> NSMenuItem { ... }
fn p_add_subview<V>(&self, view: V)
where V: INSView { ... }
fn p_bounds(&self) -> NSRect { ... }
fn p_set_bounds(&self, bounds: NSRect) { ... }
fn p_requires_constraint_based_layout() -> bool { ... }
fn p_translates_autoresizing_mask_to_constraints(&self) -> bool { ... }
fn p_set_translates_autoresizing_mask_to_constraints(&self, flag: bool) { ... }
fn p_bottom_anchor(&self) -> NSLayoutYAxisAnchor { ... }
fn p_center_x_anchor(&self) -> NSLayoutXAxisAnchor { ... }
fn p_center_y_anchor(&self) -> NSLayoutYAxisAnchor { ... }
}
Expand description
A trait containing all the methods for NSView
Provided Methods§
Sourcefn m_init_with_frame(frame: NSRect) -> Self
fn m_init_with_frame(frame: NSRect) -> Self
Initializes and returns a newly allocated NSView object with a specified frame rectangle.
Sourcefn m_init_with_coder(coder: NSCoder) -> Self
fn m_init_with_coder(coder: NSCoder) -> Self
Initializes a view using from data in the specified coder object.
Sourcefn m_prepare_for_reuse(&self)
fn m_prepare_for_reuse(&self)
Restores the view to an initial state so that it can be reused.
Sourcefn p_superview(&self) -> NSView
fn p_superview(&self) -> NSView
The view that is the parent of the current view.
Sourcefn p_subviews<V>(&self) -> NSArray<V>where
V: INSView,
fn p_subviews<V>(&self) -> NSArray<V>where
V: INSView,
The array of views embedded in the current view.
Sourcefn p_opaque_ancestor(&self) -> Self
fn p_opaque_ancestor(&self) -> Self
The view’s closest opaque ancestor, which might be the view itself.
Sourcefn p_is_descendant_of(&self, view: NSView) -> bool
fn p_is_descendant_of(&self, view: NSView) -> bool
Returns a Boolean value that indicates whether the view is a subview of the specified view.
Returns the closest ancestor shared by the view and another specified view.
The menu item containing the view or any of its superviews in the view hierarchy.
Sourcefn p_add_subview<V>(&self, view: V)where
V: INSView,
fn p_add_subview<V>(&self, view: V)where
V: INSView,
Adds a view to the view’s subviews so it’s displayed above its siblings.
Sourcefn p_bounds(&self) -> NSRect
fn p_bounds(&self) -> NSRect
The view’s bounds rectangle, which expresses its location and size in its own coordinate system.
Sourcefn p_set_bounds(&self, bounds: NSRect)
fn p_set_bounds(&self, bounds: NSRect)
Sets the view’s bounds rectangle, which expresses its location and size in its own coordinate system.
§Arguments
bounds
- The new bounds rectangle.
Sourcefn p_requires_constraint_based_layout() -> bool
fn p_requires_constraint_based_layout() -> bool
Returns a Boolean value indicating whether the view depends on the constraint-based layout system.
Sourcefn p_translates_autoresizing_mask_to_constraints(&self) -> bool
fn p_translates_autoresizing_mask_to_constraints(&self) -> bool
A Boolean value indicating whether the view’s autoresizing mask is translated into constraints for the constraint-based layout system.
Sourcefn p_set_translates_autoresizing_mask_to_constraints(&self, flag: bool)
fn p_set_translates_autoresizing_mask_to_constraints(&self, flag: bool)
Sets a Boolean value indicating whether the view’s autoresizing mask is translated into constraints for the constraint-based layout system.
§Arguments
flag
- The new value.
Sourcefn p_bottom_anchor(&self) -> NSLayoutYAxisAnchor
fn p_bottom_anchor(&self) -> NSLayoutYAxisAnchor
A layout anchor representing the bottom edge of the view’s frame.
Sourcefn p_center_x_anchor(&self) -> NSLayoutXAxisAnchor
fn p_center_x_anchor(&self) -> NSLayoutXAxisAnchor
A layout anchor representing the horizontal center of the view’s frame.
Sourcefn p_center_y_anchor(&self) -> NSLayoutYAxisAnchor
fn p_center_y_anchor(&self) -> NSLayoutYAxisAnchor
A layout anchor representing the vertical center of the view’s frame.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.