39 release(this->contentView);
61 $(self, bind, inlets, dictionary);
79 if (label->
hidden ==
false) {
118#pragma mark - Class lifecycle
125 ((ObjectInterface *) clazz->interface)->dealloc =
dealloc;
128 ((ViewInterface *) clazz->interface)->init =
init;
131 ((BoxInterface *) clazz->interface)->initWithFrame =
initWithFrame;
143 clazz = _initialize(&(
const ClassDef) {
145 .superclass =
_View(),
146 .instanceSize =
sizeof(
Box),
147 .interfaceOffset = offsetof(
Box, interface),
148 .interfaceSize =
sizeof(BoxInterface),
static View * init(View *self)
static void awakeWithDictionary(View *self, const Dictionary *dictionary)
static void dealloc(Object *self)
static void initialize(Class *clazz)
static Box * initWithFrame(Box *self, const SDL_Rect *frame)
static void layoutSubviews(View *self)
A container View with a positioned Label.
static SDL_Size size(const Image *self)
static Label * initWithText(Label *self, const char *text, Font *font)
static void addSubview(View *self, View *subview)
#define MakeInlets(...)
Creates a null-termianted array of Inlets.
#define MakeInlet(name, type, dest, data)
Creates an Inlet with the specified parameters.
static void addClassName(View *self, const char *className)
static SDL_Size sizeThatContains(const View *self)
A container View with a positioned Label.
StackView * contentView
The internal container.
Inlets enable inbound data binding of View attributes through JSON.
Labels provide a configurable container for Text.
StackViews are containers that manage the arrangement of their subviews.
Views are the fundamental building blocks of ObjectivelyMVC user interfaces.
ViewAlignment alignment
The alignment.
void awakeWithDictionary(View *, const Dictionary *)
Wakes this View with the specified Dictionary.
layoutSubviews(View *self)
Performs layout for this View's immediate subviews.
SDL_Rect frame
The frame, relative to the superview.
bool hidden
If true, this View is not drawn.