Dear LyX Developers,

In the past few weeks, I've made some progress on the improvements to
the toc model and outline pane that I proposed last year.  (Mostly
because I've found another developer who has been willing to do the
heavy lifting and Abdel has been kind enough to say what needed to be
done.)  This has resulted in methods that can be used to update the
document buffer from custom views.

(I am going to put all of these methods into a single, cohesive class
and send for review shortly.)

With basic read/write methods in place, I'd like to begin the next phase
of my TocModel tinkering via work on a "Summary" inset.  This inset,
like the existing "Note", would allow a user to add comments or a
summary for a particular chunk of text.  But rather than being added to
its own model, it would instead be incorporated into the "Table of
Contents" (in a second column) alongside the title for that particular
section.  Having both pieces of information in the same model would make
it possible to create views that could use data in interesting ways.
The "Corkboard" of Scrivener is one example
(http://www.literatureandlatte.com/screens4.html).

However, as I've started looking at examples of other insets (most
notably "InsetNote") and the TocBackend class, I've realized that I have
no idea how to actually do this.

All of the existing models are only a single column and there doesn't
appear to be an interface for adding additional data to an existing
model.  (When looking at the TocMomdel::populate method in TocModel.cpp,
it almost appears as though models can only be one column long due to a
single hard coded value.)

Which, finally, leads me to my questions:

1.) Is there anything that I am missing?
2.) Assuming the answer to 1) is "No", what might be the best way to go
about adding information to an existing model?

Would it be best to update the populate method so that you can specify
how you would like information added to an existing model?  For example,
adding optional variables so that the process can be controlled from
InsetExample::addToToc?

Or would another approach make more sense?

I'd greatly appreciate any thoughts or pointers.

Cheers,

Rob

Reply via email to