Re: Graph::ASCII::Dia

2006-03-24 Thread Aaron Trevena
On 23/03/06, Lars Clausen <[EMAIL PROTECTED]> wrote:
> Because nobody has found it worthwhile enough to make bindings for any
> other language.  Dia is in no way, shape or form wedded to python, and
> don't let Hans' refusal to provide bindings for other languages give you
> that idea.  He made his bindings for his favorite language.  If you want
> to make bindings for Perl or Ruby or Java or Fortran or Cobol or
> whatever, we're cool with that, and would probably want to include it in
> the distribution like the Python plugin is.

If it's likely to get included it might be worth while I really don't
want to have to maintain a fork or hard to add add-on seperately.

> That said, Hans and I have not even the time to fix all bugs in the base
> code, let alone develop bindings for other languages.  I'd be happy to
> answer questions about the Dia structure and workings, though.

Cool.

I had a quick look at the perl embedding side, the main difficulty
will be mapping all the objects and writing the c code to call perl
that access objects through the perl/c api in order to provide a
working plugin system.

I guess that means splitting into two jobs - first a Perl XS wrapper
for the Dia libraries,  and second a way to call perl that uses that
wrapper from within Dia.

The first involves a lot of digging around Dia, which will be very
time consuming, even if I can use some of the python api as a map, but
in itself won't be HARD, just a lot of work.

The second part will be trickier and that's where I'll be needing help.

Don't expect much any time soon though, I'll wait until at least the
new version is stable, but if anybody else is interested in
collaborating or helping, let me know.

A.
___
Dia-list mailing list
Dia-list@gnome.org
http://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://www.gnome.org/projects/dia/faq.html
Main page at http://www.gnome.org/projects/dia



Re: Connecting line to line

2006-03-24 Thread Lars Clausen
loli sagde:
> On Thu, 23 Mar 2006 21:03:43 +0100, Lars Clausen wrote
>> > I see 2 options here:
>> >
>> > 1) allow the creation of arbitrary zero size connection points which
>> can
>> > be added to the diagram for this purpose
>>
>> That's somewhat of a kludge, but easy to do.
> (I don't understand "kludge"; it does not appear in my "The Merriam
> Webster
> Pocket Dictionary).

http://www.outpost9.com/reference/jargon/jargon_26.html#TAG999

> But just in case you are planning to program these "zero size connection
> points": I think they should be able to increase in size and have more
> than
> just one regular connection point (as the ellipse has), in order to make
> it
> easier to connect or disconnect a line without touching end points of
> other
> lines.

In that case, is it just an ellipse with no visible rendering?

-Lars
___
Dia-list mailing list
Dia-list@gnome.org
http://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://www.gnome.org/projects/dia/faq.html
Main page at http://www.gnome.org/projects/dia



Re: zoom problem with 0.95-pre6

2006-03-24 Thread Lars Clausen
loli sagde:
> On Thu, 23 Mar 2006 06:49:49 +0100, Lars Clausen wrote
>> On Thu, 2006-03-23 at 12:45 +0800, Zhang Linbo wrote:
>> > Hi,
>> >
>> > The initial zoom seems to be incorrect with dia-0.95-pre6
>> > for the attached diagram.
>> >
>> > Maybe a call to 'Show All' after loading a diagram is missing?
>>
>> The zoom level is correct (100%), but it's like it has scrolled away.
>> Strange.
>
> I dont know if it has been always this way; but for a long time for me,
> Dia
> begins showing a region of diagram with the (0,0) point  at 'up' and
> 'left'
> position (sorry for my English). And Linbo's diagram has all its points
> with
> negative ordinates: all above the shown region.

Ah, didn't notice that.

>> Doing show all would be very different, as it would adjust
>> the zoom level significantly, something I don't think we should do
>> by default.  I've looked a bit at saving 'view' information in the
>> diagram
>> file, but didn't actually implement it.
>
> Instead of changing the format of diagram files adding view information,
> the minimum  x (x0) and the minimum y (y0) of bouncing boxes of objects
> could be calculated; and then use (x0-delta,y0-delta ) instead of (0,0)

