+BoxBlurNum::BoxBlurNum(BoxBlurWindow *gui, int x, int y, int w,
+ const char *name, int *iv, int imn, int imx)
+{
+ this->gui = gui;
+ this->x = x;
+ this->y = y;
+ this->w = w;
+ this->h = 0;
+ this->name = name;
+ this->ivalue = iv;
+ this->imn = imn;
+ this->imx = imx;
+ int margin = gui->plugin->get_theme()->widget_border;
+ int clear_w = BoxBlurNumClear::calculate_w(this);
+ int tumble_w = BC_Tumbler::calculate_w();
+ int len = w - 2*margin - clear_w - tumble_w;
+ this->title_w = xS(60);
+ this->text_w = xS(60) - tumble_w;
+ this->slider_w = len - title_w - text_w - 2*margin;
+
+ title = 0;
+ text = 0;
+ slider = 0;
+ clear = 0;
+}
+
+BoxBlurNum::~BoxBlurNum()
+{
+ delete text;
+}
+
+void BoxBlurNum::create_objects()
+{
+ int x1 = this->x;
+ gui->add_subwindow(title = new BC_Title(x1, y, name));
+ int margin = gui->plugin->get_theme()->widget_border;
+ x1 += title_w + margin;
+ text = new BoxBlurNumIText(this, x1, y);
+ text->create_objects();
+ x1 += text_w + BC_Tumbler::calculate_w() + margin;
+ gui->add_subwindow(slider = new BoxBlurNumISlider(this, x1, y));
+ x1 += slider_w + 2*margin;
+ gui->add_subwindow(clear = new BoxBlurNumClear(this, x1, y));
+ h = bmax(title->get_h(), bmax(text->get_h(),
+ bmax(slider->get_h(), clear->get_h())));
+}
+
+void BoxBlurNum::update(int value)
+{
+ text->update((int64_t)value);
+ slider->update(value);
+ *ivalue = value;
+}
+
+
+BoxBlurRadius::BoxBlurRadius(BoxBlurWindow *gui, int x, int y, int w,
+ const char *name, int *radius)
+ : BoxBlurNum(gui, x, y, w, name, radius, 0, 100)
+{
+}
+
+BoxBlurPower::BoxBlurPower(BoxBlurWindow *gui, int x, int y, int w,
+ const char *name, int *power)
+ : BoxBlurNum(gui, x, y, w, name, power, 1, 10)
+{
+}
+