Struct objc2_app_kit::NSTypesetter
source · #[repr(C)]pub struct NSTypesetter { /* private fields */ }
Available on crate feature
NSTypesetter
only.Implementations§
source§impl NSTypesetter
impl NSTypesetter
pub unsafe fn usesFontLeading(&self) -> bool
pub unsafe fn setUsesFontLeading(&self, uses_font_leading: bool)
pub unsafe fn typesetterBehavior(&self) -> NSTypesetterBehavior
Available on crate feature
NSLayoutManager
only.pub unsafe fn setTypesetterBehavior( &self, typesetter_behavior: NSTypesetterBehavior )
Available on crate feature
NSLayoutManager
only.pub unsafe fn hyphenationFactor(&self) -> c_float
pub unsafe fn setHyphenationFactor(&self, hyphenation_factor: c_float)
pub unsafe fn lineFragmentPadding(&self) -> CGFloat
pub unsafe fn setLineFragmentPadding(&self, line_fragment_padding: CGFloat)
pub unsafe fn substituteFontForFont( &self, original_font: &NSFont ) -> Retained<NSFont>
Available on crate feature
NSFont
only.pub unsafe fn textTabForGlyphLocation_writingDirection_maxLocation( &self, glyph_location: CGFloat, direction: NSWritingDirection, max_location: CGFloat ) -> Option<Retained<NSTextTab>>
Available on crate features
NSParagraphStyle
and NSText
only.pub unsafe fn bidiProcessingEnabled(&self) -> bool
pub unsafe fn setBidiProcessingEnabled(&self, bidi_processing_enabled: bool)
pub unsafe fn attributedString(&self) -> Option<Retained<NSAttributedString>>
pub unsafe fn setAttributedString( &self, attributed_string: Option<&NSAttributedString> )
pub unsafe fn setParagraphGlyphRange_separatorGlyphRange( &self, paragraph_range: NSRange, paragraph_separator_range: NSRange )
pub unsafe fn paragraphGlyphRange(&self) -> NSRange
pub unsafe fn paragraphSeparatorGlyphRange(&self) -> NSRange
pub unsafe fn paragraphCharacterRange(&self) -> NSRange
pub unsafe fn paragraphSeparatorCharacterRange(&self) -> NSRange
pub unsafe fn layoutParagraphAtPoint( &self, line_fragment_origin: NSPointPointer ) -> NSUInteger
pub unsafe fn beginParagraph(&self)
pub unsafe fn endParagraph(&self)
pub unsafe fn beginLineWithGlyphAtIndex(&self, glyph_index: NSUInteger)
pub unsafe fn endLineWithGlyphRange(&self, line_glyph_range: NSRange)
pub unsafe fn lineSpacingAfterGlyphAtIndex_withProposedLineFragmentRect( &self, glyph_index: NSUInteger, rect: NSRect ) -> CGFloat
pub unsafe fn paragraphSpacingBeforeGlyphAtIndex_withProposedLineFragmentRect( &self, glyph_index: NSUInteger, rect: NSRect ) -> CGFloat
pub unsafe fn paragraphSpacingAfterGlyphAtIndex_withProposedLineFragmentRect( &self, glyph_index: NSUInteger, rect: NSRect ) -> CGFloat
pub unsafe fn getLineFragmentRect_usedRect_forParagraphSeparatorGlyphRange_atProposedOrigin( &self, line_fragment_rect: NSRectPointer, line_fragment_used_rect: NSRectPointer, paragraph_separator_glyph_range: NSRange, line_origin: NSPoint )
pub unsafe fn attributesForExtraLineFragment( &self ) -> Retained<NSDictionary<NSAttributedStringKey, AnyObject>>
pub unsafe fn layoutManager(&self) -> Option<Retained<NSLayoutManager>>
Available on crate feature
NSLayoutManager
only.pub unsafe fn textContainers( &self ) -> Option<Retained<NSArray<NSTextContainer>>>
Available on crate feature
NSTextContainer
only.pub unsafe fn currentTextContainer(&self) -> Option<Retained<NSTextContainer>>
Available on crate feature
NSTextContainer
only.pub unsafe fn currentParagraphStyle(&self) -> Option<Retained<NSParagraphStyle>>
Available on crate feature
NSParagraphStyle
only.pub unsafe fn setHardInvalidation_forGlyphRange( &self, flag: bool, glyph_range: NSRange )
pub unsafe fn layoutGlyphsInLayoutManager_startingAtGlyphIndex_maxNumberOfLineFragments_nextGlyphIndex( &self, layout_manager: &NSLayoutManager, start_glyph_index: NSUInteger, max_num_lines: NSUInteger, next_glyph: NonNull<NSUInteger> )
Available on crate feature
NSLayoutManager
only.pub unsafe fn layoutCharactersInRange_forLayoutManager_maximumNumberOfLineFragments( &self, character_range: NSRange, layout_manager: &NSLayoutManager, max_num_lines: NSUInteger ) -> NSRange
Available on crate feature
NSLayoutManager
only.pub unsafe fn printingAdjustmentInLayoutManager_forNominallySpacedGlyphRange_packedGlyphs_count( layout_mgr: &NSLayoutManager, nominally_spaced_glyphs_range: NSRange, packed_glyphs: NonNull<c_uchar>, packed_glyphs_count: NSUInteger ) -> NSSize
Available on crate feature
NSLayoutManager
only.pub unsafe fn baselineOffsetInLayoutManager_glyphIndex( &self, layout_mgr: &NSLayoutManager, glyph_index: NSUInteger ) -> CGFloat
Available on crate feature
NSLayoutManager
only.Available on crate feature
NSLayoutManager
only.pub unsafe fn defaultTypesetterBehavior() -> NSTypesetterBehavior
Available on crate feature
NSLayoutManager
only.source§impl NSTypesetter
impl NSTypesetter
Methods declared on superclass NSObject
source§impl NSTypesetter
impl NSTypesetter
NSLayoutPhaseInterface
pub unsafe fn willSetLineFragmentRect_forGlyphRange_usedRect_baselineOffset( &self, line_rect: NSRectPointer, glyph_range: NSRange, used_rect: NSRectPointer, baseline_offset: NonNull<CGFloat> )
pub unsafe fn shouldBreakLineByWordBeforeCharacterAtIndex( &self, char_index: NSUInteger ) -> bool
pub unsafe fn shouldBreakLineByHyphenatingBeforeCharacterAtIndex( &self, char_index: NSUInteger ) -> bool
pub unsafe fn hyphenationFactorForGlyphAtIndex( &self, glyph_index: NSUInteger ) -> c_float
pub unsafe fn hyphenCharacterForGlyphAtIndex( &self, glyph_index: NSUInteger ) -> u32
pub unsafe fn boundingBoxForControlGlyphAtIndex_forTextContainer_proposedLineFragment_glyphPosition_characterIndex( &self, glyph_index: NSUInteger, text_container: &NSTextContainer, proposed_rect: NSRect, glyph_position: NSPoint, char_index: NSUInteger ) -> NSRect
Available on crate feature
NSTextContainer
only.source§impl NSTypesetter
impl NSTypesetter
NSGlyphStorageInterface
pub unsafe fn characterRangeForGlyphRange_actualGlyphRange( &self, glyph_range: NSRange, actual_glyph_range: NSRangePointer ) -> NSRange
pub unsafe fn glyphRangeForCharacterRange_actualCharacterRange( &self, char_range: NSRange, actual_char_range: NSRangePointer ) -> NSRange
pub unsafe fn getLineFragmentRect_usedRect_remainingRect_forStartingGlyphAtIndex_proposedRect_lineSpacing_paragraphSpacingBefore_paragraphSpacingAfter( &self, line_fragment_rect: NSRectPointer, line_fragment_used_rect: NSRectPointer, remaining_rect: NSRectPointer, starting_glyph_index: NSUInteger, proposed_rect: NSRect, line_spacing: CGFloat, paragraph_spacing_before: CGFloat, paragraph_spacing_after: CGFloat )
pub unsafe fn setLineFragmentRect_forGlyphRange_usedRect_baselineOffset( &self, fragment_rect: NSRect, glyph_range: NSRange, used_rect: NSRect, baseline_offset: CGFloat )
pub unsafe fn setNotShownAttribute_forGlyphRange( &self, flag: bool, glyph_range: NSRange )
pub unsafe fn setDrawsOutsideLineFragment_forGlyphRange( &self, flag: bool, glyph_range: NSRange )
pub unsafe fn setLocation_withAdvancements_forStartOfGlyphRange( &self, location: NSPoint, advancements: *mut CGFloat, glyph_range: NSRange )
pub unsafe fn setAttachmentSize_forGlyphRange( &self, attachment_size: NSSize, glyph_range: NSRange )
pub unsafe fn setBidiLevels_forGlyphRange( &self, levels: *mut u8, glyph_range: NSRange )
source§impl NSTypesetter
impl NSTypesetter
NSTypesetter_Deprecated
pub unsafe fn actionForControlCharacterAtIndex( &self, char_index: NSUInteger ) -> NSTypesetterControlCharacterAction
pub unsafe fn getGlyphsInRange_glyphs_characterIndexes_glyphInscriptions_elasticBits_bidiLevels( &self, glyphs_range: NSRange, glyph_buffer: *mut NSGlyph, char_index_buffer: *mut NSUInteger, inscribe_buffer: *mut NSGlyphInscription, elastic_buffer: *mut Bool, bidi_level_buffer: *mut c_uchar ) -> NSUInteger
👎Deprecated
Available on crate features
NSFont
and NSLayoutManager
only.pub unsafe fn substituteGlyphsInRange_withGlyphs( &self, glyph_range: NSRange, glyphs: *mut NSGlyph )
👎Deprecated
Available on crate feature
NSFont
only.pub unsafe fn insertGlyph_atGlyphIndex_characterIndex( &self, glyph: NSGlyph, glyph_index: NSUInteger, character_index: NSUInteger )
👎Deprecated
Available on crate feature
NSFont
only.pub unsafe fn deleteGlyphsInRange(&self, glyph_range: NSRange)
👎Deprecated
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 NSTypesetter
impl AsMut<AnyObject> for NSTypesetter
source§impl AsMut<NSObject> for NSTypesetter
impl AsMut<NSObject> for NSTypesetter
source§impl AsMut<NSTypesetter> for NSATSTypesetter
Available on crate feature NSATSTypesetter
only.
impl AsMut<NSTypesetter> for NSATSTypesetter
Available on crate feature
NSATSTypesetter
only.source§fn as_mut(&mut self) -> &mut NSTypesetter
fn as_mut(&mut self) -> &mut NSTypesetter
Converts this type into a mutable reference of the (usually inferred) input type.
source§impl AsMut<NSTypesetter> for NSTypesetter
impl AsMut<NSTypesetter> for NSTypesetter
source§impl AsRef<AnyObject> for NSTypesetter
impl AsRef<AnyObject> for NSTypesetter
source§impl AsRef<NSObject> for NSTypesetter
impl AsRef<NSObject> for NSTypesetter
source§impl AsRef<NSTypesetter> for NSATSTypesetter
Available on crate feature NSATSTypesetter
only.
impl AsRef<NSTypesetter> for NSATSTypesetter
Available on crate feature
NSATSTypesetter
only.source§fn as_ref(&self) -> &NSTypesetter
fn as_ref(&self) -> &NSTypesetter
Converts this type into a shared reference of the (usually inferred) input type.
source§impl AsRef<NSTypesetter> for NSTypesetter
impl AsRef<NSTypesetter> for NSTypesetter
source§impl Borrow<AnyObject> for NSTypesetter
impl Borrow<AnyObject> for NSTypesetter
source§impl Borrow<NSObject> for NSTypesetter
impl Borrow<NSObject> for NSTypesetter
source§impl Borrow<NSTypesetter> for NSATSTypesetter
Available on crate feature NSATSTypesetter
only.
impl Borrow<NSTypesetter> for NSATSTypesetter
Available on crate feature
NSATSTypesetter
only.source§fn borrow(&self) -> &NSTypesetter
fn borrow(&self) -> &NSTypesetter
Immutably borrows from an owned value. Read more
source§impl BorrowMut<AnyObject> for NSTypesetter
impl BorrowMut<AnyObject> for NSTypesetter
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 NSTypesetter
impl BorrowMut<NSObject> for NSTypesetter
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 BorrowMut<NSTypesetter> for NSATSTypesetter
Available on crate feature NSATSTypesetter
only.
impl BorrowMut<NSTypesetter> for NSATSTypesetter
Available on crate feature
NSATSTypesetter
only.source§fn borrow_mut(&mut self) -> &mut NSTypesetter
fn borrow_mut(&mut self) -> &mut NSTypesetter
Mutably borrows from an owned value. Read more
source§impl ClassType for NSTypesetter
impl ClassType for NSTypesetter
§type Mutability = InteriorMutable
type Mutability = InteriorMutable
Whether the type is mutable or immutable. Read more
source§const NAME: &'static str = "NSTypesetter"
const NAME: &'static str = "NSTypesetter"
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 NSTypesetter
impl Debug for NSTypesetter
source§impl Deref for NSTypesetter
impl Deref for NSTypesetter
source§impl DerefMut for NSTypesetter
impl DerefMut for NSTypesetter
source§impl Hash for NSTypesetter
impl Hash for NSTypesetter
source§impl NSObjectProtocol for NSTypesetter
impl NSObjectProtocol for NSTypesetter
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 PartialEq for NSTypesetter
impl PartialEq for NSTypesetter
source§fn eq(&self, other: &NSTypesetter) -> bool
fn eq(&self, other: &NSTypesetter) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl RefEncode for NSTypesetter
impl RefEncode for NSTypesetter
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 NSTypesetter
impl Message for NSTypesetter
impl StructuralPartialEq for NSTypesetter
Auto Trait Implementations§
impl !Freeze for NSTypesetter
impl !RefUnwindSafe for NSTypesetter
impl !Send for NSTypesetter
impl !Sync for NSTypesetter
impl !Unpin for NSTypesetter
impl !UnwindSafe for NSTypesetter
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