That would sorta make sense.  At least slightly more than just 0,0.  But
the right way to go about would be to include view data in the diagram,
which really is a simple matter of some XML hackery.  Anyone?

-Lars
___
Dia-list mailing list
Dia-list@gnome.org
http://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://www.gnome.org/projects/dia/faq.html
Main page at http://www.gnome.org/projects/dia



Working it out...

2006-03-24 Thread Athanasios Anastasiou

Hello Guys

Sorry to be a nuisance with "simple" questions but is it possible to 
provide some hint on the following?


1)
I have been looking at the Dia source code to find out some more info on 
how to add some properties to a graph in the way it shows up in UML. I 
took a look at the shapes related files and the properties related 
files  but it seems like the shapes are very abstracted. Could you 
provide some insight?
I suppose that there are "hooks" on things like "Show me the properties" 
where Dia calls a supplied function instead of its default one for 
properties. Something similar must be happening with the objects them 
selfs to provide the extra properties and stuff. Otherwise i would have 
to recompile Dia everytime i would like to add a new set of symbols. Any 
direction is greatly appreciated.


2)
Is there a way to completely reload a package in Python? I hate to 
restart Dia everytime i am making a change to my script.



3)
How does the dia.register_* family of functions works? (From within 
Python that is) I mean, i am assigning a function to a particular menu 
item but it does not appear there :-/ am i missing something there?


Looking forward to hearing from you
thanOS

___
Dia-list mailing list
Dia-list@gnome.org
http://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://www.gnome.org/projects/dia/faq.html
Main page at http://www.gnome.org/projects/dia



Re: C++ to UML

2006-03-24 Thread Ian Britten

om ke wrote:
I am looking for simple way to document my c++ source code. My intention 
to comeup with some kind of UML type of diagram that can be extracted 
directly from the C++ source code. Any hints on how I can acomplish the 
above will be greatly appreciated,


Doxygen?  http://www.stack.nl/~dimitri/doxygen/
It's what we use to generate our documentation/diagrams with...

Ian
___
Dia-list mailing list
Dia-list@gnome.org
http://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://www.gnome.org/projects/dia/faq.html
Main page at http://www.gnome.org/projects/dia



Re: Working it out...

2006-03-24 Thread Hans Breuer

On 24.03.2006 18:11, Athanasios Anastasiou wrote:

Hello Guys

Sorry to be a nuisance with "simple" questions but is it possible to 
provide some hint on the following?


1)
I have been looking at the Dia source code to find out some more info on 
how to add some properties to a graph in the way it shows up in UML. I 
took a look at the shapes related files and the properties related 
files  but it seems like the shapes are very abstracted. Could you 
provide some insight?
I suppose that there are "hooks" on things like "Show me the properties" 
where Dia calls a supplied function instead of its default one for 
properties. Something similar must be happening with the objects them 
selfs to provide the extra properties and stuff. Otherwise i would have 
to recompile Dia everytime i would like to add a new set of symbols. Any 
direction is greatly appreciated.



Start reading in lib/object.h
The concrete function (pointer) you are looking for is
GetPropertiesFunc which is implemented for UML as
umlclass_get_properties

Every DiaObject has a factory DiaObjectType e.g. to create, load, save
the object; see _ObjectTypeOps.

And there is also for every object an interface definition (_ObjectOps)
which allows object (class) specific implementations. GetPropertiesFunc
is a function pointer in this structure.


2)
Is there a way to completely reload a package in Python? I hate to 
restart Dia everytime i am making a change to my script.



I have experimented with that but did not find a way. The idea
was a proxy object which does 'import' and 'delete' on the real implementation.



3)
How does the dia.register_* family of functions works? (From within 
Python that is) I mean, i am assigning a function to a particular menu 
item but it does not appear there :-/ am i missing something there?



This is only working for the 'old' menu, not for the 'diagram menubar',
see http://bugzilla.gnome.org/show_bug.cgi?id=171397

