refreshing the GUI
29 Nov 2000 15:01:25 -0500
>>>>> On Wed, 29 Nov 2000 11:11:33 -0800, Dave Peticolas <firstname.lastname@example.org> said:
Dave> James LewisMoss writes:
>> >>>>> On Wed, 29 Nov 2000 01:59:22 -0800, Dave Peticolas
>> >>>>> <email@example.com> sa
Dave> Design ------
Dave> The refresh mechanism will be designed in two parts, an engine
Dave> component and a GUI component. The engine component will be a
Dave> simple change callback mechanism, while the GUI component will
Dave> be a GUI entity manager that includes refresh management, as
Dave> well as other functionality.
>> So a change to data occurs. The engine has a registered listener
>> in the GUI Component Manager that it calls to say something has
>> changed. What happens then?
Dave> Refreshing is controlled by gnc_suspend_gui_refresh()
Dave> gnc_resume_gui_refresh(), and gnc_gui_refresh_all().
Dave> The first two are used as a pair:
Dave> gnc_suspend_gui_refresh ()
Dave> ... perform some changes, edit accounts, transactions, etc. ...
Dave> ... no refresh callbacks occur during this period ...
Dave> gnc_resume_gui_refresh () /* This causes the refresh callbacks
Dave> be invoked for all the registered
Dave> components with the changes that
Dave> ocurred above. */
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
>> 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?
Are all components required to register with the CM?
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.
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.
@James LewisMoss <firstname.lastname@example.org> | Blessed Be!
@ http://jimdres.home.mindspring.com | Linux is kewl!
@"Argue for your limitations and sure enough, they're yours." Bach