#[repr(C)]pub struct NSTextAttachment { /* private fields */ }👎Deprecated:
icrate::AppKit has been moved to objc2-app-kitAvailable on crate features
AppKit and AppKit_NSTextAttachment only.Implementations§
Source§impl NSTextAttachment
impl NSTextAttachment
pub unsafe fn initWithData_ofType( this: Allocated<Self>, content_data: Option<&NSData>, uti: Option<&NSString>, ) -> Id<Self>
👎Deprecated:
icrate::AppKit has been moved to objc2-app-kitAvailable on crate features
Foundation_NSData and Foundation_NSString only.pub unsafe fn initWithFileWrapper( this: Allocated<Self>, file_wrapper: Option<&NSFileWrapper>, ) -> Id<Self>
👎Deprecated:
icrate::AppKit has been moved to objc2-app-kitAvailable on crate feature
Foundation_NSFileWrapper only.pub unsafe fn contents(&self) -> Option<Id<NSData>>
👎Deprecated:
icrate::AppKit has been moved to objc2-app-kitAvailable on crate feature
Foundation_NSData only.pub unsafe fn setContents(&self, contents: Option<&NSData>)
👎Deprecated:
icrate::AppKit has been moved to objc2-app-kitAvailable on crate feature
Foundation_NSData only.pub unsafe fn fileType(&self) -> Option<Id<NSString>>
👎Deprecated:
icrate::AppKit has been moved to objc2-app-kitAvailable on crate feature
Foundation_NSString only.pub unsafe fn setFileType(&self, file_type: Option<&NSString>)
👎Deprecated:
icrate::AppKit has been moved to objc2-app-kitAvailable on crate feature
Foundation_NSString only.pub unsafe fn image(&self) -> Option<Id<NSImage>>
👎Deprecated:
icrate::AppKit has been moved to objc2-app-kitAvailable on crate feature
AppKit_NSImage only.pub unsafe fn setImage(&self, image: Option<&NSImage>)
👎Deprecated:
icrate::AppKit has been moved to objc2-app-kitAvailable on crate feature
AppKit_NSImage only.pub unsafe fn bounds(&self) -> CGRect
👎Deprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn setBounds(&self, bounds: CGRect)
👎Deprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn fileWrapper(&self) -> Option<Id<NSFileWrapper>>
👎Deprecated:
icrate::AppKit has been moved to objc2-app-kitAvailable on crate feature
Foundation_NSFileWrapper only.pub unsafe fn setFileWrapper(&self, file_wrapper: Option<&NSFileWrapper>)
👎Deprecated:
icrate::AppKit has been moved to objc2-app-kitAvailable on crate feature
Foundation_NSFileWrapper only.pub unsafe fn attachmentCell( &self, ) -> Option<Id<ProtocolObject<dyn NSTextAttachmentCellProtocol>>>
👎Deprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn setAttachmentCell( &self, attachment_cell: Option<&ProtocolObject<dyn NSTextAttachmentCellProtocol>>, )
👎Deprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn lineLayoutPadding(&self) -> CGFloat
👎Deprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn setLineLayoutPadding(&self, line_layout_padding: CGFloat)
👎Deprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn textAttachmentViewProviderClassForFileType( file_type: &NSString, ) -> Option<&'static AnyClass>
👎Deprecated:
icrate::AppKit has been moved to objc2-app-kitAvailable on crate feature
Foundation_NSString only.pub unsafe fn registerTextAttachmentViewProviderClass_forFileType( text_attachment_view_provider_class: &AnyClass, file_type: &NSString, )
👎Deprecated:
icrate::AppKit has been moved to objc2-app-kitAvailable on crate feature
Foundation_NSString only.pub unsafe fn allowsTextAttachmentView(&self) -> bool
👎Deprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn setAllowsTextAttachmentView( &self, allows_text_attachment_view: bool, )
👎Deprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn usesTextAttachmentView(&self) -> bool
👎Deprecated:
icrate::AppKit has been moved to objc2-app-kitMethods from Deref<Target = NSObject>§
Sourcepub fn doesNotRecognizeSelector(&self, sel: Sel) -> !
Available on crate feature AuthenticationServices only.
pub fn doesNotRecognizeSelector(&self, sel: Sel) -> !
AuthenticationServices only.Handle messages the object doesn’t recognize.
See Apple’s documentation for details.
Methods from Deref<Target = AnyObject>§
Sourcepub fn class(&self) -> &'static AnyClass
pub fn class(&self) -> &'static AnyClass
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.
pub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
Ivar::load instead.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.
pub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
Ivar::load_mut instead.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 NSTextAttachment
impl AsMut<AnyObject> for NSTextAttachment
Source§impl AsMut<NSObject> for NSTextAttachment
impl AsMut<NSObject> for NSTextAttachment
Source§impl AsMut<NSTextAttachment> for NSTextAttachment
impl AsMut<NSTextAttachment> for NSTextAttachment
Source§impl AsRef<AnyObject> for NSTextAttachment
impl AsRef<AnyObject> for NSTextAttachment
Source§impl AsRef<NSObject> for NSTextAttachment
impl AsRef<NSObject> for NSTextAttachment
Source§impl AsRef<NSTextAttachment> for NSTextAttachment
impl AsRef<NSTextAttachment> for NSTextAttachment
Source§impl Borrow<AnyObject> for NSTextAttachment
impl Borrow<AnyObject> for NSTextAttachment
Source§impl Borrow<NSObject> for NSTextAttachment
impl Borrow<NSObject> for NSTextAttachment
Source§impl BorrowMut<AnyObject> for NSTextAttachment
impl BorrowMut<AnyObject> for NSTextAttachment
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 NSTextAttachment
impl BorrowMut<NSObject> for NSTextAttachment
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 NSTextAttachment
impl ClassType for NSTextAttachment
Source§const NAME: &'static str = "NSTextAttachment"
const NAME: &'static str = "NSTextAttachment"
The name of the Objective-C class that this type represents. Read more
Source§type Mutability = InteriorMutable
type Mutability = InteriorMutable
Whether the type is mutable or immutable. 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 NSTextAttachment
impl Debug for NSTextAttachment
Source§impl Deref for NSTextAttachment
impl Deref for NSTextAttachment
Source§impl DerefMut for NSTextAttachment
impl DerefMut for NSTextAttachment
Source§impl Hash for NSTextAttachment
impl Hash for NSTextAttachment
Source§impl NSCoding for NSTextAttachment
impl NSCoding for NSTextAttachment
Source§unsafe fn encodeWithCoder(&self, coder: &NSCoder)
unsafe fn encodeWithCoder(&self, coder: &NSCoder)
👎Deprecated:
icrate::Foundation has been moved to objc2-foundationAvailable on crate features
Foundation and Foundation_NSCoder only.Source§impl NSObjectProtocol for NSTextAttachment
impl NSObjectProtocol for NSTextAttachment
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 NSTextAttachment
impl NSSecureCoding for NSTextAttachment
Source§impl NSTextAttachmentContainer for NSTextAttachment
impl NSTextAttachmentContainer for NSTextAttachment
Source§unsafe fn imageForBounds_textContainer_characterIndex(
&self,
image_bounds: CGRect,
text_container: Option<&NSTextContainer>,
char_index: NSUInteger,
) -> Option<Id<NSImage>>
unsafe fn imageForBounds_textContainer_characterIndex( &self, image_bounds: CGRect, text_container: Option<&NSTextContainer>, char_index: NSUInteger, ) -> Option<Id<NSImage>>
👎Deprecated:
icrate::AppKit has been moved to objc2-app-kitAvailable on crate features
AppKit_NSImage and AppKit_NSTextContainer only.Source§unsafe fn attachmentBoundsForTextContainer_proposedLineFragment_glyphPosition_characterIndex(
&self,
text_container: Option<&NSTextContainer>,
line_frag: CGRect,
position: CGPoint,
char_index: NSUInteger,
) -> CGRect
unsafe fn attachmentBoundsForTextContainer_proposedLineFragment_glyphPosition_characterIndex( &self, text_container: Option<&NSTextContainer>, line_frag: CGRect, position: CGPoint, char_index: NSUInteger, ) -> CGRect
👎Deprecated:
icrate::AppKit has been moved to objc2-app-kitAvailable on crate feature
AppKit_NSTextContainer only.Source§impl NSTextAttachmentLayout for NSTextAttachment
impl NSTextAttachmentLayout for NSTextAttachment
Source§unsafe fn imageForBounds_attributes_location_textContainer(
&self,
bounds: CGRect,
attributes: &NSDictionary<NSAttributedStringKey, AnyObject>,
location: &ProtocolObject<dyn NSTextLocation>,
text_container: Option<&NSTextContainer>,
) -> Option<Id<NSImage>>
unsafe fn imageForBounds_attributes_location_textContainer( &self, bounds: CGRect, attributes: &NSDictionary<NSAttributedStringKey, AnyObject>, location: &ProtocolObject<dyn NSTextLocation>, text_container: Option<&NSTextContainer>, ) -> Option<Id<NSImage>>
👎Deprecated:
icrate::AppKit has been moved to objc2-app-kitAvailable on crate features
AppKit_NSImage and AppKit_NSTextContainer and Foundation_NSDictionary only.Source§unsafe fn attachmentBoundsForAttributes_location_textContainer_proposedLineFragment_position(
&self,
attributes: &NSDictionary<NSAttributedStringKey, AnyObject>,
location: &ProtocolObject<dyn NSTextLocation>,
text_container: Option<&NSTextContainer>,
proposed_line_fragment: CGRect,
position: CGPoint,
) -> CGRect
unsafe fn attachmentBoundsForAttributes_location_textContainer_proposedLineFragment_position( &self, attributes: &NSDictionary<NSAttributedStringKey, AnyObject>, location: &ProtocolObject<dyn NSTextLocation>, text_container: Option<&NSTextContainer>, proposed_line_fragment: CGRect, position: CGPoint, ) -> CGRect
👎Deprecated:
icrate::AppKit has been moved to objc2-app-kitAvailable on crate features
AppKit_NSTextContainer and Foundation_NSDictionary only.Source§unsafe fn viewProviderForParentView_location_textContainer(
&self,
parent_view: Option<&NSView>,
location: &ProtocolObject<dyn NSTextLocation>,
text_container: Option<&NSTextContainer>,
) -> Option<Id<NSTextAttachmentViewProvider>>
unsafe fn viewProviderForParentView_location_textContainer( &self, parent_view: Option<&NSView>, location: &ProtocolObject<dyn NSTextLocation>, text_container: Option<&NSTextContainer>, ) -> Option<Id<NSTextAttachmentViewProvider>>
👎Deprecated:
icrate::AppKit has been moved to objc2-app-kitAvailable on crate features
AppKit_NSTextAttachmentViewProvider and AppKit_NSTextContainer and AppKit_NSView only.Source§impl PartialEq for NSTextAttachment
impl PartialEq for NSTextAttachment
Source§impl RefEncode for NSTextAttachment
impl RefEncode for NSTextAttachment
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 NSTextAttachment
impl Message for NSTextAttachment
impl StructuralPartialEq for NSTextAttachment
Auto Trait Implementations§
impl !Freeze for NSTextAttachment
impl !RefUnwindSafe for NSTextAttachment
impl !Send for NSTextAttachment
impl !Sync for NSTextAttachment
impl !Unpin for NSTextAttachment
impl !UnwindSafe for NSTextAttachment
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