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 void dealloc(Object *self)
static void initialize(Class *clazz)
A container View with a positioned Label.
#define MakeInlets(...)
Creates a null-termianted array of Inlets.
#define MakeInlet(name, type, dest, data)
Creates an Inlet with the specified parameters.
A container View with a positioned Label.
StackView * contentView
The internal container.
Class * _Box(void)
The Box archetype.
Box * initWithFrame(Box *self, const SDL_Rect *frame)
Initializes this Box with the given frame.
CollectionView * init(CollectionView *self, const SDL_Rect *frame)
Initializes this CollectionView with the specified frame and style.
SDL_Size size(const Image *self)
Inlets enable inbound data binding of View attributes through JSON.
Labels provide a configurable container for Text.
Label * initWithText(Label *self, const char *text, Font *font)
Initializes this Label with the given text and Font.
StackViews are containers that manage the arrangement of their subviews.
Views are the fundamental building blocks of ObjectivelyMVC user interfaces.
_Bool bind(View *self, const Inlet *inlets, const Dictionary *dictionary)
Performs data binding for the Inlets described in dictionary.
ViewAlignment alignment
The alignment.
_Bool hidden
If true, this View is not drawn.
Class * _View(void)
The View archetype.
void addSubview(View *self, View *subview)
Adds a subview to this view, to be drawn above its siblings.
void addClassName(View *self, const char *className)
Adds the given class name to this View.
void awakeWithDictionary(View *self, const Dictionary *dictionary)
Wakes this View with the specified Dictionary.
layoutSubviews(View *self)
Performs layout for this View's immediate subviews.
SDL_Size sizeThatContains(const View *self)
SDL_Rect frame
The frame, relative to the superview.