28#define _Class _CollectionItemView
39 release(this->imageView);
40 release(this->selectionOverlay);
53 assert(simpleSelector);
56 const char *pattern = simpleSelector->
pattern;
58 switch (simpleSelector->
type) {
60 if (strcmp(
"selected", pattern) == 0) {
71#pragma mark - CollectionItemView
92 assert(self->selectionOverlay);
94 $(self->selectionOverlay,
addClassName,
"selectionOverlay");
111#pragma mark - Class lifecycle
118 ((ObjectInterface *) clazz->interface)->dealloc =
dealloc;
120 ((ViewInterface *) clazz->interface)->matchesSelector =
matchesSelector;
122 ((CollectionItemViewInterface *) clazz->interface)->initWithFrame =
initWithFrame;
135 clazz = _initialize(&(
const ClassDef) {
136 .name =
"CollectionItemView",
137 .superclass =
_View(),
139 .interfaceSize =
sizeof(CollectionItemViewInterface),
static void setSelected(CollectionItemView *self, bool isSelected)
Class * _CollectionItemView(void)
static bool matchesSelector(const View *self, const SimpleSelector *simpleSelector)
static void dealloc(Object *self)
static void initialize(Class *clazz)
static CollectionItemView * initWithFrame(CollectionItemView *self, const SDL_Rect *frame)
The CollectionItemView type.
static bool isSelected(const Control *self)
static Label * initWithText(Label *self, const char *text, Font *font)
static void addSubview(View *self, View *subview)
@ SimpleSelectorTypePseudo
static void addClassName(View *self, const char *className)
CollectionViewItems are a visual representation of an item within a CollectionView.
bool isSelected
True when this item is selected, false otherwise.
void setSelected(CollectionItemView *self, bool isSelected)
Sets the selected state of this item.
ImageView * imageView
The ImageView.
ImageViews render an Image in the context of a View hierarchy.
SimpleSelectorType type
The SimpleSelectorType.
char * pattern
The pattern, as provided by the user.
Text rendered with TrueType fonts.
Views are the fundamental building blocks of ObjectivelyMVC user interfaces.