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 ((
Label *) self)->text->text,
79 $(self, bind, inlets, dictionary);
111#pragma mark - Class lifecycle
118 ((ObjectInterface *) clazz->interface)->dealloc =
dealloc;
119 ((ObjectInterface *) clazz->interface)->description =
description;
122 ((ViewInterface *) clazz->interface)->init =
init;
124 ((LabelInterface *) clazz->interface)->initWithText =
initWithText;
136 clazz = _initialize(&(
const ClassDef) {
138 .superclass =
_View(),
139 .instanceSize =
sizeof(
Label),
140 .interfaceSize =
sizeof(LabelInterface),
static Box * initWithFrame(Box *self, const SDL_Rect *frame)
static View * init(View *self)
static void awakeWithDictionary(View *self, const Dictionary *dictionary)
static Label * initWithText(Label *self, const char *text, Font *font)
static String * description(const Object *self)
static void dealloc(Object *self)
static void initialize(Class *clazz)
static void addSubview(View *self, View *subview)
static Font * font(Theme *self, const FontAttributes *attributes, float pixelDensity)
#define MakeInlets(...)
Creates a null-termianted array of Inlets.
#define MakeInlet(name, type, dest, data)
Creates an Inlet with the specified parameters.
static void setNeedsLayout(View *self)
static SDL_Rect bounds(const View *self)
Inlets enable inbound data binding of View attributes through JSON.
Labels provide a configurable container for Text.
Text * text
The Label Text.
Text rendered with TrueType fonts.
Views are the fundamental building blocks of ObjectivelyMVC user interfaces.
void awakeWithDictionary(View *, const Dictionary *)
Wakes this View with the specified Dictionary.