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;
150 clazz = _initialize(&(
const ClassDef) {
152 .superclass =
_View(),
153 .instanceSize =
sizeof(
Option),
154 .interfaceSize =
sizeof(OptionInterface),
static Box * initWithFrame(Box *self, const SDL_Rect *frame)
static bool isSelected(const Control *self)
static Label * initWithText(Label *self, const char *text, Font *font)
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)
static void addSubview(View *self, View *subview)
@ SimpleSelectorTypePseudo
static void invalidateStyle(View *self)
static void setNeedsLayout(View *self)
static SDL_Rect bounds(const View *self)
void setSelected(Option *self, bool isSelected)
Sets this Option's selected state.
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.