Re: Application design problem



Resolved.

Ivan Popivanov wrote:

Hi,

Here is an outline of the hierarchy design that I came up with for my application:

Main Window: GtkWindow: main application window
  GtkVBox: to hold the menu, toolbar, application client area
     Client Area: not sure about the type of this object, see below
GtkFixed: to manage the coordinate of few widgets that will be needed in the client area
           MyObjects: see below

For the client area I need something that I can draw on. My first thought was GtkDrawingArea, however, I run into problems when I tried to attach the GtkFixed child. GtkDrawingArea is not a container right? Then I tried GtkWindow and it didn't work either (the name is kind of misleading, isn't it). At the end I decided that probably the best match is GtkBin, the reason, the client area is going to have a single child, namely the GtkFixed.

My objects I created as GtkMisc (after few other tries), because I want them to be window less, like GtkLabel. I added function members to handle EXPOSE events.

THE PROBLEM is that I receive the expose event in the Client Area, so I can draw the background etc, however, I don't get any expose events in MyObjects. They are on the top of the client area, but they don't receive any draw messages.

One more thing, I'm using gtkmm, that's why I didn't attach the code. However, I don't think that's gtkmm issue.

Any idea/explanation about event propagation in Gtk?

TIA,

Ivan


_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list







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