mån 2002-02-04 klockan 08.39 skrev James Henstridge:
> Pier Carteri wrote:
> 
> >Hi to all,
> >I'm learning the new gtk2 and in particular the multiline text widgets (TextBuffer
> > TextView & Co.)
> >My idea is to see if I can use theese widgets in my app. The app is basically and
> >editor for Python and since now I've used the Scintilla widget that's very cool!
> >So first question:
> >Is it possible to create a class based on new widgets of gtk2,that implements 
> >a widget with syntax styling, folding and everythings else like Scintilla? 
> >I suppose that the answer is Yes, but how much difficult will it be (in particular
> >the auto-highlight of text and the folding rutine)?
> >
> If it can be done with the Tk text widget, it can be done with 
> GtkTextView (probably).  There are also a number of things the gtk 
> widget can do that Tk can't.
> 
> >
> >And now about TextIter:
> >can you explain me in a few words what is a TextIter and how to create one (probably
> >an example will be the perfect explanation) 
> >
> Text iters represent a position in the text buffer.  You can create them 
> with a GtkTextBuffer object as follows:
>   iter = buffer.get_iter_at_line_offset(linenum, charoffset)
>   iter = buffer.get_iter_at_offset(charoffset)
>   iter = buffer.get_start_iter()
>   iter = buffer.get_end_iter()
>   start_iter, end_iter = buffer.get_bounds()
> 
> There are a few other text buffer methods for creating iters, but those 
> should be enough most of the time.  You can then use iter methods to 
> advance by chars, words or lines, etc.
> 
> >
> >
> >[An off topic question: does anybody know when we can have a glade2 program 
> >to play with?]
> >
> I don't know when glade2 will be ready.  There is also a port of the old 
> glade to gtk 2.  I don't know the branch name for this though.  As a 
FYI: It's called glade-gnome2-branch

> third option, you can do your interface in glade as normal, and use 
> libglade-convert to convert the .glade file to the new format.
> 
> James.
> 
> -- 
> Email: [EMAIL PROTECTED]
> WWW:   http://www.daa.com.au/~james/
> 
> 
> 
> _______________________________________________
> pygtk mailing list   [EMAIL PROTECTED]
> http://www.daa.com.au/mailman/listinfo/pygtk


_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk

Reply via email to