r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[!REBOL3 Host Kit]

Maxim
19-Oct-2010
[217]
one thing which is sorely missing in the general GUI concepts of 
text is flowing text from boxes to boxes.
  

multi-columns are an example of a simple floating text box implementation... 
maybe you could go all the way and add support for arbitrary text 
boxes which flow with content from "previous" boxes when text reaches 
the end of the previous box?
Oldes
19-Oct-2010
[218x2]
in HTML is not only margin, but also padding.
Maxim, you are asking for InDesign made in REBOL? ;)
AdrianS
19-Oct-2010
[220x2]
problems is that if you model some of this on CSS in terms of spacing, 
insets, etc, you lack the higher level stuff like columns, flows 
between areas (like Petr and Max are saying)
problem is...
Cyphre
19-Oct-2010
[222]
Oldes, imagine you have gob of 200x300 size but you want to have 
layout of two paras in total size of 400x600. In such case you'll 
set MARGIN 400x600 to ensure the paragraph layout is filled inside 
this space. And then you can use SCROLL to move the content inside 
the gob.
Maxim
19-Oct-2010
[223x2]
its actualy not that complicated... in the sense that you must only 
know the coords of the boxes (something like sub gobs) and then when 
the text reaches the lower right corner of a box, a decision is made... 
either the box can stretch a little or you jump to a new box to render 
into.


implementing columns thus becomes a specific case of a generalized 
solution.  just provide two sub gobs and texts flows from one to 
the other.


note that the text boxes are independent from paragraph... these 
boxes are the actual "page" area which the rtf uses to calculate 
bounds and word-wrapping and offsets and such.
(I was replying to AdrianS)
Cyphre
19-Oct-2010
[225]
Maxim, I talked about the floating toext to multiple gobs with Henrik. 
I think we could add feature that will tell you at what position 
the text reached the lower right corner of gob and then you could 
pass the rest to any other gob using REBOL code. It is imo better 
to not make this system at the low-level as it can get easily complex.
BrianH
19-Oct-2010
[226]
Only square embedded gobs? No curve-around-image? Just asking...
Oldes
19-Oct-2010
[227]
Using margin for specifying width of the text is strange.. or I miss 
something. When you want text with size 400x600, why to specify it 
by margin?
Cyphre
19-Oct-2010
[228x2]
BrianH: if your embedded gob is transparent, you can render any shape 
inside, or do you mean anything else?
Oldes, feel free to come with better word.
BrianH
19-Oct-2010
[230x2]
Some DTP or word processing functions let you embed non-rectangular 
objects in their text, and the text wraps around their curves. I 
don't expect your system to do this, but it's a really cool feature.
The reason I don't expect it is that gobs are defined rectangularly, 
afaik.
Oldes
19-Oct-2010
[232]
Cyphre, in your example the correct word sounds like WIDTH 400x600
Cyphre
19-Oct-2010
[233]
ah, got it...since the gobs are rectangular we would need to provide 
kind of mask for that. Could be a cool feature but I'd play with 
this once everything else is working :)
Oldes
19-Oct-2010
[234]
I can imagine MAGIN to be margin around all content, including all 
columns. But than I'm missing inter paragraph indentation, which 
could be named PADDING
Cyphre
19-Oct-2010
[235]
hmm, WIDTH for X and Y value?? doesn't too intuitive to me.
Oldes
19-Oct-2010
[236]
sorry, SIZE
Cyphre
19-Oct-2010
[237x2]
MARGIN was meant for the whole content.
inter-para indenation would be defined by the para/indent/y (specific 
for each para) and origin/x (defined for the whole gob) as it is 
on the picture in the doc.
Oldes
19-Oct-2010
[239x3]
I mean horizontal
not to indent just first line, but complete paragraph.. possibly 
also from right side.
in InDesign you can also specify number of rows which should be indetnet 
at the beginning of the paragraph (not just one line) so you can 
place image as a first letter.
Cyphre
19-Oct-2010
[242x3]
the origin/x will do the ondentation from right side
(see the picture)
number of rows for indent : this is not neccessary imo as if you 
place gob with image at the beginning the text will flow around automatically.
Oldes
19-Oct-2010
[245]
Hm.. when I think about it, it would be better not to use image, 
but letter with bigger height.. but than it would be required to 
be able flow around such a letter. But that's maybe too complicated. 
Better to have something working first.
Cyphre
19-Oct-2010
[246x2]
Regarding the padding for para: after Oldes showing me some example 
I got it and I thing this could be useful to add
Oldes, you could add gob with big letter inside at the beginning 
of the para :)
Oldes
19-Oct-2010
[248]
I know, but how the text will continue? will it start at the same 
baseline, or top aligned so it could flow around like in old books?
Cyphre
19-Oct-2010
[249x2]
But yes, we should think realistic and define balance between the 
simplcity and full blown browser engine.
The control of the positioning/flow around the gobs in the text is 
not yet specified in details but we would need some option which 
will define this behaviour.
Pekr
20-Oct-2010
[251]
Cyphre - I am not sure if we should accept CSS document model here, 
as users/designers are used to it? I tried to search for some typography 
vocabulary, but there is not much in it:

http://www.proximasoftware.com/fontexpert/terms/


Then I also looked into MS Word (well, not the best DTP option, I 
know :-), but I am somehow satisfied, how paragraph styling is done 
in it, and I find it pretty much flexible. So few of my notes:

PAGE:
--------
- text-gob - let's say it equals to page


- margin should allow to set 4 sides, as is with CSS and even DTP 
systems. DTP system talk about margin as about the space to the edge 
of the paper. I don't know, how such terms are used in conjunction 
to R3 GUI, but we should somehow find-out, how to not be confusing. 
But - having just a single marign is not imo sufficient.


- origin should replace scroll, and it should mean offset. But looking 
into VID2, origin just did what you propose - but I don't like it, 
as it required us to introduce offset to VID2.

PARA:


- indent - e.g. MS Word defines: indent-left, indent-right (kind 
of creates margins/padding, if you relate to CSS terms), then they 
have indent-special - first-line | "pre-indent" (-first-line,not 
much usefull). It also has check-box for "mirror setting", which 
changes indent-left to inner, and indent-right to outer (dunno what 
it is good for)


- spacing - top-space | bottom-space - but here, it is not inner 
space in paragraph, it is more of an indentation between paragraphs. 
In other words - I can imagine calling it even padding (as we are 
used from VID2, we used space there for the auto-spacing). It allows 
you to set, that it will not add space in between two paragraphs 
of the same style. It also allows you to set spacing for rows - either 
by float, or by multiples, 1,5 rows, double, the-least-possible (pixels), 
exactly (pixels)


- paging - some stuff to set in regards to paragraph and paging, 
as linking of paragraphs, linking of lines

- runaround settings (dunno if correct english term)
Maxim
20-Oct-2010
[252x2]
last one would be line wrapping?
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 
...