clearing a text buffer



Hi,
  I've recently started working on a Gtk2  project. I previously used to
use the GtkText widget for multi line editing, but thats deprecated in
favour of the GtkTextView/GtktextBuffer combo. However the text/ example
in the docs for gtk2 only shows the use of GtkText.

Right now my problem is how can I clear a text view? The way I thought
it would work is

buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text1));
gtk_text_buffer_delete(buffer, ?, ?)

My question is: how do I get a text iterator to the beginning and end of
a bufffer?

 Ithink I must be missing something obvious but any help would be
appreciated.

Thanks, 


-------------------------------------------------------------------
Rajarshi Guha <rajarshi presidency com> <http://jijo.cjb.net>
GPG Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04 06F7 1BB9 E634 9B87 56EE
-------------------------------------------------------------------
Mathematics is a game played according to certain simple 
rules with meaningless marks on paper.
-- David Hilbert




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]