146 {
147
149 if (self) {
150
153
155
157 assert(self->colorView);
158
161
163 assert(self->redSlider);
164
165 self->redSlider->delegate.self = self;
167 self->redSlider->max = 255.0;
169
171 assert(self->redInput);
172
174 $(self->redInput->label->text,
setText,
"R");
175
177
179 assert(self->greenSlider);
180
181 self->greenSlider->delegate.self = self;
183 self->greenSlider->max = 255.0;
185
187 assert(self->greenInput);
188
190 $(self->greenInput->label->text,
setText,
"G");
191
193
195 assert(self->blueSlider);
196
197 self->blueSlider->delegate.self = self;
199 self->blueSlider->max = 255.0;
201
203 assert(self->blueInput);
204
206 $(self->blueInput->label->text,
setText,
"B");
207
209
211 assert(self->alphaSlider);
212
213 self->alphaSlider->delegate.self = self;
215 self->alphaSlider->max = 255.0;
217
219 assert(self->alphaInput);
220
222 $(self->alphaInput->label->text,
setText,
"A");
223
225
227 }
228
229 return self;
230}
static void addSubview(View *self, View *subview)
static void setLabelFormat(ProgressBar *self, const char *labelFormat)
static void didSetComponent(Slider *slider, double value)
SliderDelegate callback for color component modification.
static void setText(Text *self, const char *text)
static void addClassName(View *self, const char *className)
Controls are Views which capture and respond to events.
StackView * stackView
The StackView.
A Control allowing users to drag a handle to select a numeric value.
StackViews are containers that manage the arrangement of their subviews.