Struct objc2_ui_kit::NSLayoutManager
source · #[repr(C)]pub struct NSLayoutManager { /* private fields */ }
Available on crate feature
NSLayoutManager
only.Implementations§
source§impl NSLayoutManager
impl NSLayoutManager
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>
pub unsafe fn initWithCoder( this: Allocated<Self>, coder: &NSCoder ) -> Option<Retained<Self>>
pub unsafe fn textStorage(&self) -> Option<Retained<NSTextStorage>>
Available on crate feature
NSTextStorage
only.pub unsafe fn setTextStorage(&self, text_storage: Option<&NSTextStorage>)
Available on crate feature
NSTextStorage
only.pub unsafe fn textContainers(&self) -> Retained<NSArray<NSTextContainer>>
Available on crate feature
NSTextContainer
only.pub unsafe fn addTextContainer(&self, container: &NSTextContainer)
Available on crate feature
NSTextContainer
only.pub unsafe fn insertTextContainer_atIndex( &self, container: &NSTextContainer, index: NSUInteger )
Available on crate feature
NSTextContainer
only.pub unsafe fn removeTextContainerAtIndex(&self, index: NSUInteger)
pub unsafe fn textContainerChangedGeometry(&self, container: &NSTextContainer)
Available on crate feature
NSTextContainer
only.pub unsafe fn delegate( &self ) -> Option<Retained<ProtocolObject<dyn NSLayoutManagerDelegate>>>
pub unsafe fn setDelegate( &self, delegate: Option<&ProtocolObject<dyn NSLayoutManagerDelegate>> )
pub unsafe fn showsInvisibleCharacters(&self) -> bool
pub unsafe fn setShowsInvisibleCharacters( &self, shows_invisible_characters: bool )
pub unsafe fn showsControlCharacters(&self) -> bool
pub unsafe fn setShowsControlCharacters(&self, shows_control_characters: bool)
pub unsafe fn usesFontLeading(&self) -> bool
pub unsafe fn setUsesFontLeading(&self, uses_font_leading: bool)
pub unsafe fn allowsNonContiguousLayout(&self) -> bool
pub unsafe fn setAllowsNonContiguousLayout( &self, allows_non_contiguous_layout: bool )
pub unsafe fn hasNonContiguousLayout(&self) -> bool
pub unsafe fn limitsLayoutForSuspiciousContents(&self) -> bool
pub unsafe fn setLimitsLayoutForSuspiciousContents( &self, limits_layout_for_suspicious_contents: bool )
pub unsafe fn usesDefaultHyphenation(&self) -> bool
pub unsafe fn setUsesDefaultHyphenation(&self, uses_default_hyphenation: bool)
pub unsafe fn invalidateGlyphsForCharacterRange_changeInLength_actualCharacterRange( &self, char_range: NSRange, delta: NSInteger, actual_char_range: NSRangePointer )
pub unsafe fn invalidateLayoutForCharacterRange_actualCharacterRange( &self, char_range: NSRange, actual_char_range: NSRangePointer )
pub unsafe fn invalidateDisplayForCharacterRange(&self, char_range: NSRange)
pub unsafe fn invalidateDisplayForGlyphRange(&self, glyph_range: NSRange)
pub unsafe fn processEditingForTextStorage_edited_range_changeInLength_invalidatedRange( &self, text_storage: &NSTextStorage, edit_mask: NSTextStorageEditActions, new_char_range: NSRange, delta: NSInteger, invalidated_char_range: NSRange )
Available on crate feature
NSTextStorage
only.pub unsafe fn ensureGlyphsForCharacterRange(&self, char_range: NSRange)
pub unsafe fn ensureGlyphsForGlyphRange(&self, glyph_range: NSRange)
pub unsafe fn ensureLayoutForCharacterRange(&self, char_range: NSRange)
pub unsafe fn ensureLayoutForGlyphRange(&self, glyph_range: NSRange)
pub unsafe fn ensureLayoutForTextContainer(&self, container: &NSTextContainer)
Available on crate feature
NSTextContainer
only.pub unsafe fn ensureLayoutForBoundingRect_inTextContainer( &self, bounds: CGRect, container: &NSTextContainer )
Available on crate feature
NSTextContainer
only.pub unsafe fn numberOfGlyphs(&self) -> NSUInteger
pub unsafe fn isValidGlyphIndex(&self, glyph_index: NSUInteger) -> bool
pub unsafe fn propertyForGlyphAtIndex( &self, glyph_index: NSUInteger ) -> NSGlyphProperty
pub unsafe fn characterIndexForGlyphAtIndex( &self, glyph_index: NSUInteger ) -> NSUInteger
pub unsafe fn glyphIndexForCharacterAtIndex( &self, char_index: NSUInteger ) -> NSUInteger
pub unsafe fn setTextContainer_forGlyphRange( &self, container: &NSTextContainer, glyph_range: NSRange )
Available on crate feature
NSTextContainer
only.pub unsafe fn setLineFragmentRect_forGlyphRange_usedRect( &self, fragment_rect: CGRect, glyph_range: NSRange, used_rect: CGRect )
pub unsafe fn setExtraLineFragmentRect_usedRect_textContainer( &self, fragment_rect: CGRect, used_rect: CGRect, container: &NSTextContainer )
Available on crate feature
NSTextContainer
only.pub unsafe fn setLocation_forStartOfGlyphRange( &self, location: CGPoint, glyph_range: NSRange )
pub unsafe fn setNotShownAttribute_forGlyphAtIndex( &self, flag: bool, glyph_index: NSUInteger )
pub unsafe fn setDrawsOutsideLineFragment_forGlyphAtIndex( &self, flag: bool, glyph_index: NSUInteger )
pub unsafe fn setAttachmentSize_forGlyphRange( &self, attachment_size: CGSize, glyph_range: NSRange )
pub unsafe fn getFirstUnlaidCharacterIndex_glyphIndex( &self, char_index: *mut NSUInteger, glyph_index: *mut NSUInteger )
pub unsafe fn firstUnlaidCharacterIndex(&self) -> NSUInteger
pub unsafe fn firstUnlaidGlyphIndex(&self) -> NSUInteger
pub unsafe fn textContainerForGlyphAtIndex_effectiveRange( &self, glyph_index: NSUInteger, effective_glyph_range: NSRangePointer ) -> Option<Retained<NSTextContainer>>
Available on crate feature
NSTextContainer
only.pub unsafe fn textContainerForGlyphAtIndex_effectiveRange_withoutAdditionalLayout( &self, glyph_index: NSUInteger, effective_glyph_range: NSRangePointer, flag: bool ) -> Option<Retained<NSTextContainer>>
Available on crate feature
NSTextContainer
only.pub unsafe fn usedRectForTextContainer( &self, container: &NSTextContainer ) -> CGRect
Available on crate feature
NSTextContainer
only.pub unsafe fn lineFragmentRectForGlyphAtIndex_effectiveRange( &self, glyph_index: NSUInteger, effective_glyph_range: NSRangePointer ) -> CGRect
pub unsafe fn lineFragmentRectForGlyphAtIndex_effectiveRange_withoutAdditionalLayout( &self, glyph_index: NSUInteger, effective_glyph_range: NSRangePointer, flag: bool ) -> CGRect
pub unsafe fn lineFragmentUsedRectForGlyphAtIndex_effectiveRange( &self, glyph_index: NSUInteger, effective_glyph_range: NSRangePointer ) -> CGRect
pub unsafe fn lineFragmentUsedRectForGlyphAtIndex_effectiveRange_withoutAdditionalLayout( &self, glyph_index: NSUInteger, effective_glyph_range: NSRangePointer, flag: bool ) -> CGRect
pub unsafe fn extraLineFragmentRect(&self) -> CGRect
pub unsafe fn extraLineFragmentUsedRect(&self) -> CGRect
pub unsafe fn extraLineFragmentTextContainer( &self ) -> Option<Retained<NSTextContainer>>
Available on crate feature
NSTextContainer
only.pub unsafe fn locationForGlyphAtIndex(&self, glyph_index: NSUInteger) -> CGPoint
pub unsafe fn notShownAttributeForGlyphAtIndex( &self, glyph_index: NSUInteger ) -> bool
pub unsafe fn drawsOutsideLineFragmentForGlyphAtIndex( &self, glyph_index: NSUInteger ) -> bool
pub unsafe fn attachmentSizeForGlyphAtIndex( &self, glyph_index: NSUInteger ) -> CGSize
pub unsafe fn truncatedGlyphRangeInLineFragmentForGlyphAtIndex( &self, glyph_index: NSUInteger ) -> NSRange
pub unsafe fn glyphRangeForCharacterRange_actualCharacterRange( &self, char_range: NSRange, actual_char_range: NSRangePointer ) -> NSRange
pub unsafe fn characterRangeForGlyphRange_actualGlyphRange( &self, glyph_range: NSRange, actual_glyph_range: NSRangePointer ) -> NSRange
pub unsafe fn glyphRangeForTextContainer( &self, container: &NSTextContainer ) -> NSRange
Available on crate feature
NSTextContainer
only.pub unsafe fn rangeOfNominallySpacedGlyphsContainingIndex( &self, glyph_index: NSUInteger ) -> NSRange
pub unsafe fn boundingRectForGlyphRange_inTextContainer( &self, glyph_range: NSRange, container: &NSTextContainer ) -> CGRect
Available on crate feature
NSTextContainer
only.pub unsafe fn glyphRangeForBoundingRect_inTextContainer( &self, bounds: CGRect, container: &NSTextContainer ) -> NSRange
Available on crate feature
NSTextContainer
only.pub unsafe fn glyphRangeForBoundingRectWithoutAdditionalLayout_inTextContainer( &self, bounds: CGRect, container: &NSTextContainer ) -> NSRange
Available on crate feature
NSTextContainer
only.pub unsafe fn glyphIndexForPoint_inTextContainer( &self, point: CGPoint, container: &NSTextContainer ) -> NSUInteger
Available on crate feature
NSTextContainer
only.pub unsafe fn fractionOfDistanceThroughGlyphForPoint_inTextContainer( &self, point: CGPoint, container: &NSTextContainer ) -> CGFloat
Available on crate feature
NSTextContainer
only.pub unsafe fn characterIndexForPoint_inTextContainer_fractionOfDistanceBetweenInsertionPoints( &self, point: CGPoint, container: &NSTextContainer, partial_fraction: *mut CGFloat ) -> NSUInteger
Available on crate feature
NSTextContainer
only.pub unsafe fn getLineFragmentInsertionPointsForCharacterAtIndex_alternatePositions_inDisplayOrder_positions_characterIndexes( &self, char_index: NSUInteger, a_flag: bool, d_flag: bool, positions: *mut CGFloat, char_indexes: *mut NSUInteger ) -> NSUInteger
pub unsafe fn enumerateLineFragmentsForGlyphRange_usingBlock( &self, glyph_range: NSRange, block: &Block<dyn Fn(CGRect, CGRect, NonNull<NSTextContainer>, NSRange, NonNull<Bool>)> )
Available on crate features
NSTextContainer
and block2
only.pub unsafe fn enumerateEnclosingRectsForGlyphRange_withinSelectedGlyphRange_inTextContainer_usingBlock( &self, glyph_range: NSRange, selected_range: NSRange, text_container: &NSTextContainer, block: &Block<dyn Fn(CGRect, NonNull<Bool>)> )
Available on crate features
NSTextContainer
and block2
only.pub unsafe fn drawBackgroundForGlyphRange_atPoint( &self, glyphs_to_show: NSRange, origin: CGPoint )
pub unsafe fn drawGlyphsForGlyphRange_atPoint( &self, glyphs_to_show: NSRange, origin: CGPoint )
pub unsafe fn fillBackgroundRectArray_count_forCharacterRange_color( &self, rect_array: NonNull<CGRect>, rect_count: NSUInteger, char_range: NSRange, color: &UIColor )
Available on crate feature
UIColor
only.pub unsafe fn drawUnderlineForGlyphRange_underlineType_baselineOffset_lineFragmentRect_lineFragmentGlyphRange_containerOrigin( &self, glyph_range: NSRange, underline_val: NSUnderlineStyle, baseline_offset: CGFloat, line_rect: CGRect, line_glyph_range: NSRange, container_origin: CGPoint )
Available on crate feature
NSAttributedString
only.pub unsafe fn underlineGlyphRange_underlineType_lineFragmentRect_lineFragmentGlyphRange_containerOrigin( &self, glyph_range: NSRange, underline_val: NSUnderlineStyle, line_rect: CGRect, line_glyph_range: NSRange, container_origin: CGPoint )
Available on crate feature
NSAttributedString
only.pub unsafe fn drawStrikethroughForGlyphRange_strikethroughType_baselineOffset_lineFragmentRect_lineFragmentGlyphRange_containerOrigin( &self, glyph_range: NSRange, strikethrough_val: NSUnderlineStyle, baseline_offset: CGFloat, line_rect: CGRect, line_glyph_range: NSRange, container_origin: CGPoint )
Available on crate feature
NSAttributedString
only.pub unsafe fn strikethroughGlyphRange_strikethroughType_lineFragmentRect_lineFragmentGlyphRange_containerOrigin( &self, glyph_range: NSRange, strikethrough_val: NSUnderlineStyle, line_rect: CGRect, line_glyph_range: NSRange, container_origin: CGPoint )
Available on crate feature
NSAttributedString
only.source§impl NSLayoutManager
impl NSLayoutManager
Methods declared on superclass NSObject
source§impl NSLayoutManager
impl NSLayoutManager
NSLayoutManagerDeprecated
pub unsafe fn hyphenationFactor(&self) -> CGFloat
👎Deprecated: Please use usesDefaultHyphenation or -[NSParagraphStyle hyphenationFactor] instead.
pub unsafe fn setHyphenationFactor(&self, hyphenation_factor: CGFloat)
👎Deprecated: Please use usesDefaultHyphenation or -[NSParagraphStyle hyphenationFactor] instead.
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 UIIndirectScribbleInteraction
only.
pub fn class(&self) -> &'static AnyClass
UIIndirectScribbleInteraction
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 UIIndirectScribbleInteraction
only.
pub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
Ivar::load
instead.UIIndirectScribbleInteraction
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 UIIndirectScribbleInteraction
only.
pub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
Ivar::load_mut
instead.UIIndirectScribbleInteraction
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 NSLayoutManager
impl AsMut<AnyObject> for NSLayoutManager
source§impl AsMut<NSLayoutManager> for NSLayoutManager
impl AsMut<NSLayoutManager> for NSLayoutManager
source§impl AsMut<NSObject> for NSLayoutManager
impl AsMut<NSObject> for NSLayoutManager
source§impl AsRef<AnyObject> for NSLayoutManager
impl AsRef<AnyObject> for NSLayoutManager
source§impl AsRef<NSLayoutManager> for NSLayoutManager
impl AsRef<NSLayoutManager> for NSLayoutManager
source§impl AsRef<NSObject> for NSLayoutManager
impl AsRef<NSObject> for NSLayoutManager
source§impl Borrow<AnyObject> for NSLayoutManager
impl Borrow<AnyObject> for NSLayoutManager
source§impl Borrow<NSObject> for NSLayoutManager
impl Borrow<NSObject> for NSLayoutManager
source§impl BorrowMut<AnyObject> for NSLayoutManager
impl BorrowMut<AnyObject> for NSLayoutManager
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<NSObject> for NSLayoutManager
impl BorrowMut<NSObject> for NSLayoutManager
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 NSLayoutManager
impl ClassType for NSLayoutManager
§type Mutability = InteriorMutable
type Mutability = InteriorMutable
Whether the type is mutable or immutable. Read more
source§const NAME: &'static str = "NSLayoutManager"
const NAME: &'static str = "NSLayoutManager"
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 NSLayoutManager
impl Debug for NSLayoutManager
source§impl Deref for NSLayoutManager
impl Deref for NSLayoutManager
source§impl DerefMut for NSLayoutManager
impl DerefMut for NSLayoutManager
source§impl Hash for NSLayoutManager
impl Hash for NSLayoutManager
source§impl NSCoding for NSLayoutManager
impl NSCoding for NSLayoutManager
source§impl NSObjectProtocol for NSLayoutManager
impl NSObjectProtocol for NSLayoutManager
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) -> Retained<NSObject>
fn debugDescription(&self) -> Retained<NSObject>
A textual representation of the object to use when debugging. Read more
source§impl NSSecureCoding for NSLayoutManager
impl NSSecureCoding for NSLayoutManager
source§impl PartialEq for NSLayoutManager
impl PartialEq for NSLayoutManager
source§fn eq(&self, other: &NSLayoutManager) -> bool
fn eq(&self, other: &NSLayoutManager) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl RefEncode for NSLayoutManager
impl RefEncode for NSLayoutManager
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 NSLayoutManager
impl Message for NSLayoutManager
impl StructuralPartialEq for NSLayoutManager
Auto Trait Implementations§
impl !Freeze for NSLayoutManager
impl !RefUnwindSafe for NSLayoutManager
impl !Send for NSLayoutManager
impl !Sync for NSLayoutManager
impl !Unpin for NSLayoutManager
impl !UnwindSafe for NSLayoutManager
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