Skip to main content

NSControlTextEditingDelegate

Trait NSControlTextEditingDelegate 

Source
pub unsafe trait NSControlTextEditingDelegate: NSObjectProtocol + MainThreadOnly {
    // Provided methods
    fn controlTextDidBeginEditing(&self, obj: &NSNotification)
       where Self: Sized + Message { ... }
    fn controlTextDidEndEditing(&self, obj: &NSNotification)
       where Self: Sized + Message { ... }
    fn controlTextDidChange(&self, obj: &NSNotification)
       where Self: Sized + Message { ... }
    fn control_textShouldBeginEditing(
        &self,
        control: &NSControl,
        field_editor: &NSText,
    ) -> bool
       where Self: Sized + Message { ... }
    fn control_textShouldEndEditing(
        &self,
        control: &NSControl,
        field_editor: &NSText,
    ) -> bool
       where Self: Sized + Message { ... }
    fn control_didFailToFormatString_errorDescription(
        &self,
        control: &NSControl,
        string: &NSString,
        error: Option<&NSString>,
    ) -> bool
       where Self: Sized + Message { ... }
    fn control_didFailToValidatePartialString_errorDescription(
        &self,
        control: &NSControl,
        string: &NSString,
        error: Option<&NSString>,
    )
       where Self: Sized + Message { ... }
    unsafe fn control_isValidObject(
        &self,
        control: &NSControl,
        obj: Option<&AnyObject>,
    ) -> bool
       where Self: Sized + Message { ... }
    unsafe fn control_textView_doCommandBySelector(
        &self,
        control: &NSControl,
        text_view: &NSTextView,
        command_selector: Sel,
    ) -> bool
       where Self: Sized + Message { ... }
    unsafe fn control_textView_completions_forPartialWordRange_indexOfSelectedItem(
        &self,
        control: &NSControl,
        text_view: &NSTextView,
        words: &NSArray<NSString>,
        char_range: NSRange,
        index: NonNull<NSInteger>,
    ) -> Retained<NSArray<NSString>>
       where Self: Sized + Message { ... }
}
Available on crate feature NSControl only.
Expand description

Provided Methods§

Source

fn controlTextDidBeginEditing(&self, obj: &NSNotification)
where Self: Sized + Message,

Source

fn controlTextDidEndEditing(&self, obj: &NSNotification)
where Self: Sized + Message,

Source

fn controlTextDidChange(&self, obj: &NSNotification)
where Self: Sized + Message,

Source

fn control_textShouldBeginEditing( &self, control: &NSControl, field_editor: &NSText, ) -> bool
where Self: Sized + Message,

Available on crate features NSResponder and NSText and NSView only.
Source

fn control_textShouldEndEditing( &self, control: &NSControl, field_editor: &NSText, ) -> bool
where Self: Sized + Message,

Available on crate features NSResponder and NSText and NSView only.
Source

fn control_didFailToFormatString_errorDescription( &self, control: &NSControl, string: &NSString, error: Option<&NSString>, ) -> bool
where Self: Sized + Message,

Available on crate features NSResponder and NSView only.
Source

fn control_didFailToValidatePartialString_errorDescription( &self, control: &NSControl, string: &NSString, error: Option<&NSString>, )
where Self: Sized + Message,

Available on crate features NSResponder and NSView only.
Source

unsafe fn control_isValidObject( &self, control: &NSControl, obj: Option<&AnyObject>, ) -> bool
where Self: Sized + Message,

Available on crate features NSResponder and NSView only.
§Safety

obj should be of the correct type.

Source

unsafe fn control_textView_doCommandBySelector( &self, control: &NSControl, text_view: &NSTextView, command_selector: Sel, ) -> bool
where Self: Sized + Message,

Available on crate features NSResponder and NSText and NSTextView and NSView only.
§Safety

command_selector must be a valid selector.

Source

unsafe fn control_textView_completions_forPartialWordRange_indexOfSelectedItem( &self, control: &NSControl, text_view: &NSTextView, words: &NSArray<NSString>, char_range: NSRange, index: NonNull<NSInteger>, ) -> Retained<NSArray<NSString>>
where Self: Sized + Message,

Available on crate features NSResponder and NSText and NSTextView and NSView only.
§Safety

index must be a valid pointer.

Trait Implementations§

Source§

impl<T> ImplementedBy<T> for dyn NSControlTextEditingDelegate

Source§

impl ProtocolType for dyn NSControlTextEditingDelegate

Source§

const NAME: &'static str = "NSControlTextEditingDelegate"

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

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> NSControlTextEditingDelegate for ProtocolObject<T>

Implementors§