NSLayoutManagerDelegate

Trait NSLayoutManagerDelegate 

Source
pub unsafe trait NSLayoutManagerDelegate: NSObjectProtocol {
    // Provided methods
    unsafe fn layoutManager_shouldGenerateGlyphs_properties_characterIndexes_font_forGlyphRange(
        &self,
        layout_manager: &NSLayoutManager,
        glyphs: NonNull<CGGlyph>,
        props: NonNull<NSGlyphProperty>,
        char_indexes: NonNull<NSUInteger>,
        a_font: &UIFont,
        glyph_range: NSRange,
    ) -> NSUInteger
       where Self: Sized + Message { ... }
    fn layoutManager_lineSpacingAfterGlyphAtIndex_withProposedLineFragmentRect(
        &self,
        layout_manager: &NSLayoutManager,
        glyph_index: NSUInteger,
        rect: CGRect,
    ) -> CGFloat
       where Self: Sized + Message { ... }
    fn layoutManager_paragraphSpacingBeforeGlyphAtIndex_withProposedLineFragmentRect(
        &self,
        layout_manager: &NSLayoutManager,
        glyph_index: NSUInteger,
        rect: CGRect,
    ) -> CGFloat
       where Self: Sized + Message { ... }
    fn layoutManager_paragraphSpacingAfterGlyphAtIndex_withProposedLineFragmentRect(
        &self,
        layout_manager: &NSLayoutManager,
        glyph_index: NSUInteger,
        rect: CGRect,
    ) -> CGFloat
       where Self: Sized + Message { ... }
    fn layoutManager_shouldUseAction_forControlCharacterAtIndex(
        &self,
        layout_manager: &NSLayoutManager,
        action: NSControlCharacterAction,
        char_index: NSUInteger,
    ) -> NSControlCharacterAction
       where Self: Sized + Message { ... }
    fn layoutManager_shouldBreakLineByWordBeforeCharacterAtIndex(
        &self,
        layout_manager: &NSLayoutManager,
        char_index: NSUInteger,
    ) -> bool
       where Self: Sized + Message { ... }
    fn layoutManager_shouldBreakLineByHyphenatingBeforeCharacterAtIndex(
        &self,
        layout_manager: &NSLayoutManager,
        char_index: NSUInteger,
    ) -> bool
       where Self: Sized + Message { ... }
    fn layoutManager_boundingBoxForControlGlyphAtIndex_forTextContainer_proposedLineFragment_glyphPosition_characterIndex(
        &self,
        layout_manager: &NSLayoutManager,
        glyph_index: NSUInteger,
        text_container: &NSTextContainer,
        proposed_rect: CGRect,
        glyph_position: CGPoint,
        char_index: NSUInteger,
    ) -> CGRect
       where Self: Sized + Message { ... }
    unsafe fn layoutManager_shouldSetLineFragmentRect_lineFragmentUsedRect_baselineOffset_inTextContainer_forGlyphRange(
        &self,
        layout_manager: &NSLayoutManager,
        line_fragment_rect: NonNull<CGRect>,
        line_fragment_used_rect: NonNull<CGRect>,
        baseline_offset: NonNull<CGFloat>,
        text_container: &NSTextContainer,
        glyph_range: NSRange,
    ) -> bool
       where Self: Sized + Message { ... }
    fn layoutManagerDidInvalidateLayout(&self, sender: &NSLayoutManager)
       where Self: Sized + Message { ... }
    fn layoutManager_didCompleteLayoutForTextContainer_atEnd(
        &self,
        layout_manager: &NSLayoutManager,
        text_container: Option<&NSTextContainer>,
        layout_finished_flag: bool,
    )
       where Self: Sized + Message { ... }
    fn layoutManager_textContainer_didChangeGeometryFromSize(
        &self,
        layout_manager: &NSLayoutManager,
        text_container: &NSTextContainer,
        old_size: CGSize,
    )
       where Self: Sized + Message { ... }
}
Available on crate feature NSLayoutManager only.
Expand description

Provided Methods§

Source

unsafe fn layoutManager_shouldGenerateGlyphs_properties_characterIndexes_font_forGlyphRange( &self, layout_manager: &NSLayoutManager, glyphs: NonNull<CGGlyph>, props: NonNull<NSGlyphProperty>, char_indexes: NonNull<NSUInteger>, a_font: &UIFont, glyph_range: NSRange, ) -> NSUInteger
where Self: Sized + Message,

