29#define _Class _TableRowView
55 if (strcmp(
"selected", simpleSelector->
pattern) == 0) {
63#pragma mark - TableRowView
73 $(self->
cells, addObject, cell);
87 const Array *columns = (Array *) tableView->
columns;
89 self->
cells = $$(MutableArray, arrayWithCapacity, columns->count);
123 $(self->
cells, removeObject, cell);
140#pragma mark - Class lifecycle
147 ((ObjectInterface *) clazz->interface)->dealloc =
dealloc;
149 ((ViewInterface *) clazz->interface)->matchesSelector =
matchesSelector;
151 ((TableRowViewInterface *) clazz->interface)->addCell =
addCell;
152 ((TableRowViewInterface *) clazz->interface)->initWithTableView =
initWithTableView;
154 ((TableRowViewInterface *) clazz->interface)->removeCell =
removeCell;
155 ((TableRowViewInterface *) clazz->interface)->setSelected =
setSelected;
167 clazz = _initialize(&(
const ClassDef) {
168 .name =
"TableRowView",
172 .interfaceSize =
sizeof(TableRowViewInterface),
@ SimpleSelectorTypePseudo
static void dealloc(Object *self)
static void removeAllCells_enumerate(const Array *array, ident obj, ident data)
ArrayEnumerator to remove TableCellViews from the row.
static void initialize(Class *clazz)
TableViews provide sortable, tabular presentations of data.
Box * initWithFrame(Box *self, const SDL_Rect *frame)
Initializes this Box with the given frame.
void setSelected(CollectionItemView *self, _Bool isSelected)
Sets the selected state of this item.
_Bool isSelected(const Control *self)
SimpleSelectorType type
The SimpleSelectorType.
char * pattern
The pattern, as provided by the user.
StackViews are containers that manage the arrangement of their subviews.
Class * _StackView(void)
The StackView archetype.
Each row in a TableView is comprised of TableCellViews.
Class * _TableRowView(void)
The TableRowView archetype.
_Bool isSelected
True when this row is selected, false otherwise.
void removeAllCells(TableRowView *self)
Removes all cells from this row.
MutableArray * cells
The cells.
TableView * tableView
The table.
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.
TableViews provide sortable, tabular presentations of data.
MutableArray * columns
The column definitions.
Views are the fundamental building blocks of ObjectivelyMVC user interfaces.
void invalidateStyle(View *self)
Invalidates the computed Style for this View and its descendants.
void addSubview(View *self, View *subview)
Adds a subview to this view, to be drawn above its siblings.
void removeFromSuperview(View *self)
Removes this View from its superview.
_Bool matchesSelector(const View *self, const SimpleSelector *simpleSelector)
void removeSubview(View *self, View *subview)
Removes the given subview from this View.