GtkTextView / GtkTextBuffer and g_signal_connect
- From: Joe <joeja mindspring com>
- To: gtk-app-devel-list gnome org
- Subject: GtkTextView / GtkTextBuffer and g_signal_connect
- Date: Mon, 19 Aug 2002 19:11:12 -0700
Hello,
I am not on this list and I have a few questions. I am attempting
to develop a simple editor using the GtkTextView / GtkTextBuffer.
1) I am not sure this is a bug but here goes. I have created a
composit textwidget called GXTEXT. The buffer is a text buffer and the
textarea is the textview. I add the two signals below:
g_signal_connect(GXTEXT(maintext)->buffer, "changed",
(GtkSignalFunc)lineposition, label);
// this signal fails to pass the label but the previous one does ?
g_signal_connect(GXTEXT(maintext)->textarea, "move_cursor",
(GtkSignalFunc)textlineposition, label);
The function prototypes are below:
static void lineposition (GtkTextBuffer *, GtkWidget *);
static void textlineposition (GtkWidget *, GtkWidget *);
textlineposition does not get the label passed to it. I am not sure
why. lineposition DOES get the label.
Any ideas on what I may be doing wrong? Do I need to pass more
arguments to textlineposition?
2) Do I need to do something special to get scrolling to work? I
get scroll bars in the scrolled window, but when I am typing and I hit
carriage return or get out of the viewport I have to manually move the
window. Is this a bug?
3) How do I select all the text in the textbuffer? I know how to
get the textbounds, but how would I implement a 'select all' menu type
item? Is there a special tag I should use or something?
4) Is there an easy way to do syntax highlightening?
Thanks,
Joe
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]