
Hello Beman Dawes wrote:
I understand that the implementation details can't be exchanged. But we aren't taking about implementations of buttons, we are talking about the abstract concept of an OK_button. That certainly could be transferred, couldn't it? More importantly, you could build up a widget library which could be used regardless of the target window. Sorry if I'm missing something here; I'm not much of a GUI programmer.
Okay... I have an idea for how this could be done. I confess I'm biased against it, due to the difficulties and inefficiencies it raises in the implementation. How's this (syntax as of tonight - I'll upload it tomorrow): window w("Test Window"); grid g(2, 2); w.contain(g); g.contain(button("Click me", on_click), 1, 1); g.contain(label("Enter your name:"), 0, 0); textentry t(); g.contain(t, 1, 0); wait_for_signal(w.delete_signal()); // note () after delete_signal Regards David Turner