>>>>> "Asger" == Asger Alstrup Nielsen <[EMAIL PROTECTED]> writes:

>> I'm inclined to think that having a specific Heading inset may be a
>> flaw.  That kind of info should be pushed into a layout file so we
>> have more generic handling of documents.

Asger> Yes, you are right.  We don't need a specific Heading object.
Asger> At the top level, we could only have "paragraph" objects.
Asger> These have modifiers to fine-tune the behaviour.  Specifically,
Asger> any it can behave like a heading.  We do need to have a
Asger> "Heading" state bool, because headings are special in many
Asger> ways: They have a heading depth (in principle distinct from the
Asger> nesting depth - we can have a heading inside a footnote!), they
Asger> have to go into the TOC, and other stuff.

>From the top of my head we'll need at least two additional variables:
- a boolean indicating whether the heading is numbered or not
- a text inset containing the optional caption

Asger> So another question is: How do we organize all the different
Asger> kinds of information that the different "modes" of paragraphs
Asger> require?  At the moment, we have a giant struct with fields for
Asger> all of these things, and these are carried around even when the
Asger> information is not relevant.  I'd like us to come up with
Asger> something better, and in this regard my Value system could do
Asger> the job...  However, let's ignore this for now.

Isn't it possible in C to have several variables at the same location
of a struct (like pascal does in records)? We could also have a
pointer to a type-specific data structure, which would be delete when
the paragraph changes type (not sure it's a good idea, just suggesting).

Asger> Ok, Lgb, Jean-Marc, Allan, and I all agree that a flat document
Asger> structure would work. The rest have not objected, so let's
Asger> consider this a fixed design decision then.

Right.

JMarc

Reply via email to