World: r3wp
[!REBOL3 Host Kit]
older newer | first last |
Maxim 20-Oct-2010 [253] | you are also missing alignment... especially horizontal. |
Pekr 20-Oct-2010 [254x4] | yes, forgot alignment, sorry - but that is obvious we need it - left, right, box, middle (horizontal), and top, middle, bottom (vertical) |
but you see? MS Word does not offer anything like vertical alignment, as para does not contain margins/padding, it only contains left right indentation, and the paragraph spacing, so they can't do it ... | |
The question really is, if we should not really support CSS box model, even if most of the time, you would not use some of parameters ... | |
With current proposal, you might have problems to build browser in rebol (not that I expect anyone doing so) | |
Rebolek 20-Oct-2010 [258] | there's support for CSS-like box model in R3GUI, this has nothing to do with text gobs. |
Pekr 20-Oct-2010 [259] | I know, and my question is - why not? |
Maxim 20-Oct-2010 [260x2] | CSS is VERY bad at text layout. I would not want use that model for a rich text editor... really it would be aggravating. |
its good at boxes, but not in handling their content... and its pretty underspecced as to how content and boxes interfere, which leads to the many differrent interpretations in various browers. | |
Cyphre 21-Oct-2010 [262] | Pekr, thanks for your useful feedback, some reactions: PAGE margin should allow to set 4 sides - this is done by using ORIGIN and MARGIN pair!s in the proposal, I agree, we can use MARGIN with two pairs instead of that origin should replace scroll - ok, makes sense if we accept the point above PARA indent - INDENT should define rectangular space at the beginning of the paragraph, the left right orientation would be chosen according to the horizontal align settings in each paragraph. The value for indent could be pair! (to define the space in both ways) or number! to define just the horizontal indentation for the first paragraph line only. spacing - here I'd use SPACING [pair!] for additional space between chars (X axis) and lines (Y axis). For space around paragraph (top, left, bottom, right) I would use PADDING. paging - IMO linking of text between gobs at the C level would bring us lot of complexity. I still think we should provide functionality that can be useful at REBOL script level to handle the linkage. runaround - this needs to be well thought so it is flexible enough once we allow to use embedded gobs in the text flow alignment - I'd leave it as in the current proposal for now. Which means horizontal align can be set per paragraph vertical alignment per 'page'(=GOB) I'll be updating the current document soon to reflect all the changes from yours and other useful suggestions. I'll post here once new version is online. |
Pekr 21-Oct-2010 [263x4] | OK, sounds reasonable, and I agree in most of the stuff .... |
I am just thinking loud now - it seems MS Word has choosen to not complicate the matter much. They have page setting (margins), and then they have paragraph settings. In paragraphs, they just use indentation (left, right, special (first line positive/negative), and nothing more. Spacing between paragraphs is done by integer value - number of pixels before and after the paragraph, plus special setting, that two consecutive paragraphs of the same name don't add the space after the paragraph (dunno why they introduced it, but they probably found that practically usefull) | |
I agree, that paging could or even should be solved in higher level. It will not be fastest though, so we will see, how it goes. | |
Indent - is your proposal sufficient? You allow using either issue,e.g. 3x6 (3px left, 6px right), or integer, e.g. 6px (first line indented by 6px) - what if I want to set both. And most probably I want it ... | |
Cyphre 21-Oct-2010 [267] | you don't need any high performance for the linkage part(if there is enough support in the native part)...that's why I think it should be at the REBOL level |
Pekr 21-Oct-2010 [268x4] | As for padding - as you can see from MS Word model (please not I use it as an example, we don't need to necessarily rely on that) does not use padding left, righ - that is done by indentation ... |
please not = please note | |
So in your model, we can set indent 3x6, and we can add further space to the left or right by using padding 3x6, so in total the para will be shifted by 6x12? | |
I just want to understand you :-) | |
Cyphre 21-Oct-2010 [272x2] | padding - I think being able to define whole padding box in one field is more intuitive, but I'm open. If we use padding and indent fields what would you propose for the current 'padding feature? |
so in total the para will be shifted by 6x12? No, in your case it would shift most probably only the first line in the para by 3px from the PADDING origin. If your line heihght would be smaller than 6px it would shit also second line etc. | |
Pekr 21-Oct-2010 [274] | it would shit also second line - nice typo :-) |
Cyphre 21-Oct-2010 [275x2] | | __| <--padding |<--indent ______| Paragraph text is here... |
oops, nice typo :) | |
Pekr 21-Oct-2010 [277x2] | Hmm, OK, re-reading your indent proposal - is that only for indentation purpose of the first line? |
If so, then you need only integer, no? The rest is done by padding | |
Cyphre 21-Oct-2010 [279] | in the proposal yes, but I'd enhance it for the Y axis value. The number of lines could be the second value in the pair! |
Pekr 21-Oct-2010 [280x3] | I mean - indentation typically defines just how much the first line is shifted left/right (99% right). Ms Word adds ability to shift whole paragraph left and right (indent-left, indent-right). That would be don by padding in your case? |
ah, now I undestand | |
So you want to allow to indent more than one line (row) right? | |
Cyphre 21-Oct-2010 [283x2] | imagein the PADDING as bounding box of the paragraph + space around it..and the INDENT as rectangular space that eats part of the bounding box in the top left or right corner. |
maybe I should make simple image...? | |
Pekr 21-Oct-2010 [285x6] | no, I understand it ... |
MS Word: | __| <--indent-left |<--indent-first line ______| Paragraph text is here... | |
ah, wrong .... | |
| <--- page margin, here 0 __| <--indent-left |<--indent-first line __| Paragraph text is here... | |
Simply put, MS uses simplified model: indent - set left or right indentation, plus special indentation for the first line (in pixels) padding - before, after paragraph value in pixels ... | |
When I translate it is just the same :-) You allow indentation of more than one line as a bonus :-) | |
Cyphre 21-Oct-2010 [291] | http://cyphre.mysteria.cz/pics/padding-indent.png |
Pekr 21-Oct-2010 [292] | I think you can add that pic to your document ... |
Cyphre 21-Oct-2010 [293] | this one is just quickly sketched..I'll be redoing the current picture in the doc to show it all better and with updated names etc. |
Rebolek 21-Oct-2010 [294] | Indent should support negative value. |
Cyphre 21-Oct-2010 [295] | but only in the X axis I guess |
Rebolek 21-Oct-2010 [296] | Not to move it back, but to allow this kind of paragraph. |
Cyphre 21-Oct-2010 [297] | yup |
Pekr 21-Oct-2010 [298] | But negative indent just means - start at the first pixel from left for the first indented lines, use the value as a padding-left value from the left. Paragraph itself should stay where it is .... |
Cyphre 21-Oct-2010 [299] | yes, it would be like another padding-left from Y line |
ChristianE 21-Oct-2010 [300] | Just to make sure I'm not missing on latest releases - there is no A108 or A109 host-kit version available yet? |
Pekr 21-Oct-2010 [301] | seems to be so ... |
Henrik 21-Oct-2010 [302] | are there any special cases for bullet points? |
older newer | first last |