Re: utility of GtkTextIter ?



On Tue, 2003-03-25 at 06:26, Axel wrote:
> Text Widget Overview in API doesn' t talk about it and its API isn' t 
> very explainative...
> so, what is the utility of GtkTextIter ?
I have used them for getting text from a textview
GtkTextIter textiterstart;
GtkTextIter textiterend;

textbuffer =
gtk_text_view_get_buffer(GTK_TEXT_VIEW(propdata->comments_area));
	gtk_text_buffer_get_start_iter(textbuffer, &textiterstart);
	gtk_text_buffer_get_end_iter(textbuffer, &textiterend);
	
comments = gtk_text_buffer_get_text(textbuffer, &textiterstart,
&textiterend, TRUE);

Iterators are used to mark a position in a datastructure (in this case a
null terminated string).  They provide an interface for accessing data
and walking data in a liniar fashion (Iterating over a data structure).


> 
> Another question : I d like to display some text in border of windows(in 
> particulary a TextView) what should I use for that?
> 

I don't understand the question.  Borders are drawn by the windows
manager and there is no way to embed widgets in them.  You can change
the titlebar text but the gnome-HIG cautions against it.

--
J5





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