Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2004-03-04 13:20:11


At 12:10 PM 3/4/2004, David Turner wrote:

>... A button in one window isn't necessarily
>the same thing as a button in another window; just as a bold font in one
>document isn't necessarily the same as a bold font in another.

I'd rewrite that as "The implementation of a button in one window isn't
necessarily the same thing as the implementation of a button in another
window..."

To modify Dave's example to make a point:

     button OK_button("OK");

     window_one("Warning: now entering twilight zone one")
     [
         text_field("my favorite color is:"),
         OK_button | button("cancel") | attribute_x(1)
     ]

     window_two("Warning: now entering twilight zone two")
     [
         text_field("my favorite color is:"),
         OK_button | button("cancel") | attribute_x(2)
     ]

Perhaps the implementation of OK_button in window_one is very different
from window_two. But they both have OK_buttons, and at the interface level
these are the same button.

>
>One cannot say in general that elements can be exchanged between
>documents. Similarly, one cannot say in general that widgets can be
>exchanged between windows.

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.

--Beman


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk