objc2_app_kit/generated/
NSFormCell.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12extern_class!(
13 #[unsafe(super(NSActionCell, NSCell, NSObject))]
15 #[derive(Debug, PartialEq, Eq, Hash)]
16 #[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
17 pub struct NSFormCell;
18);
19
20#[cfg(all(
21 feature = "NSAccessibilityProtocols",
22 feature = "NSActionCell",
23 feature = "NSCell"
24))]
25extern_conformance!(
26 unsafe impl NSAccessibility for NSFormCell {}
27);
28
29#[cfg(all(
30 feature = "NSAccessibilityProtocols",
31 feature = "NSActionCell",
32 feature = "NSCell"
33))]
34extern_conformance!(
35 unsafe impl NSAccessibilityElementProtocol for NSFormCell {}
36);
37
38#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
39extern_conformance!(
40 unsafe impl NSCoding for NSFormCell {}
41);
42
43#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
44extern_conformance!(
45 unsafe impl NSCopying for NSFormCell {}
46);
47
48#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
49unsafe impl CopyingHelper for NSFormCell {
50 type Result = Self;
51}
52
53#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
54extern_conformance!(
55 unsafe impl NSObjectProtocol for NSFormCell {}
56);
57
58#[cfg(all(
59 feature = "NSActionCell",
60 feature = "NSCell",
61 feature = "NSUserInterfaceItemIdentification"
62))]
63extern_conformance!(
64 unsafe impl NSUserInterfaceItemIdentification for NSFormCell {}
65);
66
67#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
68impl NSFormCell {
69 extern_methods!(
70 #[unsafe(method(initTextCell:))]
71 #[unsafe(method_family = init)]
72 pub unsafe fn initTextCell(
73 this: Allocated<Self>,
74 string: Option<&NSString>,
75 ) -> Retained<Self>;
76
77 #[unsafe(method(initWithCoder:))]
78 #[unsafe(method_family = init)]
79 pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;
80
81 #[cfg(feature = "NSImage")]
82 #[unsafe(method(initImageCell:))]
83 #[unsafe(method_family = init)]
84 pub unsafe fn initImageCell(
85 this: Allocated<Self>,
86 image: Option<&NSImage>,
87 ) -> Retained<Self>;
88
89 #[cfg(feature = "objc2-core-foundation")]
90 #[unsafe(method(titleWidth:))]
91 #[unsafe(method_family = none)]
92 pub unsafe fn titleWidth_(&self, size: NSSize) -> CGFloat;
93
94 #[cfg(feature = "objc2-core-foundation")]
95 #[unsafe(method(titleWidth))]
96 #[unsafe(method_family = none)]
97 pub unsafe fn titleWidth(&self) -> CGFloat;
98
99 #[cfg(feature = "objc2-core-foundation")]
100 #[unsafe(method(setTitleWidth:))]
102 #[unsafe(method_family = none)]
103 pub unsafe fn setTitleWidth(&self, title_width: CGFloat);
104
105 #[unsafe(method(title))]
106 #[unsafe(method_family = none)]
107 pub unsafe fn title(&self) -> Retained<NSString>;
108
109 #[unsafe(method(setTitle:))]
111 #[unsafe(method_family = none)]
112 pub unsafe fn setTitle(&self, title: &NSString);
113
114 #[cfg(feature = "NSFont")]
115 #[unsafe(method(titleFont))]
116 #[unsafe(method_family = none)]
117 pub unsafe fn titleFont(&self) -> Retained<NSFont>;
118
119 #[cfg(feature = "NSFont")]
120 #[unsafe(method(setTitleFont:))]
122 #[unsafe(method_family = none)]
123 pub unsafe fn setTitleFont(&self, title_font: &NSFont);
124
125 #[unsafe(method(isOpaque))]
126 #[unsafe(method_family = none)]
127 pub unsafe fn isOpaque(&self) -> bool;
128
129 #[unsafe(method(placeholderString))]
130 #[unsafe(method_family = none)]
131 pub unsafe fn placeholderString(&self) -> Option<Retained<NSString>>;
132
133 #[unsafe(method(setPlaceholderString:))]
135 #[unsafe(method_family = none)]
136 pub unsafe fn setPlaceholderString(&self, placeholder_string: Option<&NSString>);
137
138 #[unsafe(method(placeholderAttributedString))]
139 #[unsafe(method_family = none)]
140 pub unsafe fn placeholderAttributedString(&self) -> Option<Retained<NSAttributedString>>;
141
142 #[unsafe(method(setPlaceholderAttributedString:))]
144 #[unsafe(method_family = none)]
145 pub unsafe fn setPlaceholderAttributedString(
146 &self,
147 placeholder_attributed_string: Option<&NSAttributedString>,
148 );
149
150 #[cfg(feature = "NSText")]
151 #[unsafe(method(titleAlignment))]
152 #[unsafe(method_family = none)]
153 pub unsafe fn titleAlignment(&self) -> NSTextAlignment;
154
155 #[cfg(feature = "NSText")]
156 #[unsafe(method(setTitleAlignment:))]
158 #[unsafe(method_family = none)]
159 pub unsafe fn setTitleAlignment(&self, title_alignment: NSTextAlignment);
160
161 #[cfg(feature = "NSText")]
162 #[unsafe(method(titleBaseWritingDirection))]
163 #[unsafe(method_family = none)]
164 pub unsafe fn titleBaseWritingDirection(&self) -> NSWritingDirection;
165
166 #[cfg(feature = "NSText")]
167 #[unsafe(method(setTitleBaseWritingDirection:))]
169 #[unsafe(method_family = none)]
170 pub unsafe fn setTitleBaseWritingDirection(
171 &self,
172 title_base_writing_direction: NSWritingDirection,
173 );
174
175 #[cfg(feature = "objc2-core-foundation")]
176 #[unsafe(method(preferredTextFieldWidth))]
177 #[unsafe(method_family = none)]
178 pub unsafe fn preferredTextFieldWidth(&self) -> CGFloat;
179
180 #[cfg(feature = "objc2-core-foundation")]
181 #[unsafe(method(setPreferredTextFieldWidth:))]
183 #[unsafe(method_family = none)]
184 pub unsafe fn setPreferredTextFieldWidth(&self, preferred_text_field_width: CGFloat);
185 );
186}
187
188#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
190impl NSFormCell {
191 extern_methods!(
192 #[unsafe(method(init))]
193 #[unsafe(method_family = init)]
194 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
195 );
196}
197
198#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
200impl NSFormCell {
201 extern_methods!(
202 #[unsafe(method(new))]
203 #[unsafe(method_family = new)]
204 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
205 );
206}
207
208#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
210impl NSFormCell {
211 extern_methods!(
212 #[deprecated]
213 #[unsafe(method(setTitleWithMnemonic:))]
214 #[unsafe(method_family = none)]
215 pub unsafe fn setTitleWithMnemonic(&self, string_with_ampersand: Option<&NSString>);
216 );
217}
218
219#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
221impl NSFormCell {
222 extern_methods!(
223 #[unsafe(method(attributedTitle))]
224 #[unsafe(method_family = none)]
225 pub unsafe fn attributedTitle(&self) -> Retained<NSAttributedString>;
226
227 #[unsafe(method(setAttributedTitle:))]
229 #[unsafe(method_family = none)]
230 pub unsafe fn setAttributedTitle(&self, attributed_title: &NSAttributedString);
231 );
232}