gtktext new base widget



I am working hard to get the gtkextext widget to be faster and will
soon release a new version.

I think the new gtktext widget should be based on gtkextext. If so I will remove
regex/undo/search stuff from the base gtktext class and create a subclass with those features.

I dont see any reason to base the new widget on gtksctext when the gtkextext
already has horizontal scrolling and better line handling.

If the horizontal scrolling really is broken it could be fixed.
The line_wrap handling is also a thing am working on.

The property API also works better than the old stuff and has nothing to do
with the syntax higlighting.

New Signals:

"property_insert"   (sent after text insert)
"property_remove"  (sent when removing text so user can update props) 
"property_current"   (sent when cursor is moved to a new property)
"column_change"
"line_change"

New API:

/* set/get line/column */

gtk_extext_[get/set]_line(line)
gtk_extext_[get/set]_column(column)

/* insert new font and color styles */
/* you can pass NULL to one or more of the members */
/* NULL means default color or font */

gtk_extext_style_[insert/remove]("yourstylename",font,bgcolor,fgcolor)

/* Property handling set the at start/endpos */
/* set (inserts) a new property at start/endpos */
/* passing "default" means set default font and colors */ 
/* this is the same as calling gtk_extext_property_clear directly */
/* All members returns a direct pointer to a GtkExTextProperty structure */
/* Those pointers should NOT be g_free:d */
/* The returned pointer is there to make it faster */
/* if you want to call any gtk_extext_property_* 
    more than once in a function */

gtk_extext_property_set("stylenametouse",startpos,endpos,userdata)
gtk_extext_property_clear(text,startpos,endpos,oldprop)
gtk_extext_property_get_at_pos(text,pos,oldprop);

/* get line and property parameters */
/* the line height/width */
/* returns GtkExTextLineData structure */

gtk_extext_get_line_data(text,line_num,oldlinedataptr_if_called_before)
gtk_extext_get_line_by_xoffset(offset)
gtk_extext_get_column_by_yoffset(offset)

Thats the basic API. I think this API or similar should be there.
This make it much simpler to make a subclass based on gtktext.

Onse again I will release a new improved version soon.
And hopefully it will be more stable/better than 0.0.11 :-) 

Greats

MikeH

---

Check out my homepage at (under heavy reconstruction): 
http://www.bahnhof.se/~mikeh	

Email: mikeh@bahnhof.se
international Phone 46-44-126995
Sweden Phone: 044-126995
ICQ: Error fix later



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