Re: Problem creating custom shapes with editable text

2012-10-02 Thread Martin Wunderlich
Thanks a lot, Eric. This helps a bit. I have compared your XML to the code form 
my shape and noticed that the  node is not included in my shape. 
Instead, it is using an svg:text element, which apparently is not recognised 
correctly by Dia. If I enter the textbox node into my XML, I can enter text 
into the shape alright, except that I don't know how to specify the formatting 
or the default text. 

Is this documented anywhere? I tried here, but couldn't find anything on the 
required additional options for the textbox element: 
http://git.gnome.org/browse/dia/tree/doc/custom-shapes

Cheers, 

Martin
 
 
Am 30.09.2012 um 22:49 schrieb Marchand Eric:

> Le 30/09/2012 22:04, Martin Wunderlich a écrit :
>> Hi all,
>> 
>> I have been trying to create custom shapes where the user can enter text 
>> (see my other postings about the recipe diagrams). However, editing text 
>> doesn't work once those custom shapes are added to a doc.
>> So, I have cut it down to the essential to find out where the error might 
>> be. Here is what I did:
>> - Create a new diagram with one shape from the flow chart collection 
>> (rectangle with text).
>> - Save the diagram as diagram.
>> - Export as shape.
>> - Create new folder in the directory .dia/shapes/ called "Test"
>> - Save exported shape PNG and XML in this directory.
>> - Create new sheet called "Test".
>> - Edit the sheet's XML to reference the custom shape in the "Test" directory.
>> - Restart Dia.
>> 
>> Now, when you drag the test shape onto the drawing area, you can see the 
>> shape, but not text is editable.
>> Could anyone please tell me why?! I am also attaching the test shapes.
>> Thanks a lot.
>> 
>> Cheers,
>> 
>> Martin
>> 
> Hi,
> I don't know if I understand correctly your problem, but here is a shape 
> where the user can enter text.
> 
> eric
> 
> **
> 
> http://www.daa.com.au/~james/dia-shape-ns"; 
> xmlns:svg="http://www.w3.org/2000/svg";>
>  Test - Test
>  Test.png
>  
>
>
>
>
>  
>  
>2
>
>  
>
>  
> 
> ___
> dia-list mailing list
> dia-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/dia-list
> FAQ at http://live.gnome.org/Dia/Faq
> Main page at http://live.gnome.org/Dia
> 

___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Problem creating custom shapes with editable text

2012-10-02 Thread Thomas Harding

Le 02/10/2012 11:41, Martin Wunderlich a écrit :

Thanks a lot, Eric. This helps a bit. I have compared your XML to the code form my 
shape and noticed that the  node is not included in my shape. Instead, 
it is using an svg:text element, which apparently is not recognised correctly by Dia. 
If I enter the textbox node into my XML, I can enter text into the shape alright, 
except that I don't know how to specify the formatting or the default text.

Is this documented anywhere? I tried here, but couldn't find anything on the 
required additional options for the textbox element: 
http://git.gnome.org/browse/dia/tree/doc/custom-shapes



If your shape is a custom one, you'll find it:

  On Linux/UNIX:
in your ~/.dia/shapes

if unmodified from main:
  in one of the subdirectories of /usr/share/dia/shapes/, 
depending on sheet it belongs (see Sheets menu, while it can be i-10n).


if found in /usr/share... copy the shape in your ~/.dia/shapes/, You'll 
have to create a convenient sheet (see doc you point above).


then use a simple text editor such as vim, emacs or nano and replace the 
svg:text element by a textbox, according to document format you point in 
your URL.


Unfortunately, I can't help you on other systems.

Regards,
TSFH
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Problem creating custom shapes with editable text

2012-10-02 Thread Hans Breuer

At 02.10.2012 11:41, Martin Wunderlich wrote:

Thanks a lot, Eric. This helps a bit. I have compared your XML to the
code form my shape and noticed that the  node is not included
in my shape. Instead, it is using an svg:text element, which apparently
is not recognised correctly by Dia.

The svg:text is used for _static_ text within the shape, for me it works
as intended and documented (
http://git.gnome.org/browse/dia/tree/doc/custom-shapes#n237
) but as always the documentation could be improved ;)


If I enter the textbox node into my
XML, I can enter text into the shape alright, except that I don't know
how to specify the formatting or the default text.


The default font settings are not to be preset by the shape definition.
But you can set them like any other object defaults (double click on
the toolbox button).


Is this documented anywhere? I tried here, but couldn't find anything on
the required additional options for the textbox element:
http://git.gnome.org/browse/dia/tree/doc/custom-shapes


There are no more options for the  than documented
http://git.gnome.org/browse/dia/tree/doc/custom-shapes#n19
http://git.gnome.org/browse/dia/tree/doc/custom-shapes#n98

HTH,
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
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia