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
96 assert(self->selectionOverlay);
98 $(self->selectionOverlay,
addClassName,
"selectionOverlay");
118#pragma mark - Class lifecycle
125 ((ObjectInterface *) clazz->interface)->dealloc =
dealloc;
127 ((ViewInterface *) clazz->interface)->matchesSelector =
matchesSelector;
129 ((CollectionItemViewInterface *) clazz->interface)->initWithFrame =
initWithFrame;
142 clazz = _initialize(&(
const ClassDef) {
143 .name =
"CollectionItemView",
144 .superclass =
_View(),
147 .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)
@ ViewAlignmentMiddleCenter
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.
bool clipsSubviews
If true, subviews will be clipped to this View's frame.
ViewAlignment alignment
The alignment.
int autoresizingMask
The ViewAutoresizing bitmask.