134 {
135
137 if (self) {
138
141
143
145 assert(self->colorView);
146
149
151 assert(self->hueSlider);
152
153 self->hueSlider->delegate.self = self;
155 self->hueSlider->max = 360.0;
157
159 assert(self->hueInput);
160
162 $(self->hueInput->label->text,
setText,
"H");
163
165
167 assert(self->saturationSlider);
168
169 self->saturationSlider->delegate.self = self;
171 self->saturationSlider->max = 1.0;
173
175 assert(self->saturationInput);
176
178 $(self->saturationInput->label->text,
setText,
"S");
179
181
183 assert(self->valueSlider);
184
185 self->valueSlider->delegate.self = self;
187 self->valueSlider->max = 1.0;
189
191 assert(self->valueInput);
192
194 $(self->valueInput->label->text,
setText,
"V");
195
197
199 }
200
201 return self;
202}
static void didSetComponent(Slider *slider, double value)
SliderDelegate callback for color component 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.