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))]
25unsafe impl NSAccessibility for NSFormCell {}
26
27#[cfg(all(
28 feature = "NSAccessibilityProtocols",
29 feature = "NSActionCell",
30 feature = "NSCell"
31))]
32unsafe impl NSAccessibilityElementProtocol for NSFormCell {}
33
34#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
35unsafe impl NSCoding for NSFormCell {}
36
37#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
38unsafe impl NSCopying for NSFormCell {}
39
40#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
41unsafe impl CopyingHelper for NSFormCell {
42 type Result = Self;
43}
44
45#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
46unsafe impl NSObjectProtocol for NSFormCell {}
47
48#[cfg(all(
49 feature = "NSActionCell",
50 feature = "NSCell",
51 feature = "NSUserInterfaceItemIdentification"
52))]
53unsafe impl NSUserInterfaceItemIdentification for NSFormCell {}
54
55#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
56impl NSFormCell {
57 extern_methods!(
58 #[unsafe(method(initTextCell:))]
59 #[unsafe(method_family = init)]
60 pub unsafe fn initTextCell(
61 this: Allocated<Self>,
62 string: Option<&NSString>,
63 ) -> Retained<Self>;
64
65 #[unsafe(method(initWithCoder:))]
66 #[unsafe(method_family = init)]
67 pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;
68
69 #[cfg(feature = "NSImage")]
70 #[unsafe(method(initImageCell:))]
71 #[unsafe(method_family = init)]
72 pub unsafe fn initImageCell(
73 this: Allocated<Self>,
74 image: Option<&NSImage>,
75 ) -> Retained<Self>;
76
77 #[cfg(feature = "objc2-core-foundation")]
78 #[unsafe(method(titleWidth:))]
79 #[unsafe(method_family = none)]
80 pub unsafe fn titleWidth_(&self, size: NSSize) -> CGFloat;
81
82 #[cfg(feature = "objc2-core-foundation")]
83 #[unsafe(method(titleWidth))]
84 #[unsafe(method_family = none)]
85 pub unsafe fn titleWidth(&self) -> CGFloat;
86
87 #[cfg(feature = "objc2-core-foundation")]
88 #[unsafe(method(setTitleWidth:))]
90 #[unsafe(method_family = none)]
91 pub unsafe fn setTitleWidth(&self, title_width: CGFloat);
92
93 #[unsafe(method(title))]
94 #[unsafe(method_family = none)]
95 pub unsafe fn title(&self) -> Retained<NSString>;
96
97 #[unsafe(method(setTitle:))]
99 #[unsafe(method_family = none)]
100 pub unsafe fn setTitle(&self, title: &NSString);
101
102 #[cfg(feature = "NSFont")]
103 #[unsafe(method(titleFont))]
104 #[unsafe(method_family = none)]
105 pub unsafe fn titleFont(&self) -> Retained<NSFont>;
106
107 #[cfg(feature = "NSFont")]
108 #[unsafe(method(setTitleFont:))]
110 #[unsafe(method_family = none)]
111 pub unsafe fn setTitleFont(&self, title_font: &NSFont);
112
113 #[unsafe(method(isOpaque))]
114 #[unsafe(method_family = none)]
115 pub unsafe fn isOpaque(&self) -> bool;
116
117 #[unsafe(method(placeholderString))]
118 #[unsafe(method_family = none)]
119 pub unsafe fn placeholderString(&self) -> Option<Retained<NSString>>;
120
121 #[unsafe(method(setPlaceholderString:))]
123 #[unsafe(method_family = none)]
124 pub unsafe fn setPlaceholderString(&self, placeholder_string: Option<&NSString>);
125
126 #[unsafe(method(placeholderAttributedString))]
127 #[unsafe(method_family = none)]
128 pub unsafe fn placeholderAttributedString(&self) -> Option<Retained<NSAttributedString>>;
129
130 #[unsafe(method(setPlaceholderAttributedString:))]
132 #[unsafe(method_family = none)]
133 pub unsafe fn setPlaceholderAttributedString(
134 &self,
135 placeholder_attributed_string: Option<&NSAttributedString>,
136 );
137
138 #[cfg(feature = "NSText")]
139 #[unsafe(method(titleAlignment))]
140 #[unsafe(method_family = none)]
141 pub unsafe fn titleAlignment(&self) -> NSTextAlignment;
142
143 #[cfg(feature = "NSText")]
144 #[unsafe(method(setTitleAlignment:))]
146 #[unsafe(method_family = none)]
147 pub unsafe fn setTitleAlignment(&self, title_alignment: NSTextAlignment);
148
149 #[cfg(feature = "NSText")]
150 #[unsafe(method(titleBaseWritingDirection))]
151 #[unsafe(method_family = none)]
152 pub unsafe fn titleBaseWritingDirection(&self) -> NSWritingDirection;
153
154 #[cfg(feature = "NSText")]
155 #[unsafe(method(setTitleBaseWritingDirection:))]
157 #[unsafe(method_family = none)]
158 pub unsafe fn setTitleBaseWritingDirection(
159 &self,
160 title_base_writing_direction: NSWritingDirection,
161 );
162
163 #[cfg(feature = "objc2-core-foundation")]
164 #[unsafe(method(preferredTextFieldWidth))]
165 #[unsafe(method_family = none)]
166 pub unsafe fn preferredTextFieldWidth(&self) -> CGFloat;
167
168 #[cfg(feature = "objc2-core-foundation")]
169 #[unsafe(method(setPreferredTextFieldWidth:))]
171 #[unsafe(method_family = none)]
172 pub unsafe fn setPreferredTextFieldWidth(&self, preferred_text_field_width: CGFloat);
173 );
174}
175
176#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
178impl NSFormCell {
179 extern_methods!(
180 #[unsafe(method(init))]
181 #[unsafe(method_family = init)]
182 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
183 );
184}
185
186#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
188impl NSFormCell {
189 extern_methods!(
190 #[unsafe(method(new))]
191 #[unsafe(method_family = new)]
192 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
193 );
194}
195
196#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
198impl NSFormCell {
199 extern_methods!(
200 #[deprecated]
201 #[unsafe(method(setTitleWithMnemonic:))]
202 #[unsafe(method_family = none)]
203 pub unsafe fn setTitleWithMnemonic(&self, string_with_ampersand: Option<&NSString>);
204 );
205}
206
207#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
209impl NSFormCell {
210 extern_methods!(
211 #[unsafe(method(attributedTitle))]
212 #[unsafe(method_family = none)]
213 pub unsafe fn attributedTitle(&self) -> Retained<NSAttributedString>;
214
215 #[unsafe(method(setAttributedTitle:))]
217 #[unsafe(method_family = none)]
218 pub unsafe fn setAttributedTitle(&self, attributed_title: &NSAttributedString);
219 );
220}