On Thu, 15 Aug 2002 [EMAIL PROTECTED] wrote:
> That begs the question: what is a good example to learn from? What I
> need, generically, is an example where an inset is embedded in another
> inset (or even in a paragraph in the main text -- fundamentally
> different or not?) in a 'hardwired' way; not as a manually inserted
> inset in the *contents* of the surrounding inset (apparently with such
> charmingly esoteric details as a character c == META_INSET [i.e., 3] to
> flag it to make sure it gets displayed); no, *hardwired*. And then, make
> it display at the start, in such a way that the surrounding inset's
> content moves out of the way and takes the screen cursor with it. And
> both are rendered (drawn) correctly and non-overlappingly. And both
> respond to the mouse (though not simultaneously :-) Ah yes, there seem
> to be some pointers too that have to be set, like to the owning
> paragraph/inset (?). Unless one likes core files on one's disk.
>
> All this is a big mystery to me. Where do I start? What is a good
> learning example? Less pasta-like than bibkey, rather.
What you really want in comparison to various paragraph types (in
.layout files) is a "LabelType Short". Much like we have
"LabelType Counter_Section". We'd need to allow "LabelType" to take
two or maybe more arguements so a section could have:
LabelType Counter_Section,Short
That way the configuration of which paragraphs support short-titles
is in the layout files where they belong. The LabelType then allows
the paragraph to be rendered appropriately.
Where "appropriately" would cater for a limited number of cases:
counter
counter+short
short
These three cases could be handled by one inset (one rendered inset).
Probably three separate insets:
InsetCounter (your existing counters work)
InsetShort (Possibly your InsetShortTitle; probably revised)
InsetShortCounter : public InsetCounter, InsetShort
Why only one apparent inset? A neater, integrated look and as it is
guaranteed to be at the start of a paragraph we can ensure a user
can't insert anything in front of it or between two insets. Maybe you
could ensure two insets in a label work okay but I don't see any point
in having two separate buttons on-screen when I can just click on the
label and define the short title and collapse it again.
I haven't looked at your patch -- enough time to read some email and
spew forth a solution for you though. This may well be what you're
heading for but there's been no mention of the short title only
needing to a label for a paragraph yet.
> While awaiting enlightenment, I could flesh out InsetSection :-)
Finished it yet?
Allan. (ARRae)