Alfredo Braunstein <[EMAIL PROTECTED]> writes:

| > It is not really supposed to stay a pointer, but to be a list of
| > BufferViews using this buffer.

| Isn't this more cleanly implemented with signals (or eventually, with
| lyxfuncs if I ever get to understand how they work)? I don't understand why
| buffer has to know about BufferView.

Possibly, but I had not heard of signal/slot at the time.

(And for this I find signals more approp than LFUNS)
 
| Now that I see it, with my patch I have
| 
| $ grep getUser *.C *.h
| buffer.C:BufferView * Buffer::getUser() const
| lyxvc.C:               
| vcs->owner()->getUser()->owner()->dispatch(FuncRequest(LFUN_MENUWRITE));
| lyxvc.C:                vcs->owner()->getUser()->owner()
| vc-backend.C:   owner_->getUser()->reload();
| buffer.h:       BufferView * getUser() const;
| 
| and
| 
| $ grep BufferView buffer.C
| #include "BufferView.h"
| // candidate for move to BufferView
| // Should probably be moved to somewhere else: BufferView? LyXView?
| void Buffer::resizeInsets(BufferView * bv)
| void Buffer::addUser(BufferView * u)
| void Buffer::delUser(BufferView *)
| BufferView * Buffer::getUser() const
| 
| so probably it can be even be eliminated easily if wanted.

yes.

-- 
        Lgb

Reply via email to