The following small program shows that ValueOutput does not
behave regularly.

When I DRAG the main window: only ValueOutput changes the
background color. Although ValueOutput and ValueInput have
the same basic class Valuator.

Converting the program to fltk-1.3.x-r6980 shows: ValueOutput
of fltk-1.3 does not change the background color during a DRAG.

winfried
--------------------------------------------------------
///fltk-2.0.x-r6970
#include <fltk/run.h>
#include <fltk/Window.h>
#include <fltk/Output.h>
#include <fltk/Input.h>
#include <fltk/ValueOutput.h>
#include <fltk/ValueInput.h>

#include <stdlib.h>
#include <stdio.h>

using namespace fltk;

static Output *outp;
static Input *inp;
static ValueInput *vin;

static int nr;
static char buf[32];

static void timeout_cb(void *v)
{
        ValueOutput *vout = (ValueOutput*)v;

        ++nr;
        vout->value(nr);
        vin->value(nr);
        sprintf(buf, "%d", nr);
        outp->value(buf);
        inp->value(buf);

        repeat_timeout(0.1, timeout_cb, v);
}

int main()
{
        Window *win = new Window(285, 85);
    win->begin();

        ValueOutput *vout = new ValueOutput(100,10,40,25, "ValueOutput:");
        vout->box(THIN_DOWN_BOX);
        vout->color(WHITE);

        vin = new ValueInput(220,10,55,25, "ValueInput:");
        vin->box(THIN_DOWN_BOX);
        vin->color(WHITE);
        vin->selection_color(WHITE);

        outp = new Output(100,50,40,25, "Output:");
        outp->box(THIN_DOWN_BOX);
        outp->color(WHITE);
        outp->selection_color(WHITE);

    inp = new Input(220,50,40,25, "Input:");
    inp->box(THIN_DOWN_BOX);
    inp->color(WHITE);
    inp->selection_color(WHITE);

        win->end();

        add_timeout(0.1, timeout_cb, vout);

        win->show();

        return run();
}

_______________________________________________
fltk-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-bugs

Reply via email to