On Fri, 17 Jul 2009 09:28:11 -0400 Michael Hughes <[email protected]> said:
> I wonder if anyone can give me some hints on creating multi-line > displays with Evas textblock objects. I can concatenate strings with > word wrap using evas_textblock_cursor_text_append() but creating line > breaks has so far eluded me. All of the examples I have found are > writing single strings with evas_object_textblock_text_markup_set() but > that function clears any existing text. Is there a way to concatenate > strings with line breaks? Can formatting be applied to an individual > string? evas_textblock_cursor_format_append(cursor, "\n"); note. the tb api breaks text into text (chars that appear in a squence) and formatting (things that affect chars like changes of color, font, style, alignment, spacing, newlines, tabs etc.). so basically you evas_textblock_cursor_text_append(c, "Hello World!"); evas_textblock_cursor_format_append(cursor, "\n"); evas_textblock_cursor_text_append(c, "Wasaaaaaaaaaaaaaaaaaaap!"); for example. markup is a convenience api that saves dealing with tb at its "native" text+format api - but only for some things. it's not a be-all-and-end-all of it. once you get the native api (not the markup one) the markup one becomes all clear (as it parses, finds tags and simply matches a tag name with an existing style name - then uses that format string in the style, or if it doesnt match, uses it "raw" as a format string). see expedite's textblock tests for some insight into raw format strings. :) > Mike > > ------------------------------------------------------------------------------ > Enter the BlackBerry Developer Challenge > This is your chance to win up to $100,000 in prizes! For a limited time, > vendors submitting new applications to BlackBerry App World(TM) will have > the opportunity to enter the BlackBerry Developer Challenge. See full prize > details at: http://p.sf.net/sfu/Challenge > _______________________________________________ > enlightenment-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > -- ------------- Codito, ergo sum - "I code, therefore I am" -------------- The Rasterman (Carsten Haitzler) [email protected] ------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
