Struct objc2_ui_kit::NSTextContainer
source · #[repr(C)]pub struct NSTextContainer { /* private fields */ }
Available on crate feature
NSTextContainer
only.Implementations§
source§impl NSTextContainer
impl NSTextContainer
pub unsafe fn initWithSize( this: Allocated<Self>, size: CGSize ) -> Retained<Self>
pub unsafe fn initWithCoder( this: Allocated<Self>, coder: &NSCoder ) -> Retained<Self>
pub unsafe fn layoutManager(&self) -> Option<Retained<NSLayoutManager>>
Available on crate feature
NSLayoutManager
only.pub unsafe fn setLayoutManager(&self, layout_manager: Option<&NSLayoutManager>)
Available on crate feature
NSLayoutManager
only.pub unsafe fn replaceLayoutManager(&self, new_layout_manager: &NSLayoutManager)
Available on crate feature
NSLayoutManager
only.pub unsafe fn textLayoutManager(&self) -> Option<Retained<NSTextLayoutManager>>
Available on crate feature
NSTextLayoutManager
only.pub unsafe fn size(&self) -> CGSize
pub unsafe fn setSize(&self, size: CGSize)
pub unsafe fn exclusionPaths(&self) -> Retained<NSArray<UIBezierPath>>
Available on crate feature
UIBezierPath
only.pub unsafe fn setExclusionPaths(&self, exclusion_paths: &NSArray<UIBezierPath>)
Available on crate feature
UIBezierPath
only.pub unsafe fn lineBreakMode(&self) -> NSLineBreakMode
Available on crate feature
NSParagraphStyle
only.pub unsafe fn setLineBreakMode(&self, line_break_mode: NSLineBreakMode)
Available on crate feature
NSParagraphStyle
only.pub unsafe fn lineFragmentPadding(&self) -> CGFloat
pub unsafe fn setLineFragmentPadding(&self, line_fragment_padding: CGFloat)
pub unsafe fn maximumNumberOfLines(&self) -> NSUInteger
pub unsafe fn setMaximumNumberOfLines( &self, maximum_number_of_lines: NSUInteger )
pub unsafe fn lineFragmentRectForProposedRect_atIndex_writingDirection_remainingRect( &self, proposed_rect: CGRect, character_index: NSUInteger, base_writing_direction: NSWritingDirection, remaining_rect: *mut CGRect ) -> CGRect
Available on crate feature
NSText
only.pub unsafe fn isSimpleRectangularTextContainer(&self) -> bool
pub unsafe fn widthTracksTextView(&self) -> bool
pub unsafe fn setWidthTracksTextView(&self, width_tracks_text_view: bool)
pub unsafe fn heightTracksTextView(&self) -> bool
pub unsafe fn setHeightTracksTextView(&self, height_tracks_text_view: bool)
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 NSTextContainer
impl AsMut<AnyObject> for NSTextContainer
source§impl AsMut<NSObject> for NSTextContainer
impl AsMut<NSObject> for NSTextContainer
source§impl AsMut<NSTextContainer> for NSTextContainer
impl AsMut<NSTextContainer> for NSTextContainer
source§impl AsRef<AnyObject> for NSTextContainer
impl AsRef<AnyObject> for NSTextContainer
source§impl AsRef<NSObject> for NSTextContainer
impl AsRef<NSObject> for NSTextContainer
source§impl AsRef<NSTextContainer> for NSTextContainer
impl AsRef<NSTextContainer> for NSTextContainer
source§impl Borrow<AnyObject> for NSTextContainer
impl Borrow<AnyObject> for NSTextContainer
source§impl Borrow<NSObject> for NSTextContainer
impl Borrow<NSObject> for NSTextContainer
source§impl BorrowMut<AnyObject> for NSTextContainer
impl BorrowMut<AnyObject> for NSTextContainer
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 NSTextContainer
impl BorrowMut<NSObject> for NSTextContainer
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 NSTextContainer
impl ClassType for NSTextContainer
§type Mutability = InteriorMutable
type Mutability = InteriorMutable
Whether the type is mutable or immutable. Read more
source§const NAME: &'static str = "NSTextContainer"
const NAME: &'static str = "NSTextContainer"
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 NSTextContainer
impl Debug for NSTextContainer
source§impl Deref for NSTextContainer
impl Deref for NSTextContainer
source§impl DerefMut for NSTextContainer
impl DerefMut for NSTextContainer
source§impl Hash for NSTextContainer
impl Hash for NSTextContainer
source§impl NSCoding for NSTextContainer
impl NSCoding for NSTextContainer
source§impl NSObjectProtocol for NSTextContainer
impl NSObjectProtocol for NSTextContainer
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 NSTextContainer
impl NSSecureCoding for NSTextContainer
source§impl NSTextLayoutOrientationProvider for NSTextContainer
Available on crate feature NSLayoutManager
only.
impl NSTextLayoutOrientationProvider for NSTextContainer
Available on crate feature
NSLayoutManager
only.unsafe fn layoutOrientation(&self) -> NSTextLayoutOrientation
source§impl PartialEq for NSTextContainer
impl PartialEq for NSTextContainer
source§fn eq(&self, other: &NSTextContainer) -> bool
fn eq(&self, other: &NSTextContainer) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl RefEncode for NSTextContainer
impl RefEncode for NSTextContainer
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 NSTextContainer
impl Message for NSTextContainer
impl StructuralPartialEq for NSTextContainer
Auto Trait Implementations§
impl !Freeze for NSTextContainer
impl !RefUnwindSafe for NSTextContainer
impl !Send for NSTextContainer
impl !Sync for NSTextContainer
impl !Unpin for NSTextContainer
impl !UnwindSafe for NSTextContainer
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