#include <assert.h>
#include "TableRowView.h"
#include "TableView.h"
Go to the source code of this file.
◆ _Class
◆ _TableRowView()
Class * _TableRowView |
( |
void |
| ) |
|
Definition at line 162 of file TableRowView.c.
162 {
163 static Class *clazz;
164 static Once once;
165
166 do_once(&once, {
167 clazz = _initialize(&(const ClassDef) {
168 .name = "TableRowView",
172 .interfaceSize = sizeof(TableRowViewInterface),
174 });
175 });
176
177 return clazz;
178}
static void initialize(Class *clazz)
Class * _StackView(void)
The StackView archetype.
◆ addCell()
Definition at line 69 of file TableRowView.c.
69 {
70
71 assert(cell);
72
73 $(self->
cells, addObject, cell);
74
76}
MutableArray * cells
The cells.
Views are the fundamental building blocks of ObjectivelyMVC user interfaces.
void addSubview(View *self, View *subview)
Adds a subview to this view, to be drawn above its siblings.
◆ dealloc()
static void dealloc |
( |
Object * |
self | ) |
|
|
static |
- See also
- Object::dealloc(Object *)
Definition at line 36 of file TableRowView.c.
36 {
37
39
40 release(this->cells);
41
43}
static void dealloc(Object *self)
◆ initialize()
static void initialize |
( |
Class * |
clazz | ) |
|
|
static |
- See also
- Class::initialize(Class *)
Definition at line 145 of file TableRowView.c.
145 {
146
147 ((ObjectInterface *) clazz->interface)->dealloc =
dealloc;
148
149 ((ViewInterface *) clazz->interface)->matchesSelector =
matchesSelector;
150
151 ((TableRowViewInterface *) clazz->interface)->addCell =
addCell;
152 ((TableRowViewInterface *) clazz->interface)->initWithTableView =
initWithTableView;
154 ((TableRowViewInterface *) clazz->interface)->removeCell =
removeCell;
155 ((TableRowViewInterface *) clazz->interface)->setSelected =
setSelected;
156}
void setSelected(CollectionItemView *self, _Bool isSelected)
Sets the selected state of this item.
void removeAllCells(TableRowView *self)
Removes all cells from this row.
void removeCell(TableRowView *self, TableCellView *cell)
Removes the specified cell from this row.
void addCell(TableRowView *self, TableCellView *cell)
Adds the specified cell to this row.
_Bool matchesSelector(const View *self, const SimpleSelector *simpleSelector)
◆ initWithTableView()
Definition at line 82 of file TableRowView.c.
82 {
83
85 if (self) {
86
87 const Array *columns = (Array *) tableView->
columns;
88
89 self->
cells = $$(MutableArray, arrayWithCapacity, columns->count);
91
94 }
95
96 return self;
97}
Box * initWithFrame(Box *self, const SDL_Rect *frame)
Initializes this Box with the given frame.
StackViews are containers that manage the arrangement of their subviews.
TableView * tableView
The table.
MutableArray * columns
The column definitions.
◆ matchesSelector()
◆ removeAllCells()
Definition at line 111 of file TableRowView.c.
111 {
113}
static void removeAllCells_enumerate(const Array *array, ident obj, ident data)
ArrayEnumerator to remove TableCellViews from the row.
◆ removeAllCells_enumerate()
static void removeAllCells_enumerate |
( |
const Array * |
array, |
|
|
ident |
obj, |
|
|
ident |
data |
|
) |
| |
|
static |
ArrayEnumerator to remove TableCellViews from the row.
Definition at line 102 of file TableRowView.c.
102 {
104}
void removeFromSuperview(View *self)
Removes this View from its superview.
◆ removeCell()
Definition at line 119 of file TableRowView.c.
119 {
120
121 assert(cell);
122
123 $(self->
cells, removeObject, cell);
124
126}
void removeSubview(View *self, View *subview)
Removes the given subview from this View.
◆ setSelected()
static void setSelected |
( |
TableRowView * |
self, |
|
|
_Bool |
isSelected |
|
) |
| |
|
static |
Definition at line 132 of file TableRowView.c.
132 {
133
137 }
138}
_Bool isSelected
True when this row is selected, false otherwise.
void invalidateStyle(View *self)
Invalidates the computed Style for this View and its descendants.