[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.tools.gef] Re: draw2d.text indent strategy
|
> (It's great when someone posts a question and has looked at the code!)
Thanks! I know what it's like on your side of the fence. I've been there
and I don't envy you at all. =D
> Do you want a border/margin around a TextFlow or some other InlineFlow?
Minimally, yes (to both).
> We would like to support inline borders maybe in the 3.1 release. Or, do
> you
> want to process TAB characters and advance the LineBox's current X
> position
> to the next "tab stop"?
At this point I am only interested in the presentation (and not any
interaction).
The goal is to have a programmable strategy for indenting. At this point we
certainly can see situations where the first line of a "paragraph"
(TextFlow) is indented and the remaining are not (which does not lend itself
to only a MarginBorder for example). We're also envisioning other
strategies such as the first line of a flow being left justified and any new
lines being indented.
> If you just want a nested block with a border, you should be able to
> handle
> this at the BlockFigure or its layout. Perhaps in setupBlock, the
> recommended width should substract insets.getWidth()
I've poked around a bit at the BlockFlowLayout level and I have gotten
indenting to work mininally (such as in BlockFlowLayout.layoutLine() setting
currentLine.x to Insets.left to start and doing the necessary shrinking of
the recommended width). But this is only step one.
I keep running into a wall whenever I attempt to modify setupLine() to
change the initial 'x' position of a line. It seems that LineBox.commit()
and contiguousCommit() just aren't designed to do anything but start at the
parent's 'x'. Things are just screaming to have a reference to the
FlowFigure in LineBox so that I can determine any indent offset. Thoughts?
Thanks!
--
Rob Grzywinski