Martin Vermeer a écrit :
On Tue, 2006-04-18 at 10:57 +0200, Abdelrazak Younes wrote:
Martin Vermeer a écrit :
On Mon, Apr 17, 2006 at 07:54:04PM +0200, Abdelrazak Younes wrote:
Abdelrazak Younes a écrit :
...
Side question about outline for Martin:

The outline function takes no argument. It moves or transforms the section where the cursor is. I think it should instead take a pit or a uid so that we can use the outline feature without having any cursor. What do you think?
Why would you want to do that? I could imagine moving multiple headers
(instead of just one),
For example yes. That's one reason.

but why would you want to change the doc in a
place where your current cursor is not located?
Because, IMHO, there is no logical link between the cursor position and the document structure, those two are simply independent. I can well imagine a full outline mode completely disconnected from the buffer view.

But what does it buy you?

For one, the controller could return the updated TocItem so that I don't need to look for it. So taking a TocItem as an argument in ControlToc is a good idea actually:

+ void ControlToc::outline(toc::OutlineOp op)
- bool ControlToc::outline(toc::OutlineOp op, TocItem & toc_item)

This method would also return false if the operation is not possible and true otherwise (try to click many times in the IN button of the qt2 frontend).

Abdel.

Reply via email to