From: Axel S. <Axe...@in...> - 2011-10-25 14:35:10
|
Hi José et al., yes, we might have missed some functions. By all means, implement them (with docs) and submit a patch. We're happy to review and apply patches! Cheers, Axel On 25.10.2011, at 15:46, Claude Heiland-Allen wrote: > Hi, > > On 25/10/11 13:25, José Romildo Malaquias wrote: >> Hello. >> >> I am going to add my first TextView widget to my application, but I >> am >> having difficulties because I cannot find the functions mentioned in >> tutorials and documenetation. >> >> I want to insert a tagged text to a text buffer. The Gtk+ >> documentation >> talks about using the C functions gtk_text_buffer_create_tag and >> gtk_text_buffer_insert_with_tags, but I am not findind any similar >> functions in gtk2hs. > > Not sure if this is "the best way" (certainly my coding style could > use > improvement), but I managed to do something like this a while ago: > > https://gitorious.org/maximus/gulcii/blobs/master/src/gulcii.hs#line83 > creating a text tag table and a couple of buffers > > https://gitorious.org/maximus/gulcii/blobs/master/src/ > gulcii.hs#line146 > inserting text into a buffer, tagging it then coping to the main > buffer > > There is also some code in there to scroll to the end marker of the > buffer each time text is inserted. > > Example videos (the first one was before using tags iirc): > http://claudiusmaximus.goto10.org/v/gulcii/ > > > Claude > >> >>> From the Graphics.UI.Gtk.Multiline.TextTag module documentation one >> can read: >> >> Graphics.UI.Gtk.Multiline.TextBuffer.textBufferCreateTag >> is the best way to create tags. >> >> but textBufferCreateTag is not documented on the documentation for >> Graphics.UI.Gtk.Multiline.TextBuffer. >> >> Are these missing functions going into gtk2hs? >> >> It would be nice if there were any example of how to use TextView >> in the >> demos. >> >> Romildo > > ------------------------------------------------------------------------------ > The demand for IT networking professionals continues to grow, and the > demand for specialized networking skills is growing even more rapidly. > Take a complimentary Learning@Cisco Self-Assessment and learn > about Cisco certifications, training, and career opportunities. > http://p.sf.net/sfu/cisco-dev2dev > _______________________________________________ > Gtk2hs-users mailing list > Gtk...@li... > https://lists.sourceforge.net/lists/listinfo/gtk2hs-users |