Re: How many *lines* are visible in a GtkText?



If you have 

  GtkWidget* text

you can access its members with

  GTK_TEXT(text)->line_start_cache (or whatever)

The macro GTK_TEXT() casts "text" to the GtkText* type.


Raymond Wan wrote:
> 
> On Fri, 16 Feb 2001, Davina Armstrong wrote:
> > GtkText has a member:
> > GList *line_start_cache;
> > which I believe is a list of all of the visible lines.  You could try
> > iterating through the list, counting how many lines it contains.  I
> > haven't tried, this, though.
> 
> Hi Davina,
> 
>         Thanks!  Actually, I noticed a few of member variables in GtkText
> that I could look into that might help.  However, being the newbie that I
> am, I wasn't able to directly access them.  That is, with a pointer to a
> GtkWidget, how would one dereference the right pointers to get to this
> variable (which I did notice in the file gtktext.h).
> 
>         I tried looking for it with a graphical debugger but I got lost...
> ;(
> 
> Ray




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