On Thursday 22 August 2002 12:11 pm, Martin Vermeer wrote: > On Thu, Aug 22, 2002 at 12:10:14PM +0200, Jean-Marc Lasgouttes wrote: > > >>>>> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: > > > > Martin> Actually I don't like this either. Too much extra handling all > > Martin> over the place. So I say: restrict the LFUN to insert only in > > Martin> position 0 of the paragraph, in a 'legal' paragraph for > > Martin> inserting an optional arg. That could be done in > > Martin> BufferView_pimpl.C, or more cleanly using the getStatus > > Martin> mechanism (Jean-Marc?) > > > > I still do not see what restricting where the inset goes buys us. > > Actually you're right. Wherever you put it, it's clear what paragraph -- > and what section or caption number -- it is associated with. Just as a > LaTeX label embedded in it. Location within the paragraph means nothing. > > Still, making the inset button carry the counter, as I originally > envigaged, would be cool...
Wouldn't this happen automatically if/when you create an InsetCaption. I picture this InsetCaption as having * an InsetText for the main body of the Caption * a Counter * that points to a Counter in a Section, but not in a starred Section. * an InsetOptArg *. Ditto. That way you can control exactly how the Inset draws itself in one place, InsetCaption::draw. if (counter_) draw_counter(); if (optarg_) draw_optarg(); inset_.draw(); Moreover, a paragraph would contain just one InsetCaption and nothing else. If you later change the Layout back to standard, you can again define a conversion method in InsetCaption. Seems clean encapsulation to me. Angus