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

C vs. C++: Deeper thoughts (Was: UrShape XML parser)



Hi folks. Sorry for writing a longer email, but I think it will get
more useful on the last lines...

> 1. [What is a UrShape?]
The UrShape can contain SVG, Text or a collection of other Shapes (Or
UrShapes, if you prefer). We will have it stored in XML and I write
the parser that moves the stuff into a struct (or object, if you can
cope that better ;).
> 2. [mini-dom]
Since the UrShapes will build up a tree, we need some traversing
functions. They should be DOM-like, so we have a defined
functionality.
> 3. [A UrShape contains:]
>     A)    SVG shapes  : Ok with me.
>     B)    gtk widgets : What for?
>     C)     XLinks     : You mean the embedded UrShapes?
> These things need their relative location described (what everyone keeps
> calling "layout", right?), as well as their visibility, color, layer.  The
> DTD should provide for all of these and nothing more.
And the C struct should do this, too.
> [SVG enhancement]
That's beyond my scope. I'll use James' code here, once I've found it.
> 4. [UrShape resizing behaviour]
Wait a minute. For what I've read is that we shall have resizeable
font. If this is true, we _should_ have fixed x,y coords.
> 5. [libxml++]
There are 2 things I dislike: a) C++ will boost our executable sizes
thus enlarging the memory footprint. If not neccessary, we should
avoid this. b) Using libxml++, we add another binding to the list, so
users will have to load libxxml++ in order to work with dia.
I don't see the point of such overhead if we can just have a C struct
that can hold all UrShape data we ever dream of and some functions to
work with it. If we want to have polymorphism, we can do that by
adding callback functions (even a callback hash, maybe?). I still
don't see a UrShape header...
> 6./7. [C++]
C++ programmers also know how to code C. And writing some callbacks is
not that difficult, if our interface is not too clumsy.
> I still have a steep hill to climb to assemble the skills and master the
> Dia code before I can even think about integrating this grand idea into
> Dia.  I thought this little note of intention and direction might save me
> some wasted effort and test my thinking.  What have I overlooked and what
> do I fail to appreciate?
Well, I think I sense a little C++-overenthusiasm, but never mind ;)
> Andre, I'm particularly interested in your thoughts, since you seem the
> most eager to wade in.  Lennon, how does the DOM thinking sound to you?
> And John, have I said anything that affects your DTD?
The thing that would make me happy working would be a formal
description of the UrShape interface - at best as C header, so we can
begin to implement the functionality.

This header file should contain stubs for:
1. The mini-DOM stuff. Copy & paste from libxml (?)
2. The generic UrShape data. Mainly bounding box, etc.
3. The dia rendering/etc. callbacks. What we need to put it on screen.
4. Whatever I've forgotten here.

> Thanks for listening.
Even so.
> --jkl
cu Andre
-- 
Tolerance rulez, everything else sux! -- Andre Kloss





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] Mail converted by Mofo Magic and the Flying D

 
All trademarks and copyrights are the property of their respective owners.

Other Directory Sites: SeekWonder | Directory Owners Forum

GuideSMACK