Hans

 Hans "at" Breuer "dot" Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
Dia-list mailing list
Dia-list@gnome.org
http://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://www.gnome.org/projects/dia/faq.html
Main page at http://www.gnome.org/projects/dia



Re: Connecting line to line

2006-03-24 Thread loli
On Fri, 24 Mar 2006 22:25:42 +0100 (CET), Lars Clausen wrote   
> loli sagde:   
> > On Thu, 23 Mar 2006 21:03:43 +0100, Lars Clausen wrote   
> >> > I see 2 options here:   
> >> >   
> >> > 1) allow the creation of arbitrary zero size connection points which   
> >> can   
> >> > be added to the diagram for this purpose   
> >>   
> >> That's somewhat of a kludge, but easy to do.   
> > (I don't understand "kludge"; it does not appear in my "The Merriam   
> > Webster   
> > Pocket Dictionary).   
>
> http://www.outpost9.com/reference/jargon/jargon_26.html#TAG999   
   
Thanks!!   
   
>
> > But just in case you are planning to program these "zero size connection   
> > points": I think they should be able to increase in size and have more   
> > than   
> > just one regular connection point (as the ellipse has), in order to make   
> > it   
> > easier to connect or disconnect a line without touching end points of   
> > other   
> > lines.   
I correct myself: just one conection point is better: to connect or   
disconnect a line, first we touch the line ond just its own end points get   
colored   
   
>
> In that case, is it just an ellipse with no visible rendering?   
This is a very good idea.   
  
After seeing Linbo's diagram I realized Dia can be used to prepare geometric  
figures (for many years I used Texcad for teaching); So not only joining  
lines is good but also adding identifiers to the points is good.   
  
Now I properly think that using an ellipse is a kludge; and propose an svg  
shape a little better: I paste it hear (it is quite small)  
   
  
http://www.daa.com.au/~james/dia-shape-ns";  
   xmlns:svg="http://www.w3.org/2000/svg";>  
  Point  
  Point.xpm  

  
  
  
  
  





  
   
On purpose, no conection point is declared main.  
The first connection point is in the center of the bouncing box;  
it is the one intended to join lines  
  
The other four connection points are possible places to attach a text  
 to identify the point, well inside the bouncing box (not forming a centered   
 square but moved a little to the left and below)  
   
 To move the point with the attached lines, we touch near one of the no used  
 connection for identifiers.  
   
 As usual to connect or disconnect a line first we touch it, and then, when  
its end points are colored we touch the end point.   
  
 When I made geometric figures for teaching, I always marked with small  
circles the points of interest. We could add a filled circle to the shape;  
its color could be chosen as usual. If by resizing, its radio  grows and the  
identifiers get farther   
   
  
   
>
> -Lars   
> ___   
> Dia-list mailing list   
> Dia-list@gnome.org   
> http://mail.gnome.org/mailman/listinfo/dia-list   
> FAQ at http://www.gnome.org/projects/dia/faq.html   
> Main page at http://www.gnome.org/projects/dia   
   
   
-- 
Loli
[EMAIL PROTECTED] 
 


triangle.dia
Description: GNU Zip compressed data


triangle.png
Description: PNG image
___
Dia-list mailing list
Dia-list@gnome.org
http://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://www.gnome.org/projects/dia/faq.html
Main page at http://www.gnome.org/projects/dia



Re: C++ to UML

2006-03-24 Thread Andrej Ricnik-Bay
On 3/25/06, Ian Britten <[EMAIL PROTECTED]> wrote:

> Doxygen?  http://www.stack.nl/~dimitri/doxygen/
> It's what we use to generate our documentation/diagrams with...
Doxygen doesn't create UML diagrams?  It gives you an
inheritance overview as far as I know, but that's a bit
meager by comparison.  Of course I don't have an in-
depth knowledge of doxygen. :}


Cheers,
Andrej
___
Dia-list mailing list
Dia-list@gnome.org
http://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://www.gnome.org/projects/dia/faq.html
Main page at http://www.gnome.org/projects/dia