criawips-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [devel] You need a PieceTable!


From: Sven Herzberg
Subject: Re: [devel] You need a PieceTable!
Date: 14 Apr 2003 17:05:56 +0200

Am Don, 2003-04-10 um 17.51 schrieb address@hidden:
> >   But there is one issue. The way abiword handles text and images is not
> > the way a presentation program should do. A presentation program should
> > have many piecetables (one for each text-block), so the piecetables
> > wouldn't be the model but a part of it.
>
> No you only need one piecetable. You just arrange for one of the structures
> (struxes) to represent a slide.
> 
> In XML it could look like this.
> 
> <slide>
> <p>
> <c props="fontName:Time New Roman; fontsize:24">
> This is my First slide.
> </c>
> </p>
> </slide>
> 
> In the piecetable you'd have doubley linked list
> 
> Slide_strux_frag<=>para_strux_frag<=>Text_Frag<=>Slide_strux_frag_end<=>Slide_strux_frag
> ....

  Okay, then i misinterpreted a PieceTable.

> Each frag object has pointers to the properties of that particular fragment.
> 
> AbiWord uses these end of strux markers for it's tables implementation
> which works really well.
> 
> The properties of the different strux types can be any arbitary sets of
> strings. These strings can be given any meaning you like. The view layer
> interprets the meaning to construct the physical representation of the
> piecetable. In example above the cell properties tell the view which cell
> goes where in the view.
> 
> For fancy animation you can invent properties to make text fly around,
> expand, appear etc when in slide screen mode. In normal construct mode
> these properties are just ignored.
> 
> BTW I think this code would be truely horrible to write in C. Use some
> object oriented Language.

  Thanks for the detailed explanation, this will definitely help to
design the application to become a good coding platform. I just want to
add the link http://www.abisource.com/doxygen/ptbl_overview.html here
which leads to some great explanations of abiwords piecetable.

-- 
Sven Herzberg <address@hidden> · ICQ: 177176742
Webmaster von GNOME Deutschland    · http://www.gnome-de.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]