46 release(this->control);
69 $(self, bind, inlets, dictionary);
135 release(self->
label);
196#pragma mark - Class lifecycle
203 ((ObjectInterface *) clazz->interface)->dealloc =
dealloc;
206 ((ViewInterface *) clazz->interface)->init =
init;
208 ((InputInterface *) clazz->interface)->initWithFrame =
initWithFrame;
209 ((InputInterface *) clazz->interface)->setControl =
setControl;
210 ((InputInterface *) clazz->interface)->setLabel =
setLabel;
211 ((InputInterface *) clazz->interface)->setOrientation =
setOrientation;
223 clazz = _initialize(&(
const ClassDef) {
226 .instanceSize =
sizeof(
Input),
227 .interfaceSize =
sizeof(InputInterface),
static void initialize(Class *clazz)
static View * init(View *self)
static void awakeWithDictionary(View *self, const Dictionary *dictionary)
static void dealloc(Object *self)
static Box * initWithFrame(Box *self, const SDL_Rect *frame)
static Label * initWithText(Label *self, const char *text, Font *font)
const EnumName StackViewAxisNames[]
@ StackViewAxisHorizontal
static void addEnumAttribute(Style *self, const char *attr, const EnumName *names, int value)
#define MakeInlets(...)
Creates a null-termianted array of Inlets.
#define MakeInlet(name, type, dest, data)
Creates an Inlet with the specified parameters.
const EnumName ViewAlignmentNames[]
@ ViewAlignmentMiddleCenter
@ ViewAlignmentMiddleRight
@ ViewAlignmentMiddleLeft
Controls are Views which capture and respond to events.
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.
void invalidateStyle(View *self)
Invalidates the computed Style for this View and its descendants.
Style * style
The element-level Style of this View.
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 removeFromSuperview(View *self)
Removes this View from its superview.
SDL_Rect frame
The frame, relative to the superview.
void removeSubview(View *self, View *subview)
Removes the given subview from this View.