Trait INSView

Source
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§

Source

fn m_init_with_frame(frame: NSRect) -> Self
where Self: Sized + FromId,

Initializes and returns a newly allocated NSView object with a specified frame rectangle.

Source

fn m_init_with_coder(coder: NSCoder) -> Self
where Self: Sized + FromId,

Initializes a view using from data in the specified coder object.

Source

fn m_prepare_for_reuse(&self)

Restores the view to an initial state so that it can be reused.

Source

fn p_superview(&self) -> NSView

The view that is the parent of the current view.

Source

fn p_subviews<V>(&self) -> NSArray<V>
where V: INSView,

The array of views embedded in the current view.

Source

fn p_window(&self) -> NSWindow

The view’s window object, if it is installed in a window.

Source

fn p_opaque_ancestor(&self) -> Self
where Self: Sized + FromId,

The view’s closest opaque ancestor, which might be the view itself.

Source

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.

Source

fn p_ancestor_shared_with_view(&self, view: NSView) -> NSView

Returns the closest ancestor shared by the view and another specified view.

Source

fn p_enclosing_menu_item(&self) -> NSMenuItem

The menu item containing the view or any of its superviews in the view hierarchy.

Source

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.

Source

fn p_bounds(&self) -> NSRect

The view’s bounds rectangle, which expresses its location and size in its own coordinate system.

Source

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.
Source

fn p_requires_constraint_based_layout() -> bool

Returns a Boolean value indicating whether the view depends on the constraint-based layout system.

Source

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.

Source

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.
Source

fn p_bottom_anchor(&self) -> NSLayoutYAxisAnchor

A layout anchor representing the bottom edge of the view’s frame.

Source

fn p_center_x_anchor(&self) -> NSLayoutXAxisAnchor

A layout anchor representing the horizontal center of the view’s frame.

Source

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.

Implementors§