refreshing the GUI
Wed, 29 Nov 2000 12:14:00 -0800
James LewisMoss writes:
> Hash table of changes. If gnc_suspend_gui_refresh isn't called the
> refresh callbacks get called for each change?
> Dave> The last is used when doing very large amounts of changes, for
> Dave> which it would just be simpler to refresh everything:
> Dave> gnc_engine_suspend_change_callbacks () /* turn off engine
> Dave> callbacks */
> Dave> ... destroy all entities ... ... load new ones from file ...
> Dave> gnc_engine_resume_change_callbaks ()
> Dave> gnc_gui_refresh_all () /* force all components to refresh
> Dave> unconditionally */
> So the engine calls this in the CM? Better to have another callback
No, the engine wouldn't make those calls. The GUI driver code
which is opening and closing files would. The engine will never
turn callbacks on or off, or invoke refreshes. That is up to
> >> I'm trying to figure out what the close, find and iteration
> >> callbacks are meant to do and who registers with who.
> Dave> The close callback is for closing the gui component. The CM is
> Dave> meant to be more than just a refresh manager.
> Is this the introduction of the CM? What else will it do? So when
> the CM decides a component should close it calls the close callback on
> the componont? When the component closes it calls the close callback?
This is the introduction of the CM, yes. It is intended to manage all
major GUI components.
Close callbacks are commands -- "close yourself now".
> Are all components required to register with the CM?
All top-level components, yes.
> Dave> The find callback is so components can find related components
> Dave> in the same class (for example, if the user opens and already
> Dave> open account, the existing window should be raised instead of
> Dave> opening a new one).
> Ah. Hmm. Seems you are including two things here.
> 1) Data update callbacks.
> 2) Component management.
> That accurate?
Yes, it seemed to me that 1) (with respect to the GUI) was a part of
2), so it made sense to me to combine them. But perhaps they should
be separate things.
> Dave> The iteration is to aid component management. Right now, it
> Dave> will mainly be used in conjunction with the close operation,
> Dave> but there could be additional uses in the future.
> Still confused here.
You could use this to, say, close all components in a particular class
(e.g., close all help windows). Close operations such as this are already