Re: ScrolledWindow, DrawingArea, and setting step-increment




I'm developing a MUD client in Pike, using GTK2 for the UI, and
there's an aspect of scrolling that's bugging me. The display uses
discrete lines of text of a fixed height (or, to be more technically
accurate, a fixed distance from the start of one line to the start of
the next), and I'd really like the scrolling to be done in lines


I suggest you to use GtkTextView for your text output, thank to GtkTextTag
it's flexible enough to do everything a mud client needs, also blinking
text, it scrolls at line boundaries and let you keep thousands of lines of
textbuffer without slowdowns.

For an example of ANSI16 parser/output with GtkTextView using GTK2 you can
look at my own mud client ( source
http://sourceforge.net/p/ggmud/code/HEAD/tree/trunk/ggmud/ ).

I think most of the code you may be interested in is in ansi.c & window. c.

--
Bye,
 Gabry


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