144 {
145
147 if (self) {
148
151
153
155 assert(self->colorView);
156
159
161 assert(self->redSlider);
162
163 self->redSlider->delegate.self = self;
165 self->redSlider->max = 255.0;
167
169 assert(self->redInput);
170
172 $(self->redInput->label->text,
setText,
"R");
173
175
177 assert(self->greenSlider);
178
179 self->greenSlider->delegate.self = self;
181 self->greenSlider->max = 255.0;
183
185 assert(self->greenInput);
186
188 $(self->greenInput->label->text,
setText,
"G");
189
191
193 assert(self->blueSlider);
194
195 self->blueSlider->delegate.self = self;
197 self->blueSlider->max = 255.0;
199
201 assert(self->blueInput);
202
204 $(self->blueInput->label->text,
setText,
"B");
205
207
209 assert(self->alphaSlider);
210
211 self->alphaSlider->delegate.self = self;
213 self->alphaSlider->max = 255.0;
215
217 assert(self->alphaInput);
218
220 $(self->alphaInput->label->text,
setText,
"A");
221
223
225 }
226
227 return self;
228}
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.