Re: [gtkmm] Gtkmm Class /Object design rev.

"Satish Athreya" <satisha82 linuxmail org> writes:

> Is gtkmm / gnomemm compatible Xfree86 libs? For example is it posibble
> to call XFree86 Xlib functions throught gtkmm/gnomemm?
> Because there aren't C++ binding for Xfree86 libs I thought I might
> get started on it.

Why would you want to do that? Athena is the worst widget set I've
ever used.

> For example should a Gtk::Window inherit Gtk::Container since
> GtkWindow is a container it self cause of Gtk::Container class and
> which control all widgets and How can Gtk::Bin inherit
> Gtk::Container(there is no sense in this). Also Gtk::Window can have
> many widgets.

I've stared at this for some time now, but I can't make much sense of
it. :-) I think you are confusing inheritance relationships with

Container is a base class for all containers. Bin is a particular
container type that can only hold one (immediate) child. In other
words, any Bin is a Container, but not all Containers are Bins (e.g. a
Table is not a Bin, but is a Container). Therefore, Bin inherits from

A Window is a particular sort of Container, namely one with
decorations and a title bar etc. Now, one could have chosen to make it
an advanced custom container like a Table, but the easiest thing to do
is to make it as simple as possible with respect to what it can
contain. Which is something that can only hold one child, i.e. a Bin.
But then one might as well inherit from Bin.

See? It makes perfect sense.

You mustn't confuse the static inheritance hierarchy with the dynamic
composition hierarchy which arises at run-time. A Bin can only contain
one child, but that child could be a Table that can contain as many
childs as you wish.

> OWL hierarchy(If you find one) is a excellent template that Gtkmm can
> be based(NOT MSVC$$$$).

What is an OWL hierarchy? I googled the word, but mostly got
references to birds.

Ole Laursen

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