Re: Beyond the Examples



Hello,

if I understand your problem, your window wich opens a secondary window,
needs to be instantiated in the main window.
So you could connect a signal in the mainwindow wich executes a slot in
the sec-window.

In the basics that should work. I have solved problems like this, with
this solution in earlier projects.

If you need to interact with the widgets, you can write get and set
methods wich do what you want with the widgets in the other window.

Perhaps there are better solutions, but this is how I did it.

Many greetings

Bernd


Am Sonntag, den 04.10.2009, 08:04 -0400 schrieb Alex:
> I'm writing a somewhat complex gui application with gtkmm and glade,
> and I've run into a design problem that I'm unsure of how to solve.
> Rather than kludging together a solution that simply works, I figured
> it would be a good idea to consult the experts.
> 
> Consider the following situation: I have a program with a main window
> class. Upon starting, an object of class MainWindow is created, and
> that is passed to kit.run(). MainWindow includes all of its widgets as
> private members, including some derived widgets (such as a secondary
> window that can be opened or closed from MainWindow.)
> 
> Now, here's the problem: I need to figure out how to get widgets in my
> secondary window to interact with widgets in MainWindow, and vice
> versa. I could define and attach all the signals from within the
> MainWindow class, but defining secondary window's signal handlers
> there seems cumbersome and incorrect. How should I go about this?
> 
> I haven't included any code because I feel that this is more of a
> conceptual/structural problem, but if anyone wants me to include that
> or any other information, I'd be willing to oblige, as the above
> description may not be sufficient.
> -Alex
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list



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