use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(NSActionCell, NSCell, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
pub struct NSFormCell;
);
#[cfg(all(
feature = "NSAccessibilityProtocols",
feature = "NSActionCell",
feature = "NSCell"
))]
extern_conformance!(
unsafe impl NSAccessibility for NSFormCell {}
);
#[cfg(all(
feature = "NSAccessibilityProtocols",
feature = "NSActionCell",
feature = "NSCell"
))]
extern_conformance!(
unsafe impl NSAccessibilityElementProtocol for NSFormCell {}
);
#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
extern_conformance!(
unsafe impl NSCoding for NSFormCell {}
);
#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
extern_conformance!(
unsafe impl NSCopying for NSFormCell {}
);
#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
unsafe impl CopyingHelper for NSFormCell {
type Result = Self;
}
#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
extern_conformance!(
unsafe impl NSObjectProtocol for NSFormCell {}
);
#[cfg(all(
feature = "NSActionCell",
feature = "NSCell",
feature = "NSUserInterfaceItemIdentification"
))]
extern_conformance!(
unsafe impl NSUserInterfaceItemIdentification for NSFormCell {}
);
#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
impl NSFormCell {
extern_methods!(
#[unsafe(method(initTextCell:))]
#[unsafe(method_family = init)]
pub fn initTextCell(this: Allocated<Self>, string: Option<&NSString>) -> Retained<Self>;
#[unsafe(method(initWithCoder:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;
#[cfg(feature = "NSImage")]
#[unsafe(method(initImageCell:))]
#[unsafe(method_family = init)]
pub unsafe fn initImageCell(
this: Allocated<Self>,
image: Option<&NSImage>,
) -> Retained<Self>;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(titleWidth:))]
#[unsafe(method_family = none)]
pub fn titleWidth_(&self, size: NSSize) -> CGFloat;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(titleWidth))]
#[unsafe(method_family = none)]
pub fn titleWidth(&self) -> CGFloat;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(setTitleWidth:))]
#[unsafe(method_family = none)]
pub fn setTitleWidth(&self, title_width: CGFloat);
#[unsafe(method(title))]
#[unsafe(method_family = none)]
pub fn title(&self) -> Retained<NSString>;
#[unsafe(method(setTitle:))]
#[unsafe(method_family = none)]
pub fn setTitle(&self, title: &NSString);
#[cfg(feature = "NSFont")]
#[unsafe(method(titleFont))]
#[unsafe(method_family = none)]
pub fn titleFont(&self) -> Retained<NSFont>;
#[cfg(feature = "NSFont")]
#[unsafe(method(setTitleFont:))]
#[unsafe(method_family = none)]
pub fn setTitleFont(&self, title_font: &NSFont);
#[unsafe(method(isOpaque))]
#[unsafe(method_family = none)]
pub fn isOpaque(&self) -> bool;
#[unsafe(method(placeholderString))]
#[unsafe(method_family = none)]
pub fn placeholderString(&self) -> Option<Retained<NSString>>;
#[unsafe(method(setPlaceholderString:))]
#[unsafe(method_family = none)]
pub fn setPlaceholderString(&self, placeholder_string: Option<&NSString>);
#[unsafe(method(placeholderAttributedString))]
#[unsafe(method_family = none)]
pub fn placeholderAttributedString(&self) -> Option<Retained<NSAttributedString>>;
#[unsafe(method(setPlaceholderAttributedString:))]
#[unsafe(method_family = none)]
pub fn setPlaceholderAttributedString(
&self,
placeholder_attributed_string: Option<&NSAttributedString>,
);
#[cfg(feature = "NSText")]
#[unsafe(method(titleAlignment))]
#[unsafe(method_family = none)]
pub fn titleAlignment(&self) -> NSTextAlignment;
#[cfg(feature = "NSText")]
#[unsafe(method(setTitleAlignment:))]
#[unsafe(method_family = none)]
pub fn setTitleAlignment(&self, title_alignment: NSTextAlignment);
#[cfg(feature = "NSText")]
#[unsafe(method(titleBaseWritingDirection))]
#[unsafe(method_family = none)]
pub fn titleBaseWritingDirection(&self) -> NSWritingDirection;
#[cfg(feature = "NSText")]
#[unsafe(method(setTitleBaseWritingDirection:))]
#[unsafe(method_family = none)]
pub fn setTitleBaseWritingDirection(
&self,
title_base_writing_direction: NSWritingDirection,
);
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(preferredTextFieldWidth))]
#[unsafe(method_family = none)]
pub fn preferredTextFieldWidth(&self) -> CGFloat;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(setPreferredTextFieldWidth:))]
#[unsafe(method_family = none)]
pub fn setPreferredTextFieldWidth(&self, preferred_text_field_width: CGFloat);
);
}
#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
impl NSFormCell {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
impl NSFormCell {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}
#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
impl NSFormCell {
extern_methods!(
#[deprecated]
#[unsafe(method(setTitleWithMnemonic:))]
#[unsafe(method_family = none)]
pub unsafe fn setTitleWithMnemonic(&self, string_with_ampersand: Option<&NSString>);
);
}
#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
impl NSFormCell {
extern_methods!(
#[unsafe(method(attributedTitle))]
#[unsafe(method_family = none)]
pub fn attributedTitle(&self) -> Retained<NSAttributedString>;
#[unsafe(method(setAttributedTitle:))]
#[unsafe(method_family = none)]
pub fn setAttributedTitle(&self, attributed_title: &NSAttributedString);
);
}