Ian MacArthur wrote:

> winfried,
>
> Can you provide more context please?
>
> > Now the widget is visible. But I cannot enter text into
> > the Input widget. There is a barrier around the containing
> > window or the contained widget.
> > =
>
> > Does anybody know whether and how I can make permeable this
> > impermeable barrier around the window/widget?
>
>
> I think you are asking about fltk3, and maybe about use of the
> html widgets  in fltk3? Is that correct?
>
> I haven't been able to keep track of your question, so if you
> can provide more context is each mail (REST-ful email!) then
> it might help others to help you!
>
> That said, I rather suspect you are on your own out there, I
> don't think anybody has really gone as far with fltk3 yet as
> you seem to be doing...
>


I do not use FLTK-3, but FLTK-2 now. I have changed the HelView
code to e.g. allow "INPUT" widgets. In Canvas::draw() I write:


#ifdef WITH_MENU_WINDOW
static fltk::MenuWindow *TextWindow;
#else
static fltk::Window *TextWindow;
#endif

static Input *TextWidget;

        if(TextWindow == NULL)
    {
        int win_x, win_y, win_h, win_w, wid_y, wid_h;

        if(get_attr(attrs, "VALUE", attr, sizeof(attr)))
         cs = attr;
        else
         cs = "Hello";

        win_x = xx - scroll_x_;
        win_y = yy - textsize_ - TEXT_WID_DH/2 - scroll_y_;
        win_h = textsize_ + TEXT_WID_DH;
        win_w = ww + 4;
        wid_y = TEXT_WID_DH/2;
        wid_h = textsize_ + TEXT_WID_DH/2;
#ifdef WITH_MENU_WINDOW
        TextWindow = new MenuWindow(win_x,win_y,win_w,win_h);
#else
        TextWindow = new fltk::Window(win_x,win_y,win_w,win_h);
#endif
        TextWindow->box(FLAT_BOX);
        TextWindow->begin();

        TextWidget = new Input(2, wid_y, ww, wid_h);
        TextWidget->value(cs);
        TextWidget->tooltip("TextWidget");
        TextWidget->textsize(textsize_);
        TextWidget->callback(TextWidget_cb);
        TextWidget->color(YELLOW);
        TextWidget->when(WHEN_ENTER_KEY_ALWAYS);

        TextWindow->end();
#ifdef WITH_INSERT
        insert(*TextWindow,children());// - 2);
#else
        add(TextWindow);
#endif
        TextWindow->show();//draw();//layout();

    }

This code shows the Input widget at the correct place, allows
to move the main window. But I cannot enter text.

winfried

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

Reply via email to