26#include <Objectively/MutableArray.h>
76typedef struct ControlInterface ControlInterface;
100 MutableArray *actions;
121struct ControlInterface {
126 ViewInterface viewInterface;
135 Array *(*actionsForEvent)(
const Control *self,
const SDL_Event *event);
Actions bind event-driven behavior to Controls.
void(* ActionFunction)(Control *control, const SDL_Event *event, ident sender, ident data)
The ActionFunction callback.
static void stateDidChange(Control *self)
static void addActionForEventType(Control *self, SDL_EventType eventType, ActionFunction function, ident sender, ident data)
static _Bool isSelected(const Control *self)
static _Bool isDisabled(const Control *self)
static _Bool isFocused(const Control *self)
static _Bool isHighlighted(const Control *self)
ControlBevel
Control bevel styles, for drawing depressed or raised bevels.
ControlSelection
Control selection styles, for Controls that support user selection.
@ ControlSelectionMultiple
OBJECTIVELYMVC_EXPORT const EnumName ControlBevelNames[]
OBJECTIVELYMVC_EXPORT const EnumName ControlStateNames[]
OBJECTIVELYMVC_EXPORT const EnumName ControlSelectionNames[]
ControlState
Control states, which are bit-masked.
@ ControlStateHighlighted
Text rendered with TrueType fonts.
#define OBJECTIVELYMVC_EXPORT
Controls are Views which capture events and dispatch Actions.
Class * _Control(void)
The Control archetype.
unsigned int state
The bit mask of ControlState.
ControlBevel bevel
The ControlBevel.
ControlInterface * interface
The interface.
ControlSelection selection
The ControlSelection.
Views are the fundamental building blocks of ObjectivelyMVC user interfaces.