Re: [gtk-list] viewport / scrolledwindow simple question.




Patrice Fortier <Patrice.Fortier@aquarel.fr> writes:

> Looking at ian's tutorial I found that viewport and scrolledwindow
> are 2 different widgets.
> I would say that scrolledwindow is a subclass of the viewport...
> Why isn't it the case? (wow doesn't look very english :)).

I would say, subclassing expresses an "ISA" relationship.
A scrolledwindow isn't a viewport, it is a combination
of a viewport and a scrollbar.

The opposite point of view could probably be argued, but I think
the relevant question is "why would it be better to make
it a subclass?"

In any case, you'd have more code duplication with the subclassing
solution, since you couldn't reuse the code that does the
size negotiation / layout.

Regards,
                                        Owen



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]