DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L1849
Version: 1.1-current


Per the documentation of Fl_Widget::hide(),
 ".. An invisible widget never gets redrawn and does not get events. [..]"

However, that does not seem to be the case for sub-windows.  On
my system, the following demonstrates FL_LEAVE, FL_KEYUP, and
FL_NO_EVENT being handled.

#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
#include <FL/names.h>
#include <iostream>

class SubWindow : public Fl_Double_Window {
public:
    SubWindow(int x, int y, int w, int h, char const* label = 0)
        : Fl_Double_Window(x, y, w, h, label)
    { end(); hide(); }

    int handle(int event)
    {
        std::cout << fl_eventnames[event] << " in hidden subwindow\n";
        return Fl_Double_Window::handle(event);
    }
};

int main()
{
    Fl_Double_Window win(300, 300, "Main");
    SubWindow sub(50, 50, 100, 100, "Sub");
    win.end();
    win.show();
    return Fl::run();
}


Link: http://www.fltk.org/str.php?L1849
Version: 1.1-current

_______________________________________________
fltk-bugs mailing list
fltk-bugs@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-bugs

Reply via email to