115 {
116
118 if (self) {
119
122
124
126 assert(self->colorView);
127
130
132 assert(self->hueSlider);
133
134 self->hueSlider->delegate.self = self;
135 self->hueSlider->delegate.didSetValue =
didSetHue;
136 self->hueSlider->max = 360.0;
138
140 assert(self->hueInput);
141
143 $(self->hueInput->label->text,
setText,
"H");
144
146
148 }
149
150 return self;
151}
static void didSetHue(Slider *slider, double value)
SliderDelegate callback for hue modification.
#define MakeRect(x, y, w, h)
Creates an SDL_Rect with the given origin and size.
Controls are Views which capture events and dispatch Actions.
StackView * stackView
The StackView.
void setLabelFormat(ProgressBar *self, const char *labelFormat)
Changes this ProgressBar's label format and calls appropriate update functions.
A Control allowing users to drag a handle to select a numeric value.
StackViews are containers that manage the arrangement of their subviews.
void setText(Text *self, const char *text)
Sets this Text's text.
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.