mgansler / mscgen

Automatically exported from code.google.com/p/mscgen
GNU General Public License v2.0
1 stars 0 forks source link

Auto wrapping of lines #45

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

msc {
    a, b;
    a box b [label="This is very very long line of text that does not wrap within the box but instead goes in a straight line and even clipping at the ends"];
}

What is the expected output? What do you see instead?

Text to lie within box, but it is out of box and even clipped. It is difficult 
for the user to split the line manually as the width of the box and width of 
text are unknown and it needs to be done every time if the text changes.

Proposed solution:

The wrapping of text needs to be done automatically. Also a newline character 
within the string shall not cause the line to break (like it is done in 
doxygen). Only \n escape should break the line. This is to allow user to break 
lines in doxygen without breaking lines in actual view. Multi-space/newline 
between words may be converted to single space in view. This is to allow user 
to indent text in doxygen as given below.

msc {
    a, b;
    a box b [label="This is very very long line of text that
                    automatically wraps within the box"];
}

In code all this can be done as part of lex tokenization of string.

Original issue reported on code.google.com by v.arunmo...@gmail.com on 10 Sep 2010 at 10:28

GoogleCodeExporter commented 8 years ago
I think there are 2 problems here.

1) There is no automatic line wrap of arc labels in boxes.
2) The tokeniser doesn't correctly accept a multi-line strings meaning the 
input scripts have to contain very long lines which aren't particularly nice.

I will look at fixing 2 first.

Original comment by Michael....@gmail.com on 14 Sep 2010 at 9:28

GoogleCodeExporter commented 8 years ago
Although this bug mentions wrapping of text only within boxes, it is desirable 
even for line/divider/disco and any other arc.

Original comment by arunmozh...@gmail.com on 17 Sep 2010 at 6:17

GoogleCodeExporter commented 8 years ago
Michael fixed the multi-line strings in input files in revision 138 (in case 
you compiled your mscgen directly from SVN source).

Original comment by NThykier@gmail.com on 25 Sep 2010 at 2:41

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r153.

Original comment by Michael....@gmail.com on 10 Oct 2010 at 2:21