#[repr(C)]pub struct NSFont { /* private fields */ }πDeprecated:
icrate::AppKit has been moved to objc2-app-kitAvailable on crate features
AppKit and AppKit_NSFont only.ImplementationsΒ§
SourceΒ§impl NSFont
impl NSFont
pub unsafe fn fontWithName_size( font_name: &NSString, font_size: CGFloat, ) -> Option<Id<NSFont>>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitAvailable on crate feature
Foundation_NSString only.pub unsafe fn fontWithName_matrix( font_name: &NSString, font_matrix: NonNull<CGFloat>, ) -> Option<Id<NSFont>>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitAvailable on crate feature
Foundation_NSString only.pub unsafe fn fontWithDescriptor_size( font_descriptor: &NSFontDescriptor, font_size: CGFloat, ) -> Option<Id<NSFont>>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitAvailable on crate feature
AppKit_NSFontDescriptor only.pub unsafe fn fontWithDescriptor_textTransform( font_descriptor: &NSFontDescriptor, text_transform: Option<&NSAffineTransform>, ) -> Option<Id<NSFont>>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitAvailable on crate features
AppKit_NSFontDescriptor and Foundation_NSAffineTransform only.pub unsafe fn userFontOfSize(font_size: CGFloat) -> Option<Id<NSFont>>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn userFixedPitchFontOfSize(font_size: CGFloat) -> Option<Id<NSFont>>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn setUserFont(font: Option<&NSFont>)
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn setUserFixedPitchFont(font: Option<&NSFont>)
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn systemFontOfSize(font_size: CGFloat) -> Id<NSFont>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn boldSystemFontOfSize(font_size: CGFloat) -> Id<NSFont>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn labelFontOfSize(font_size: CGFloat) -> Id<NSFont>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn titleBarFontOfSize(font_size: CGFloat) -> Id<NSFont>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitπDeprecated:
icrate::AppKit has been moved to objc2-app-kitπDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn messageFontOfSize(font_size: CGFloat) -> Id<NSFont>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn paletteFontOfSize(font_size: CGFloat) -> Id<NSFont>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn toolTipsFontOfSize(font_size: CGFloat) -> Id<NSFont>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn controlContentFontOfSize(font_size: CGFloat) -> Id<NSFont>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn systemFontOfSize_weight( font_size: CGFloat, weight: NSFontWeight, ) -> Id<NSFont>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn monospacedDigitSystemFontOfSize_weight( font_size: CGFloat, weight: NSFontWeight, ) -> Id<NSFont>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn systemFontOfSize_weight_width( font_size: CGFloat, weight: NSFontWeight, width: NSFontWidth, ) -> Id<NSFont>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn monospacedSystemFontOfSize_weight( font_size: CGFloat, weight: NSFontWeight, ) -> Id<NSFont>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn fontWithSize(&self, font_size: CGFloat) -> Id<NSFont>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn systemFontSize() -> CGFloat
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn smallSystemFontSize() -> CGFloat
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn labelFontSize() -> CGFloat
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn systemFontSizeForControlSize( control_size: NSControlSize, ) -> CGFloat
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn fontName(&self) -> Id<NSString>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitAvailable on crate feature
Foundation_NSString only.pub unsafe fn pointSize(&self) -> CGFloat
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn matrix(&self) -> NonNull<CGFloat>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn familyName(&self) -> Option<Id<NSString>>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitAvailable on crate feature
Foundation_NSString only.pub unsafe fn displayName(&self) -> Option<Id<NSString>>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitAvailable on crate feature
Foundation_NSString only.pub unsafe fn fontDescriptor(&self) -> Id<NSFontDescriptor>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitAvailable on crate feature
AppKit_NSFontDescriptor only.pub unsafe fn textTransform(&self) -> Id<NSAffineTransform>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitAvailable on crate feature
Foundation_NSAffineTransform only.pub unsafe fn numberOfGlyphs(&self) -> NSUInteger
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn mostCompatibleStringEncoding(&self) -> NSStringEncoding
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn coveredCharacterSet(&self) -> Id<NSCharacterSet>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitAvailable on crate feature
Foundation_NSCharacterSet only.pub unsafe fn boundingRectForFont(&self) -> NSRect
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn maximumAdvancement(&self) -> NSSize
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn ascender(&self) -> CGFloat
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn descender(&self) -> CGFloat
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn leading(&self) -> CGFloat
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn underlinePosition(&self) -> CGFloat
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn underlineThickness(&self) -> CGFloat
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn italicAngle(&self) -> CGFloat
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn capHeight(&self) -> CGFloat
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn xHeight(&self) -> CGFloat
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn isFixedPitch(&self) -> bool
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn set(&self)
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn setInContext(&self, graphics_context: &NSGraphicsContext)
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitAvailable on crate feature
AppKit_NSGraphicsContext only.pub unsafe fn verticalFont(&self) -> Id<NSFont>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn isVertical(&self) -> bool
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitSourceΒ§impl NSFont
NSFont_Deprecated
impl NSFont
NSFont_Deprecated
pub unsafe fn glyphWithName(&self, name: &NSString) -> NSGlyph
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitAvailable on crate feature
Foundation_NSString only.pub unsafe fn boundingRectForGlyph(&self, glyph: NSGlyph) -> NSRect
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn advancementForGlyph(&self, glyph: NSGlyph) -> NSSize
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn getBoundingRects_forGlyphs_count( &self, bounds: NSRectArray, glyphs: NonNull<NSGlyph>, glyph_count: NSUInteger, )
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn getAdvancements_forGlyphs_count( &self, advancements: NSSizeArray, glyphs: NonNull<NSGlyph>, glyph_count: NSUInteger, )
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn getAdvancements_forPackedGlyphs_length( &self, advancements: NSSizeArray, packed_glyphs: NonNull<c_void>, length: NSUInteger, )
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn printerFont(&self) -> Id<NSFont>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn screenFont(&self) -> Id<NSFont>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn screenFontWithRenderingMode( &self, rendering_mode: NSFontRenderingMode, ) -> Id<NSFont>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn renderingMode(&self) -> NSFontRenderingMode
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitSourceΒ§impl NSFont
NSFont_TextStyles
impl NSFont
NSFont_TextStyles
pub unsafe fn preferredFontForTextStyle_options( style: &NSFontTextStyle, options: &NSDictionary<NSFontTextStyleOptionKey, AnyObject>, ) -> Id<NSFont>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitAvailable on crate feature
Foundation_NSDictionary only.Methods 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 BorrowMut<AnyObject> for NSFont
impl BorrowMut<AnyObject> for NSFont
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 NSFont
impl BorrowMut<NSObject> for NSFont
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 NSFont
impl ClassType for NSFont
SourceΒ§const NAME: &'static str = "NSFont"
const NAME: &'static str = "NSFont"
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 NSCoding for NSFont
impl NSCoding for NSFont
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 NSCopying for NSFont
impl NSCopying for NSFont
SourceΒ§fn copy(&self) -> Id<Self::Immutable>
fn copy(&self) -> Id<Self::Immutable>
πDeprecated:
icrate::Foundation has been moved to objc2-foundationAvailable on crate feature
Foundation only.Returns a new instance thatβs a copy of the receiver. Read more
SourceΒ§impl NSObjectProtocol for NSFont
impl NSObjectProtocol for NSFont
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 NSFont
impl NSSecureCoding for NSFont
SourceΒ§impl RefEncode for NSFont
impl RefEncode for NSFont
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 NSFont
impl Message for NSFont
impl StructuralPartialEq for NSFont
Auto Trait ImplementationsΒ§
impl !Freeze for NSFont
impl !RefUnwindSafe for NSFont
impl !Send for NSFont
impl !Sync for NSFont
impl !Unpin for NSFont
impl !UnwindSafe for NSFont
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