Available on crate features UIFont and objc2-core-graphics only.

********************** Glyph generation ***********************

§Safety
  • glyphs must be a valid pointer.
  • props must be a valid pointer.
  • char_indexes must be a valid pointer.
Source

fn layoutManager_lineSpacingAfterGlyphAtIndex_withProposedLineFragmentRect( &self, layout_manager: &NSLayoutManager, glyph_index: NSUInteger, rect: CGRect, ) -> CGFloat
where Self: Sized + Message,

Available on crate feature objc2-core-foundation only.

********************** Line layout ***********************

Source

fn layoutManager_paragraphSpacingBeforeGlyphAtIndex_withProposedLineFragmentRect( &self, layout_manager: &NSLayoutManager, glyph_index: NSUInteger, rect: CGRect, ) -> CGFloat
where Self: Sized + Message,

Available on crate feature objc2-core-foundation only.
Source

fn layoutManager_paragraphSpacingAfterGlyphAtIndex_withProposedLineFragmentRect( &self, layout_manager: &NSLayoutManager, glyph_index: NSUInteger, rect: CGRect, ) -> CGFloat
where Self: Sized + Message,

Available on crate feature objc2-core-foundation only.
Source

fn layoutManager_shouldUseAction_forControlCharacterAtIndex( &self, layout_manager: &NSLayoutManager, action: NSControlCharacterAction, char_index: NSUInteger, ) -> NSControlCharacterAction
where Self: Sized + Message,

Source

fn layoutManager_shouldBreakLineByWordBeforeCharacterAtIndex( &self, layout_manager: &NSLayoutManager, char_index: NSUInteger, ) -> bool
where Self: Sized + Message,

Source

fn layoutManager_shouldBreakLineByHyphenatingBeforeCharacterAtIndex( &self, layout_manager: &NSLayoutManager, char_index: NSUInteger, ) -> bool
where Self: Sized + Message,

Source

fn layoutManager_boundingBoxForControlGlyphAtIndex_forTextContainer_proposedLineFragment_glyphPosition_characterIndex( &self, layout_manager: &NSLayoutManager, glyph_index: NSUInteger, text_container: &NSTextContainer, proposed_rect: CGRect, glyph_position: CGPoint, char_index: NSUInteger, ) -> CGRect
where Self: Sized + Message,

Available on crate features NSTextContainer and objc2-core-foundation only.
Source

unsafe fn layoutManager_shouldSetLineFragmentRect_lineFragmentUsedRect_baselineOffset_inTextContainer_forGlyphRange( &self, layout_manager: &NSLayoutManager, line_fragment_rect: NonNull<CGRect>, line_fragment_used_rect: NonNull<CGRect>, baseline_offset: NonNull<CGFloat>, text_container: &NSTextContainer, glyph_range: NSRange, ) -> bool
where Self: Sized + Message,

Available on crate features NSTextContainer and objc2-core-foundation only.
§Safety
  • line_fragment_rect must be a valid pointer.
  • line_fragment_used_rect must be a valid pointer.
  • baseline_offset must be a valid pointer.
Source

fn layoutManagerDidInvalidateLayout(&self, sender: &NSLayoutManager)
where Self: Sized + Message,

********************** Layout processing ***********************

Source

fn layoutManager_didCompleteLayoutForTextContainer_atEnd( &self, layout_manager: &NSLayoutManager, text_container: Option<&NSTextContainer>, layout_finished_flag: bool, )
where Self: Sized + Message,

Available on crate feature NSTextContainer only.
Source

fn layoutManager_textContainer_didChangeGeometryFromSize( &self, layout_manager: &NSLayoutManager, text_container: &NSTextContainer, old_size: CGSize, )
where Self: Sized + Message,

Available on crate features NSTextContainer and objc2-core-foundation only.

Trait Implementations§

Source§

impl ProtocolType for dyn NSLayoutManagerDelegate

Source§

const NAME: &'static str = "NSLayoutManagerDelegate"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
Source§

impl<T> ImplementedBy<T> for dyn NSLayoutManagerDelegate

Implementations on Foreign Types§

Source§

impl<T> NSLayoutManagerDelegate for ProtocolObject<T>

Implementors§