icrate/generated/AppKit/
NSTableColumn.rs1use crate::common::*;
4use crate::AppKit::*;
5use crate::CoreData::*;
6use crate::Foundation::*;
7
8ns_options!(
9 #[underlying(NSUInteger)]
10 pub enum NSTableColumnResizingOptions {
11 NSTableColumnNoResizing = 0,
12 NSTableColumnAutoresizingMask = 1 << 0,
13 NSTableColumnUserResizingMask = 1 << 1,
14 }
15);
16
17extern_class!(
18 #[derive(Debug, PartialEq, Eq, Hash)]
19 #[cfg(feature = "AppKit_NSTableColumn")]
20 pub struct NSTableColumn;
21
22 #[cfg(feature = "AppKit_NSTableColumn")]
23 unsafe impl ClassType for NSTableColumn {
24 type Super = NSObject;
25 type Mutability = InteriorMutable;
26 }
27);
28
29#[cfg(feature = "AppKit_NSTableColumn")]
30unsafe impl NSCoding for NSTableColumn {}
31
32#[cfg(feature = "AppKit_NSTableColumn")]
33unsafe impl NSObjectProtocol for NSTableColumn {}
34
35#[cfg(feature = "AppKit_NSTableColumn")]
36unsafe impl NSUserInterfaceItemIdentification for NSTableColumn {}
37
38extern_methods!(
39 #[cfg(feature = "AppKit_NSTableColumn")]
40 unsafe impl NSTableColumn {
41 #[method_id(@__retain_semantics Init initWithIdentifier:)]
42 pub unsafe fn initWithIdentifier(
43 this: Allocated<Self>,
44 identifier: &NSUserInterfaceItemIdentifier,
45 ) -> Id<Self>;
46
47 #[cfg(feature = "Foundation_NSCoder")]
48 #[method_id(@__retain_semantics Init initWithCoder:)]
49 pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Id<Self>;
50
51 #[method_id(@__retain_semantics Other identifier)]
52 pub unsafe fn identifier(&self) -> Id<NSUserInterfaceItemIdentifier>;
53
54 #[method(setIdentifier:)]
55 pub unsafe fn setIdentifier(&self, identifier: &NSUserInterfaceItemIdentifier);
56
57 #[cfg(feature = "AppKit_NSTableView")]
58 #[method_id(@__retain_semantics Other tableView)]
59 pub unsafe fn tableView(&self, mtm: MainThreadMarker) -> Option<Id<NSTableView>>;
60
61 #[cfg(feature = "AppKit_NSTableView")]
62 #[method(setTableView:)]
63 pub unsafe fn setTableView(&self, table_view: Option<&NSTableView>);
64
65 #[method(width)]
66 pub unsafe fn width(&self) -> CGFloat;
67
68 #[method(setWidth:)]
69 pub unsafe fn setWidth(&self, width: CGFloat);
70
71 #[method(minWidth)]
72 pub unsafe fn minWidth(&self) -> CGFloat;
73
74 #[method(setMinWidth:)]
75 pub unsafe fn setMinWidth(&self, min_width: CGFloat);
76
77 #[method(maxWidth)]
78 pub unsafe fn maxWidth(&self) -> CGFloat;
79
80 #[method(setMaxWidth:)]
81 pub unsafe fn setMaxWidth(&self, max_width: CGFloat);
82
83 #[cfg(feature = "Foundation_NSString")]
84 #[method_id(@__retain_semantics Other title)]
85 pub unsafe fn title(&self) -> Id<NSString>;
86
87 #[cfg(feature = "Foundation_NSString")]
88 #[method(setTitle:)]
89 pub unsafe fn setTitle(&self, title: &NSString);
90
91 #[cfg(feature = "AppKit_NSTableHeaderCell")]
92 #[method_id(@__retain_semantics Other headerCell)]
93 pub unsafe fn headerCell(&self, mtm: MainThreadMarker) -> Id<NSTableHeaderCell>;
94
95 #[cfg(feature = "AppKit_NSTableHeaderCell")]
96 #[method(setHeaderCell:)]
97 pub unsafe fn setHeaderCell(&self, header_cell: &NSTableHeaderCell);
98
99 #[method(isEditable)]
100 pub unsafe fn isEditable(&self) -> bool;
101
102 #[method(setEditable:)]
103 pub unsafe fn setEditable(&self, editable: bool);
104
105 #[method(sizeToFit)]
106 pub unsafe fn sizeToFit(&self);
107
108 #[cfg(feature = "Foundation_NSSortDescriptor")]
109 #[method_id(@__retain_semantics Other sortDescriptorPrototype)]
110 pub unsafe fn sortDescriptorPrototype(&self) -> Option<Id<NSSortDescriptor>>;
111
112 #[cfg(feature = "Foundation_NSSortDescriptor")]
113 #[method(setSortDescriptorPrototype:)]
114 pub unsafe fn setSortDescriptorPrototype(
115 &self,
116 sort_descriptor_prototype: Option<&NSSortDescriptor>,
117 );
118
119 #[method(resizingMask)]
120 pub unsafe fn resizingMask(&self) -> NSTableColumnResizingOptions;
121
122 #[method(setResizingMask:)]
123 pub unsafe fn setResizingMask(&self, resizing_mask: NSTableColumnResizingOptions);
124
125 #[cfg(feature = "Foundation_NSString")]
126 #[method_id(@__retain_semantics Other headerToolTip)]
127 pub unsafe fn headerToolTip(&self) -> Option<Id<NSString>>;
128
129 #[cfg(feature = "Foundation_NSString")]
130 #[method(setHeaderToolTip:)]
131 pub unsafe fn setHeaderToolTip(&self, header_tool_tip: Option<&NSString>);
132
133 #[method(isHidden)]
134 pub unsafe fn isHidden(&self) -> bool;
135
136 #[method(setHidden:)]
137 pub unsafe fn setHidden(&self, hidden: bool);
138 }
139);
140
141extern_methods!(
142 #[cfg(feature = "AppKit_NSTableColumn")]
144 unsafe impl NSTableColumn {
145 #[method_id(@__retain_semantics Init init)]
146 pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
147
148 #[method_id(@__retain_semantics New new)]
149 pub unsafe fn new() -> Id<Self>;
150 }
151);
152
153extern_methods!(
154 #[cfg(feature = "AppKit_NSTableColumn")]
156 unsafe impl NSTableColumn {
157 #[deprecated]
158 #[method(setResizable:)]
159 pub unsafe fn setResizable(&self, flag: bool);
160
161 #[deprecated]
162 #[method(isResizable)]
163 pub unsafe fn isResizable(&self) -> bool;
164
165 #[method_id(@__retain_semantics Other dataCell)]
166 pub unsafe fn dataCell(&self) -> Id<AnyObject>;
167
168 #[method(setDataCell:)]
169 pub unsafe fn setDataCell(&self, data_cell: &AnyObject);
170
171 #[method_id(@__retain_semantics Other dataCellForRow:)]
172 pub unsafe fn dataCellForRow(&self, row: NSInteger) -> Id<AnyObject>;
173 }
174);