Re: Questions about FTC's capabilities

  • From: Joe Strout <joe@xxxxxxxxxxxxxxxxx>
  • To: ftcdev@xxxxxxxxxxxxx
  • Date: Mon, 14 Jul 2008 10:55:47 -0600

Thanks for the frank answers. I have a couple of follow-up questions if you don't mind...


On Jul 14, 2008, at 10:41 AM, Brendan Murphy wrote:

1. Can FTC be used in some way without a canvas, just telling it to draw some content within given rectangular bounds? Or, telling me where the line breaks are and letting me iterate over style runs and embedded objects, so I can manually draw or export them?

The FTC is canvas based, so the short answer is no.

For rendering when the content is not being edited, you could move
the FTC offscreen and just grab the internal data structures and
render them yourself. You would have to provide glue code to
render the lines in your custom environment, but that would be
pretty straight forward.

OK. How is content represented in the FTC? Is there some little class hierarchy similar to RB's StyledText data? Or is it all internal magic? (I'm wondering whether I could instead just walk the style runs and embedded objects myself, and have a decent chance of drawing the same way FTC does.)

Alternatively, the FTC must have a "Draw" method somewhere (that is invoked by its Paint event, and also invoked whenever the content changes). Any chance that is (or could be made) public, and given a Graphics parameter, so I can just tell my off-screen FTC to draw *here* (and give it the result of some Graphics.Clip call)?

2. Can I make an editable FTC area that's just a rectangular area of a canvas, rather than the whole thing? (I generally try to avoid layer canvases on top of each other, but I guess we could try that if necessary.)

No, it is not designed to do that.

OK, that's understandable, since there are a whole lot of events that have to be hooked up for actual editing. Perhaps moving a second (FTC) canvas on top of the main one will work.

3. Can I link two editable areas together, so that content flows from one to another? (Picture a multi-column newsletter layout, where text that flows off the end of column 1 goes to the top of column 2.)

It is not designed to do that, but you do have access to the
source code, which makes it possible. The question would be if it
is feasible?

Right. This is the sort of thing that's hard to bolt on afterward, if it wasn't at least in mind in the original design. But perhaps we'll get lucky and FTC's design will be conducive to it.

Thanks,
- Joe

--
Joe Strout
Inspiring Applications, Inc.
http://www.InspiringApps.com



FTC Website: 
http://www.truenorthsoftware.com/FormattedTextControl/FormattedTextControl.html
Set List Options (digest and vacation modes): www.freelists.org/list/ftcdev
List Archive: www.freelists.org/archives/ftcdev
Unsubscribe: Send email to ftcdev-request@xxxxxxxxxxxxx with "unsubscribe" in 
the subject field.



Other related posts: