Struct objc2_app_kit::NSTextLayoutManager
source · #[repr(C)]pub struct NSTextLayoutManager { /* private fields */ }Available on crate feature
NSTextLayoutManager only.Implementations§
source§impl NSTextLayoutManager
impl NSTextLayoutManager
pub unsafe fn init(this: Allocated<Self>) -> Id<Self>
pub unsafe fn initWithCoder( this: Allocated<Self>, coder: &NSCoder ) -> Option<Id<Self>>
pub unsafe fn delegate( &self ) -> Option<Id<ProtocolObject<dyn NSTextLayoutManagerDelegate>>>
pub unsafe fn setDelegate( &self, delegate: Option<&ProtocolObject<dyn NSTextLayoutManagerDelegate>> )
pub unsafe fn usesFontLeading(&self) -> bool
pub unsafe fn setUsesFontLeading(&self, uses_font_leading: bool)
pub unsafe fn limitsLayoutForSuspiciousContents(&self) -> bool
pub unsafe fn setLimitsLayoutForSuspiciousContents( &self, limits_layout_for_suspicious_contents: bool )
pub unsafe fn usesHyphenation(&self) -> bool
pub unsafe fn setUsesHyphenation(&self, uses_hyphenation: bool)
pub unsafe fn textContentManager(&self) -> Option<Id<NSTextContentManager>>
Available on crate feature
NSTextContentManager only.pub unsafe fn replaceTextContentManager( &self, text_content_manager: &NSTextContentManager )
Available on crate feature
NSTextContentManager only.pub unsafe fn textContainer(&self) -> Option<Id<NSTextContainer>>
Available on crate feature
NSTextContainer only.pub unsafe fn setTextContainer(&self, text_container: Option<&NSTextContainer>)
Available on crate feature
NSTextContainer only.pub unsafe fn usageBoundsForTextContainer(&self) -> CGRect
pub unsafe fn textViewportLayoutController( &self ) -> Id<NSTextViewportLayoutController>
Available on crate feature
NSTextViewportLayoutController only.pub unsafe fn layoutQueue(&self) -> Option<Id<NSOperationQueue>>
pub unsafe fn setLayoutQueue(&self, layout_queue: Option<&NSOperationQueue>)
pub unsafe fn ensureLayoutForRange(&self, range: &NSTextRange)
Available on crate feature
NSTextRange only.pub unsafe fn ensureLayoutForBounds(&self, bounds: CGRect)
pub unsafe fn invalidateLayoutForRange(&self, range: &NSTextRange)
Available on crate feature
NSTextRange only.pub unsafe fn textLayoutFragmentForPosition( &self, position: CGPoint ) -> Option<Id<NSTextLayoutFragment>>
Available on crate feature
NSTextLayoutFragment only.pub unsafe fn textLayoutFragmentForLocation( &self, location: &ProtocolObject<dyn NSTextLocation> ) -> Option<Id<NSTextLayoutFragment>>
Available on crate features
NSTextLayoutFragment and NSTextRange only.pub unsafe fn enumerateTextLayoutFragmentsFromLocation_options_usingBlock( &self, location: Option<&ProtocolObject<dyn NSTextLocation>>, options: NSTextLayoutFragmentEnumerationOptions, block: &Block<dyn Fn(NonNull<NSTextLayoutFragment>) -> Bool + '_> ) -> Option<Id<ProtocolObject<dyn NSTextLocation>>>
Available on crate features
NSTextLayoutFragment and NSTextRange and block2 only.pub unsafe fn textSelections(&self) -> Id<NSArray<NSTextSelection>>
Available on crate feature
NSTextSelection only.pub unsafe fn setTextSelections( &self, text_selections: &NSArray<NSTextSelection> )
Available on crate feature
NSTextSelection only.Available on crate feature
NSTextSelectionNavigation only.Available on crate feature
NSTextSelectionNavigation only.pub unsafe fn enumerateRenderingAttributesFromLocation_reverse_usingBlock( &self, location: &ProtocolObject<dyn NSTextLocation>, reverse: bool, block: &Block<dyn Fn(NonNull<NSTextLayoutManager>, NonNull<NSDictionary<NSAttributedStringKey, AnyObject>>, NonNull<NSTextRange>) -> Bool + '_> )
Available on crate features
NSTextRange and block2 only.pub unsafe fn setRenderingAttributes_forTextRange( &self, rendering_attributes: &NSDictionary<NSAttributedStringKey, AnyObject>, text_range: &NSTextRange )
Available on crate feature
NSTextRange only.pub unsafe fn addRenderingAttribute_value_forTextRange( &self, rendering_attribute: &NSAttributedStringKey, value: Option<&AnyObject>, text_range: &NSTextRange )
Available on crate feature
NSTextRange only.pub unsafe fn removeRenderingAttribute_forTextRange( &self, rendering_attribute: &NSAttributedStringKey, text_range: &NSTextRange )
Available on crate feature
NSTextRange only.pub unsafe fn invalidateRenderingAttributesForTextRange( &self, text_range: &NSTextRange )
Available on crate feature
NSTextRange only.pub unsafe fn renderingAttributesValidator( &self ) -> *mut Block<dyn Fn(NonNull<NSTextLayoutManager>, NonNull<NSTextLayoutFragment>)>
Available on crate features
NSTextLayoutFragment and block2 only.pub unsafe fn setRenderingAttributesValidator( &self, rendering_attributes_validator: Option<&Block<dyn Fn(NonNull<NSTextLayoutManager>, NonNull<NSTextLayoutFragment>)>> )
Available on crate features
NSTextLayoutFragment and block2 only.pub unsafe fn linkRenderingAttributes( ) -> Id<NSDictionary<NSAttributedStringKey, AnyObject>>
pub unsafe fn renderingAttributesForLink_atLocation( &self, link: &AnyObject, location: &ProtocolObject<dyn NSTextLocation> ) -> Id<NSDictionary<NSAttributedStringKey, AnyObject>>
Available on crate feature
NSTextRange only.pub unsafe fn enumerateTextSegmentsInRange_type_options_usingBlock( &self, text_range: &NSTextRange, type: NSTextLayoutManagerSegmentType, options: NSTextLayoutManagerSegmentOptions, block: &Block<dyn Fn(*mut NSTextRange, CGRect, CGFloat, NonNull<NSTextContainer>) -> Bool + '_> )
Available on crate features
NSTextContainer and NSTextRange and block2 only.pub unsafe fn replaceContentsInRange_withTextElements( &self, range: &NSTextRange, text_elements: &NSArray<NSTextElement> )
Available on crate features
NSTextElement and NSTextRange only.pub unsafe fn replaceContentsInRange_withAttributedString( &self, range: &NSTextRange, attributed_string: &NSAttributedString )
Available on crate feature
NSTextRange only.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 NSTextLayoutManager
impl AsMut<AnyObject> for NSTextLayoutManager
source§impl AsMut<NSObject> for NSTextLayoutManager
impl AsMut<NSObject> for NSTextLayoutManager
source§impl AsRef<AnyObject> for NSTextLayoutManager
impl AsRef<AnyObject> for NSTextLayoutManager
source§impl AsRef<NSObject> for NSTextLayoutManager
impl AsRef<NSObject> for NSTextLayoutManager
source§impl Borrow<AnyObject> for NSTextLayoutManager
impl Borrow<AnyObject> for NSTextLayoutManager
source§impl Borrow<NSObject> for NSTextLayoutManager
impl Borrow<NSObject> for NSTextLayoutManager
source§impl BorrowMut<AnyObject> for NSTextLayoutManager
impl BorrowMut<AnyObject> for NSTextLayoutManager
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 NSTextLayoutManager
impl BorrowMut<NSObject> for NSTextLayoutManager
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 NSTextLayoutManager
impl ClassType for NSTextLayoutManager
§type Mutability = InteriorMutable
type Mutability = InteriorMutable
Whether the type is mutable or immutable. Read more
source§const NAME: &'static str = "NSTextLayoutManager"
const NAME: &'static str = "NSTextLayoutManager"
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 NSTextLayoutManager
impl Debug for NSTextLayoutManager
source§impl Deref for NSTextLayoutManager
impl Deref for NSTextLayoutManager
source§impl DerefMut for NSTextLayoutManager
impl DerefMut for NSTextLayoutManager
source§impl Hash for NSTextLayoutManager
impl Hash for NSTextLayoutManager
source§impl NSCoding for NSTextLayoutManager
impl NSCoding for NSTextLayoutManager
source§impl NSObjectProtocol for NSTextLayoutManager
impl NSObjectProtocol for NSTextLayoutManager
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 NSSecureCoding for NSTextLayoutManager
impl NSSecureCoding for NSTextLayoutManager
source§impl NSTextSelectionDataSource for NSTextLayoutManager
Available on crate feature NSTextSelectionNavigation only.
impl NSTextSelectionDataSource for NSTextLayoutManager
Available on crate feature
NSTextSelectionNavigation only.source§unsafe fn documentRange(&self) -> Id<NSTextRange>
unsafe fn documentRange(&self) -> Id<NSTextRange>
Available on crate feature
NSTextRange only.source§unsafe fn enumerateSubstringsFromLocation_options_usingBlock(
&self,
location: &ProtocolObject<dyn NSTextLocation>,
options: NSStringEnumerationOptions,
block: &Block<dyn Fn(*mut NSString, NonNull<NSTextRange>, *mut NSTextRange, NonNull<Bool>) + '_>
)
unsafe fn enumerateSubstringsFromLocation_options_usingBlock( &self, location: &ProtocolObject<dyn NSTextLocation>, options: NSStringEnumerationOptions, block: &Block<dyn Fn(*mut NSString, NonNull<NSTextRange>, *mut NSTextRange, NonNull<Bool>) + '_> )
Available on crate features
NSTextRange and block2 only.source§unsafe fn textRangeForSelectionGranularity_enclosingLocation(
&self,
selection_granularity: NSTextSelectionGranularity,
location: &ProtocolObject<dyn NSTextLocation>
) -> Option<Id<NSTextRange>>
unsafe fn textRangeForSelectionGranularity_enclosingLocation( &self, selection_granularity: NSTextSelectionGranularity, location: &ProtocolObject<dyn NSTextLocation> ) -> Option<Id<NSTextRange>>
Available on crate features
NSTextRange and NSTextSelection only.source§unsafe fn locationFromLocation_withOffset(
&self,
location: &ProtocolObject<dyn NSTextLocation>,
offset: NSInteger
) -> Option<Id<ProtocolObject<dyn NSTextLocation>>>
unsafe fn locationFromLocation_withOffset( &self, location: &ProtocolObject<dyn NSTextLocation>, offset: NSInteger ) -> Option<Id<ProtocolObject<dyn NSTextLocation>>>
Available on crate feature
NSTextRange only.source§unsafe fn offsetFromLocation_toLocation(
&self,
from: &ProtocolObject<dyn NSTextLocation>,
to: &ProtocolObject<dyn NSTextLocation>
) -> NSInteger
unsafe fn offsetFromLocation_toLocation( &self, from: &ProtocolObject<dyn NSTextLocation>, to: &ProtocolObject<dyn NSTextLocation> ) -> NSInteger
Available on crate feature
NSTextRange only.source§unsafe fn baseWritingDirectionAtLocation(
&self,
location: &ProtocolObject<dyn NSTextLocation>
) -> NSTextSelectionNavigationWritingDirection
unsafe fn baseWritingDirectionAtLocation( &self, location: &ProtocolObject<dyn NSTextLocation> ) -> NSTextSelectionNavigationWritingDirection
Available on crate feature
NSTextRange only.source§unsafe fn enumerateCaretOffsetsInLineFragmentAtLocation_usingBlock(
&self,
location: &ProtocolObject<dyn NSTextLocation>,
block: &Block<dyn Fn(CGFloat, NonNull<ProtocolObject<dyn NSTextLocation>>, Bool, NonNull<Bool>) + '_>
)
unsafe fn enumerateCaretOffsetsInLineFragmentAtLocation_usingBlock( &self, location: &ProtocolObject<dyn NSTextLocation>, block: &Block<dyn Fn(CGFloat, NonNull<ProtocolObject<dyn NSTextLocation>>, Bool, NonNull<Bool>) + '_> )
Available on crate features
NSTextRange and block2 only.source§unsafe fn lineFragmentRangeForPoint_inContainerAtLocation(
&self,
point: CGPoint,
location: &ProtocolObject<dyn NSTextLocation>
) -> Option<Id<NSTextRange>>
unsafe fn lineFragmentRangeForPoint_inContainerAtLocation( &self, point: CGPoint, location: &ProtocolObject<dyn NSTextLocation> ) -> Option<Id<NSTextRange>>
Available on crate feature
NSTextRange only.source§unsafe fn enumerateContainerBoundariesFromLocation_reverse_usingBlock(
&self,
location: &ProtocolObject<dyn NSTextLocation>,
reverse: bool,
block: &Block<dyn Fn(NonNull<ProtocolObject<dyn NSTextLocation>>, NonNull<Bool>) + '_>
)
unsafe fn enumerateContainerBoundariesFromLocation_reverse_usingBlock( &self, location: &ProtocolObject<dyn NSTextLocation>, reverse: bool, block: &Block<dyn Fn(NonNull<ProtocolObject<dyn NSTextLocation>>, NonNull<Bool>) + '_> )
Available on crate features
NSTextRange and block2 only.source§unsafe fn textLayoutOrientationAtLocation(
&self,
location: &ProtocolObject<dyn NSTextLocation>
) -> NSTextSelectionNavigationLayoutOrientation
unsafe fn textLayoutOrientationAtLocation( &self, location: &ProtocolObject<dyn NSTextLocation> ) -> NSTextSelectionNavigationLayoutOrientation
Available on crate feature
NSTextRange only.source§impl PartialEq for NSTextLayoutManager
impl PartialEq for NSTextLayoutManager
source§fn eq(&self, other: &NSTextLayoutManager) -> bool
fn eq(&self, other: &NSTextLayoutManager) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl RefEncode for NSTextLayoutManager
impl RefEncode for NSTextLayoutManager
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 NSTextLayoutManager
impl Message for NSTextLayoutManager
impl StructuralPartialEq for NSTextLayoutManager
Auto Trait Implementations§
impl !Freeze for NSTextLayoutManager
impl !RefUnwindSafe for NSTextLayoutManager
impl !Send for NSTextLayoutManager
impl !Sync for NSTextLayoutManager
impl !Unpin for NSTextLayoutManager
impl !UnwindSafe for NSTextLayoutManager
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