52 String *classNames = $((Object *) this->classNames,
description);
53 String *
description = str(
"%s@%p \"%s\" %s [%d, %d, %d, %d]",
54 this->identifier ?: classnameof(self),
56 ((
Option *) self)->title->text,
71 assert(simpleSelector);
75 switch (simpleSelector->
type) {
77 if (strcmp(
"selected", simpleSelector->
pattern) == 0) {
125#pragma mark - Class lifecycle
132 ((ObjectInterface *) clazz->interface)->dealloc =
dealloc;
133 ((ObjectInterface *) clazz->interface)->description =
description;
135 ((ViewInterface *) clazz->interface)->matchesSelector =
matchesSelector;
137 ((OptionInterface *) clazz->interface)->initWithTitle =
initWithTitle;
138 ((OptionInterface *) clazz->interface)->setSelected =
setSelected;
150 clazz = _initialize(&(
const ClassDef) {
152 .superclass =
_View(),
153 .instanceSize =
sizeof(
Option),
154 .interfaceSize =
sizeof(OptionInterface),
static void initialize(Class *clazz)
static void dealloc(Object *self)
static void setSelected(CollectionItemView *self, bool isSelected)
static bool matchesSelector(const View *self, const SimpleSelector *simpleSelector)
static bool isSelected(const Control *self)
static Label * initWithText(Label *self, const char *text, Font *font)
static String * description(const Object *self)
static void setSelected(Option *self, bool isSelected)
static bool matchesSelector(const View *self, const SimpleSelector *simpleSelector)
static String * description(const Object *self)
static void dealloc(Object *self)
static void initialize(Class *clazz)
static Option * initWithTitle(Option *self, const char *title, ident value)
@ SimpleSelectorTypePseudo
static SDL_Rect bounds(const View *self)
bool isSelected
True if this Option is selected, false otherwise.
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.
void invalidateStyle(View *self)
Invalidates the computed Style for this View and its descendants.
void setNeedsLayout(View *self)
Marks this View as needing layout before it is next drawn.
void addSubview(View *self, View *subview)
Adds a subview to this view, to be drawn above its siblings.
View * initWithFrame(View *self, const SDL_Rect *frame)
Initializes this View with the specified frame.