Struct objc2_app_kit::NSCollectionViewLayout
source · #[repr(C)]pub struct NSCollectionViewLayout { /* private fields */ }
Available on crate feature
NSCollectionViewLayout
only.Implementations§
source§impl NSCollectionViewLayout
impl NSCollectionViewLayout
pub unsafe fn collectionView( &self, mtm: MainThreadMarker ) -> Option<Id<NSCollectionView>>
Available on crate features
NSCollectionView
and NSResponder
and NSView
only.pub unsafe fn invalidateLayout(&self)
pub unsafe fn invalidateLayoutWithContext( &self, context: &NSCollectionViewLayoutInvalidationContext )
pub unsafe fn registerClass_forDecorationViewOfKind( &self, view_class: Option<&AnyClass>, element_kind: &NSCollectionViewDecorationElementKind )
pub unsafe fn registerNib_forDecorationViewOfKind( &self, nib: Option<&NSNib>, element_kind: &NSCollectionViewDecorationElementKind )
Available on crate feature
NSNib
only.source§impl NSCollectionViewLayout
impl NSCollectionViewLayout
Methods declared on superclass NSObject
source§impl NSCollectionViewLayout
impl NSCollectionViewLayout
NSSubclassingHooks
pub unsafe fn layoutAttributesClass() -> &'static AnyClass
pub unsafe fn invalidationContextClass() -> &'static AnyClass
pub unsafe fn prepareLayout(&self)
pub unsafe fn layoutAttributesForElementsInRect( &self, rect: NSRect ) -> Id<NSArray<NSCollectionViewLayoutAttributes>>
pub unsafe fn layoutAttributesForItemAtIndexPath( &self, index_path: &NSIndexPath ) -> Option<Id<NSCollectionViewLayoutAttributes>>
pub unsafe fn layoutAttributesForSupplementaryViewOfKind_atIndexPath( &self, element_kind: &NSCollectionViewSupplementaryElementKind, index_path: &NSIndexPath ) -> Option<Id<NSCollectionViewLayoutAttributes>>
Available on crate feature
NSCollectionView
only.pub unsafe fn layoutAttributesForDecorationViewOfKind_atIndexPath( &self, element_kind: &NSCollectionViewDecorationElementKind, index_path: &NSIndexPath ) -> Option<Id<NSCollectionViewLayoutAttributes>>
pub unsafe fn layoutAttributesForDropTargetAtPoint( &self, point_in_collection_view: NSPoint ) -> Option<Id<NSCollectionViewLayoutAttributes>>
pub unsafe fn layoutAttributesForInterItemGapBeforeIndexPath( &self, index_path: &NSIndexPath ) -> Option<Id<NSCollectionViewLayoutAttributes>>
pub unsafe fn shouldInvalidateLayoutForBoundsChange( &self, new_bounds: NSRect ) -> bool
pub unsafe fn invalidationContextForBoundsChange( &self, new_bounds: NSRect ) -> Id<NSCollectionViewLayoutInvalidationContext>
pub unsafe fn shouldInvalidateLayoutForPreferredLayoutAttributes_withOriginalAttributes( &self, preferred_attributes: &NSCollectionViewLayoutAttributes, original_attributes: &NSCollectionViewLayoutAttributes ) -> bool
pub unsafe fn invalidationContextForPreferredLayoutAttributes_withOriginalAttributes( &self, preferred_attributes: &NSCollectionViewLayoutAttributes, original_attributes: &NSCollectionViewLayoutAttributes ) -> Id<NSCollectionViewLayoutInvalidationContext>
pub unsafe fn targetContentOffsetForProposedContentOffset_withScrollingVelocity( &self, proposed_content_offset: NSPoint, velocity: NSPoint ) -> NSPoint
pub unsafe fn targetContentOffsetForProposedContentOffset( &self, proposed_content_offset: NSPoint ) -> NSPoint
pub unsafe fn collectionViewContentSize(&self) -> NSSize
source§impl NSCollectionViewLayout
impl NSCollectionViewLayout
NSUpdateSupportHooks
pub unsafe fn prepareForCollectionViewUpdates( &self, update_items: &NSArray<NSCollectionViewUpdateItem> )
pub unsafe fn finalizeCollectionViewUpdates(&self)
pub unsafe fn prepareForAnimatedBoundsChange(&self, old_bounds: NSRect)
pub unsafe fn finalizeAnimatedBoundsChange(&self)
pub unsafe fn prepareForTransitionToLayout( &self, new_layout: &NSCollectionViewLayout )
pub unsafe fn prepareForTransitionFromLayout( &self, old_layout: &NSCollectionViewLayout )
pub unsafe fn finalizeLayoutTransition(&self)
pub unsafe fn initialLayoutAttributesForAppearingItemAtIndexPath( &self, item_index_path: &NSIndexPath ) -> Option<Id<NSCollectionViewLayoutAttributes>>
pub unsafe fn finalLayoutAttributesForDisappearingItemAtIndexPath( &self, item_index_path: &NSIndexPath ) -> Option<Id<NSCollectionViewLayoutAttributes>>
pub unsafe fn initialLayoutAttributesForAppearingSupplementaryElementOfKind_atIndexPath( &self, element_kind: &NSCollectionViewSupplementaryElementKind, element_index_path: &NSIndexPath ) -> Option<Id<NSCollectionViewLayoutAttributes>>
Available on crate feature
NSCollectionView
only.pub unsafe fn finalLayoutAttributesForDisappearingSupplementaryElementOfKind_atIndexPath( &self, element_kind: &NSCollectionViewSupplementaryElementKind, element_index_path: &NSIndexPath ) -> Option<Id<NSCollectionViewLayoutAttributes>>
Available on crate feature
NSCollectionView
only.pub unsafe fn initialLayoutAttributesForAppearingDecorationElementOfKind_atIndexPath( &self, element_kind: &NSCollectionViewDecorationElementKind, decoration_index_path: &NSIndexPath ) -> Option<Id<NSCollectionViewLayoutAttributes>>
pub unsafe fn finalLayoutAttributesForDisappearingDecorationElementOfKind_atIndexPath( &self, element_kind: &NSCollectionViewDecorationElementKind, decoration_index_path: &NSIndexPath ) -> Option<Id<NSCollectionViewLayoutAttributes>>
pub unsafe fn indexPathsToDeleteForSupplementaryViewOfKind( &self, element_kind: &NSCollectionViewSupplementaryElementKind ) -> Id<NSSet<NSIndexPath>>
Available on crate feature
NSCollectionView
only.pub unsafe fn indexPathsToDeleteForDecorationViewOfKind( &self, element_kind: &NSCollectionViewDecorationElementKind ) -> Id<NSSet<NSIndexPath>>
pub unsafe fn indexPathsToInsertForSupplementaryViewOfKind( &self, element_kind: &NSCollectionViewSupplementaryElementKind ) -> Id<NSSet<NSIndexPath>>
Available on crate feature
NSCollectionView
only.pub unsafe fn indexPathsToInsertForDecorationViewOfKind( &self, element_kind: &NSCollectionViewDecorationElementKind ) -> Id<NSSet<NSIndexPath>>
Methods from Deref<Target = NSObject>§
sourcepub fn doesNotRecognizeSelector(&self, sel: Sel) -> !
pub fn doesNotRecognizeSelector(&self, sel: Sel) -> !
Handle messages the object doesn’t recognize.
See Apple’s documentation for details.
Methods from Deref<Target = AnyObject>§
sourcepub fn class(&self) -> &'static AnyClass
Available on crate feature NSAccessibilityConstants
only.
pub fn class(&self) -> &'static AnyClass
NSAccessibilityConstants
only.Dynamically find the class of this object.
§Example
Check that an instance of NSObject
has the precise class NSObject
.
use objc2::ClassType;
use objc2::runtime::NSObject;
let obj = NSObject::new();
assert_eq!(obj.class(), NSObject::class());
sourcepub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
👎Deprecated: this is difficult to use correctly, use Ivar::load
instead.Available on crate feature NSAccessibilityConstants
only.
pub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
Ivar::load
instead.NSAccessibilityConstants
only.Use Ivar::load
instead.
§Safety
The object must have an instance variable with the given name, and it
must be of type T
.
See Ivar::load_ptr
for details surrounding this.
sourcepub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
👎Deprecated: this is difficult to use correctly, use Ivar::load_mut
instead.Available on crate feature NSAccessibilityConstants
only.
pub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
Ivar::load_mut
instead.NSAccessibilityConstants
only.Use Ivar::load_mut
instead.
§Safety
The object must have an instance variable with the given name, and it
must be of type T
.
See Ivar::load_ptr
for details surrounding this.
Trait Implementations§
source§impl AsMut<AnyObject> for NSCollectionViewLayout
impl AsMut<AnyObject> for NSCollectionViewLayout
source§impl AsMut<NSCollectionViewLayout> for NSCollectionViewCompositionalLayout
Available on crate feature NSCollectionViewCompositionalLayout
only.
impl AsMut<NSCollectionViewLayout> for NSCollectionViewCompositionalLayout
Available on crate feature
NSCollectionViewCompositionalLayout
only.source§fn as_mut(&mut self) -> &mut NSCollectionViewLayout
fn as_mut(&mut self) -> &mut NSCollectionViewLayout
Converts this type into a mutable reference of the (usually inferred) input type.
source§impl AsMut<NSCollectionViewLayout> for NSCollectionViewFlowLayout
Available on crate feature NSCollectionViewFlowLayout
only.
impl AsMut<NSCollectionViewLayout> for NSCollectionViewFlowLayout
Available on crate feature
NSCollectionViewFlowLayout
only.source§fn as_mut(&mut self) -> &mut NSCollectionViewLayout
fn as_mut(&mut self) -> &mut NSCollectionViewLayout
Converts this type into a mutable reference of the (usually inferred) input type.
source§impl AsMut<NSCollectionViewLayout> for NSCollectionViewGridLayout
Available on crate feature NSCollectionViewGridLayout
only.
impl AsMut<NSCollectionViewLayout> for NSCollectionViewGridLayout
Available on crate feature
NSCollectionViewGridLayout
only.source§fn as_mut(&mut self) -> &mut NSCollectionViewLayout
fn as_mut(&mut self) -> &mut NSCollectionViewLayout
Converts this type into a mutable reference of the (usually inferred) input type.
source§impl AsMut<NSCollectionViewLayout> for NSCollectionViewTransitionLayout
Available on crate feature NSCollectionViewTransitionLayout
only.
impl AsMut<NSCollectionViewLayout> for NSCollectionViewTransitionLayout
Available on crate feature
NSCollectionViewTransitionLayout
only.source§fn as_mut(&mut self) -> &mut NSCollectionViewLayout
fn as_mut(&mut self) -> &mut NSCollectionViewLayout
Converts this type into a mutable reference of the (usually inferred) input type.
source§impl AsMut<NSObject> for NSCollectionViewLayout
impl AsMut<NSObject> for NSCollectionViewLayout
source§impl AsRef<AnyObject> for NSCollectionViewLayout
impl AsRef<AnyObject> for NSCollectionViewLayout
source§impl AsRef<NSCollectionViewLayout> for NSCollectionViewCompositionalLayout
Available on crate feature NSCollectionViewCompositionalLayout
only.
impl AsRef<NSCollectionViewLayout> for NSCollectionViewCompositionalLayout
Available on crate feature
NSCollectionViewCompositionalLayout
only.source§fn as_ref(&self) -> &NSCollectionViewLayout
fn as_ref(&self) -> &NSCollectionViewLayout
Converts this type into a shared reference of the (usually inferred) input type.
source§impl AsRef<NSCollectionViewLayout> for NSCollectionViewFlowLayout
Available on crate feature NSCollectionViewFlowLayout
only.
impl AsRef<NSCollectionViewLayout> for NSCollectionViewFlowLayout
Available on crate feature
NSCollectionViewFlowLayout
only.source§fn as_ref(&self) -> &NSCollectionViewLayout
fn as_ref(&self) -> &NSCollectionViewLayout
Converts this type into a shared reference of the (usually inferred) input type.
source§impl AsRef<NSCollectionViewLayout> for NSCollectionViewGridLayout
Available on crate feature NSCollectionViewGridLayout
only.
impl AsRef<NSCollectionViewLayout> for NSCollectionViewGridLayout
Available on crate feature
NSCollectionViewGridLayout
only.source§fn as_ref(&self) -> &NSCollectionViewLayout
fn as_ref(&self) -> &NSCollectionViewLayout
Converts this type into a shared reference of the (usually inferred) input type.
source§impl AsRef<NSCollectionViewLayout> for NSCollectionViewTransitionLayout
Available on crate feature NSCollectionViewTransitionLayout
only.
impl AsRef<NSCollectionViewLayout> for NSCollectionViewTransitionLayout
Available on crate feature
NSCollectionViewTransitionLayout
only.source§fn as_ref(&self) -> &NSCollectionViewLayout
fn as_ref(&self) -> &NSCollectionViewLayout
Converts this type into a shared reference of the (usually inferred) input type.
source§impl AsRef<NSObject> for NSCollectionViewLayout
impl AsRef<NSObject> for NSCollectionViewLayout
source§impl Borrow<AnyObject> for NSCollectionViewLayout
impl Borrow<AnyObject> for NSCollectionViewLayout
source§impl Borrow<NSCollectionViewLayout> for NSCollectionViewCompositionalLayout
Available on crate feature NSCollectionViewCompositionalLayout
only.
impl Borrow<NSCollectionViewLayout> for NSCollectionViewCompositionalLayout
Available on crate feature
NSCollectionViewCompositionalLayout
only.source§fn borrow(&self) -> &NSCollectionViewLayout
fn borrow(&self) -> &NSCollectionViewLayout
Immutably borrows from an owned value. Read more
source§impl Borrow<NSCollectionViewLayout> for NSCollectionViewFlowLayout
Available on crate feature NSCollectionViewFlowLayout
only.
impl Borrow<NSCollectionViewLayout> for NSCollectionViewFlowLayout
Available on crate feature
NSCollectionViewFlowLayout
only.source§fn borrow(&self) -> &NSCollectionViewLayout
fn borrow(&self) -> &NSCollectionViewLayout
Immutably borrows from an owned value. Read more
source§impl Borrow<NSCollectionViewLayout> for NSCollectionViewGridLayout
Available on crate feature NSCollectionViewGridLayout
only.
impl Borrow<NSCollectionViewLayout> for NSCollectionViewGridLayout
Available on crate feature
NSCollectionViewGridLayout
only.source§fn borrow(&self) -> &NSCollectionViewLayout
fn borrow(&self) -> &NSCollectionViewLayout
Immutably borrows from an owned value. Read more
source§impl Borrow<NSCollectionViewLayout> for NSCollectionViewTransitionLayout
Available on crate feature NSCollectionViewTransitionLayout
only.
impl Borrow<NSCollectionViewLayout> for NSCollectionViewTransitionLayout
Available on crate feature
NSCollectionViewTransitionLayout
only.source§fn borrow(&self) -> &NSCollectionViewLayout
fn borrow(&self) -> &NSCollectionViewLayout
Immutably borrows from an owned value. Read more
source§impl Borrow<NSObject> for NSCollectionViewLayout
impl Borrow<NSObject> for NSCollectionViewLayout
source§impl BorrowMut<AnyObject> for NSCollectionViewLayout
impl BorrowMut<AnyObject> for NSCollectionViewLayout
source§fn borrow_mut(&mut self) -> &mut AnyObject
fn borrow_mut(&mut self) -> &mut AnyObject
Mutably borrows from an owned value. Read more
source§impl BorrowMut<NSCollectionViewLayout> for NSCollectionViewCompositionalLayout
Available on crate feature NSCollectionViewCompositionalLayout
only.
impl BorrowMut<NSCollectionViewLayout> for NSCollectionViewCompositionalLayout
Available on crate feature
NSCollectionViewCompositionalLayout
only.source§fn borrow_mut(&mut self) -> &mut NSCollectionViewLayout
fn borrow_mut(&mut self) -> &mut NSCollectionViewLayout
Mutably borrows from an owned value. Read more
source§impl BorrowMut<NSCollectionViewLayout> for NSCollectionViewFlowLayout
Available on crate feature NSCollectionViewFlowLayout
only.
impl BorrowMut<NSCollectionViewLayout> for NSCollectionViewFlowLayout
Available on crate feature
NSCollectionViewFlowLayout
only.source§fn borrow_mut(&mut self) -> &mut NSCollectionViewLayout
fn borrow_mut(&mut self) -> &mut NSCollectionViewLayout
Mutably borrows from an owned value. Read more
source§impl BorrowMut<NSCollectionViewLayout> for NSCollectionViewGridLayout
Available on crate feature NSCollectionViewGridLayout
only.
impl BorrowMut<NSCollectionViewLayout> for NSCollectionViewGridLayout
Available on crate feature
NSCollectionViewGridLayout
only.source§fn borrow_mut(&mut self) -> &mut NSCollectionViewLayout
fn borrow_mut(&mut self) -> &mut NSCollectionViewLayout
Mutably borrows from an owned value. Read more
source§impl BorrowMut<NSCollectionViewLayout> for NSCollectionViewTransitionLayout
Available on crate feature NSCollectionViewTransitionLayout
only.
impl BorrowMut<NSCollectionViewLayout> for NSCollectionViewTransitionLayout
Available on crate feature
NSCollectionViewTransitionLayout
only.source§fn borrow_mut(&mut self) -> &mut NSCollectionViewLayout
fn borrow_mut(&mut self) -> &mut NSCollectionViewLayout
Mutably borrows from an owned value. Read more
source§impl BorrowMut<NSObject> for NSCollectionViewLayout
impl BorrowMut<NSObject> for NSCollectionViewLayout
source§fn borrow_mut(&mut self) -> &mut NSObject
fn borrow_mut(&mut self) -> &mut NSObject
Mutably borrows from an owned value. Read more
source§impl ClassType for NSCollectionViewLayout
impl ClassType for NSCollectionViewLayout
§type Mutability = InteriorMutable
type Mutability = InteriorMutable
Whether the type is mutable or immutable. Read more
source§const NAME: &'static str = "NSCollectionViewLayout"
const NAME: &'static str = "NSCollectionViewLayout"
The name of the Objective-C class that this type represents. Read more
source§fn class() -> &'static AnyClass
fn class() -> &'static AnyClass
Get a reference to the Objective-C class that this type represents. Read more
source§fn as_super_mut(&mut self) -> &mut Self::Super
fn as_super_mut(&mut self) -> &mut Self::Super
Get a mutable reference to the superclass.
source§impl Debug for NSCollectionViewLayout
impl Debug for NSCollectionViewLayout
source§impl Deref for NSCollectionViewLayout
impl Deref for NSCollectionViewLayout
source§impl DerefMut for NSCollectionViewLayout
impl DerefMut for NSCollectionViewLayout
source§impl Hash for NSCollectionViewLayout
impl Hash for NSCollectionViewLayout
source§impl NSCoding for NSCollectionViewLayout
impl NSCoding for NSCollectionViewLayout
source§impl NSObjectProtocol for NSCollectionViewLayout
impl NSObjectProtocol for NSCollectionViewLayout
source§fn isEqual(&self, other: &AnyObject) -> bool
fn isEqual(&self, other: &AnyObject) -> bool
Check whether the object is equal to an arbitrary other object. Read more
source§fn hash(&self) -> usize
fn hash(&self) -> usize
An integer that can be used as a table address in a hash table
structure. Read more
source§fn isKindOfClass(&self, cls: &AnyClass) -> bool
fn isKindOfClass(&self, cls: &AnyClass) -> bool
Check if the object is an instance of the class, or one of its
subclasses. Read more
source§fn is_kind_of<T>(&self) -> bool
fn is_kind_of<T>(&self) -> bool
Check if the object is an instance of the class type, or one of its
subclasses. Read more
source§fn isMemberOfClass(&self, cls: &AnyClass) -> bool
fn isMemberOfClass(&self, cls: &AnyClass) -> bool
Check if the object is an instance of a specific class, without
checking subclasses. Read more
source§fn respondsToSelector(&self, aSelector: Sel) -> bool
fn respondsToSelector(&self, aSelector: Sel) -> bool
Check whether the object implements or inherits a method with the
given selector. Read more
source§fn conformsToProtocol(&self, aProtocol: &AnyProtocol) -> bool
fn conformsToProtocol(&self, aProtocol: &AnyProtocol) -> bool
Check whether the object conforms to a given protocol. Read more
source§fn debugDescription(&self) -> Id<NSObject>
fn debugDescription(&self) -> Id<NSObject>
A textual representation of the object to use when debugging. Read more
source§impl PartialEq for NSCollectionViewLayout
impl PartialEq for NSCollectionViewLayout
source§fn eq(&self, other: &NSCollectionViewLayout) -> bool
fn eq(&self, other: &NSCollectionViewLayout) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl RefEncode for NSCollectionViewLayout
impl RefEncode for NSCollectionViewLayout
source§const ENCODING_REF: Encoding = <NSObject as ::objc2::RefEncode>::ENCODING_REF
const ENCODING_REF: Encoding = <NSObject as ::objc2::RefEncode>::ENCODING_REF
The Objective-C type-encoding for a reference of this type. Read more
impl Eq for NSCollectionViewLayout
impl Message for NSCollectionViewLayout
impl StructuralPartialEq for NSCollectionViewLayout
Auto Trait Implementations§
impl !Freeze for NSCollectionViewLayout
impl !RefUnwindSafe for NSCollectionViewLayout
impl !Send for NSCollectionViewLayout
impl !Sync for NSCollectionViewLayout
impl !Unpin for NSCollectionViewLayout
impl !UnwindSafe for NSCollectionViewLayout
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CounterpartOrSelf for T
impl<T> CounterpartOrSelf for T
§type Immutable = <<T as ClassType>::Mutability as MutabilityCounterpartOrSelf<T>>::Immutable
type Immutable = <<T as ClassType>::Mutability as MutabilityCounterpartOrSelf<T>>::Immutable
The immutable counterpart of the type, or
Self
if the type has no
immutable counterpart. Read more§type Mutable = <<T as ClassType>::Mutability as MutabilityCounterpartOrSelf<T>>::Mutable
type Mutable = <<T as ClassType>::Mutability as MutabilityCounterpartOrSelf<T>>::Mutable
The mutable counterpart of the type, or
Self
if the type has no
mutable counterpart. Read more