Re: tab stops in different positions on different lines with GtkSourceView (or GtkTextView)

Paolo Borelli <[email protected]>
Newsgroups gmane.comp.gnome.devtools
Message-ID <1168444452.5909.67.camel@murdock>
On mar, 2007-01-09 at 23:33 +0000, Adam Tertial wrote:
> --- Paolo Borelli <[email protected]> wrote:
> > On mar, 2007-01-09 at 22:37 +0000, Adam Tertial
> > wrote:
> > > Hi
> > > 
> > > I want to do something a little unusual with
> > > GtkSourceView (or failing that GtkTextView) - have
> > tab
> > > stops in different positions on different lines
> > > ("paragraphs"). An example might be to have the
> > first
> > > line have tab stops at 4, 7, 13, 16 while the
> > second
> > > line has tab stops at 5, 10, 14, 17.
> > > 
> > > Is this possible in any way? - I can't see
> > anything
> > > apart from gtk_source_view_set_tabs_width(), and
> > that
> > > only takes a pointer to the control and one guint.
> > > gtk_text_view_set_tabs ()
> > 
> > >From the API docs of GtkTextView:
> > 
> > "void        gtk_text_view_set_tabs         
> > (GtkTextView *text_view,
> >                                             
> > PangoTabArray *tabs);
> > 
> > Sets the default tab stops for paragraphs in
> > text_view. Tags in the
> > buffer may override the default."
> > 
> > So it seems to imply that it is possible to do what
> > you want with
> > tags... dunno the details though :)
> 
> Yeah, I saw that, but can this be applied to a
> GtkSourceView control somehow?

GtkSourceView is a subclass of GtkTextView, so you can apply GtkTextTags
to it just fine.

Paolo

> 
> 
> 
> Send instant messages to your online friends http://uk.messenger.yahoo.com 
> _______________________________________________
> gnome-devtools mailing list
> [email protected]
> http://mail.gnome.org/mailman/listinfo/gnome-devtools
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.