Re: [gtkmm] mirroring actions in a user interface
- From: "Timothy M. Shead" <tshead k-3d com>
- To: gtkmm-list gnome org
- Subject: Re: [gtkmm] mirroring actions in a user interface
- Date: Fri, 07 May 2004 11:16:58 -0700
erik_ohrnberger dme net wrote:
What is the best way to make sure that each user action applied to the first
notebook gets propagated to all the other notebooks?
What you're trying to do here is called "Observer Design Pattern", which
is very common in user interface work. I strongly recommend picking-up
a copy of the book "Design Patterns" by Gamma, et al, which covers this
and other patterns in detail.
The thing that makes gtkmm stand out as a UI toolkit is that the signal
system encourages you to Do The Right Thing when you come across
Observer situations. In your case, you will create a signal or signals
that will be emitted when user actions mandate notebook modifications.
Then, every notebook connects to that signal, updating itself when the
signal is emitted. You can have as few or as many notebooks as
required, and they will all be automatically updated when changes are
made to the first notebook.
Cheers,
Tim Shead
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]