Gtk 2.0 signals in GtkEntry
- From: Brian Cameron <Brian Cameron Sun COM>
- To: gtk-devel-list gnome org
- Cc: Brian Cameron Sun COM
- Subject: Gtk 2.0 signals in GtkEntry
- Date: Mon, 28 May 2001 17:02:42 +0100 (BST)
Gtk Experts
I am working on implementing the Atk code for the GtkEntry and GtkLabel
widgets. This work will make these widgets accessible to people with
disabilities.
I need to be able to generate a "cursor moved" signal which provides the
new position of the cursor, and a "text changed" signal which provides
information about whether the change is an insert or a delete, the
start & end offsets.
I find that the GtkEntry signals for "insert-text" and "delete-text"
work fine for finding out when the text has changed. The delete-text
signal handler passes back two integers which corrispond to the
deleted range, so that works well. The insert-text signal handler
passes back a pointer to the inserted text, and the number of
characters that were inserted. Not quite as convenient, but I can
compute what I need from this.
I'm having more trouble figuring out how to tell when the cursor
has moved. The "move-cursor" signal tells me when the cursor
has moved due to the arrow keys, but doesn't tell me when the cursor
has moved due to a mouse click. I suppose I could just listen for
mouse click events and try to figure out when the cursor has moved.
I suspect that these actions are all "action signals", so I'm not sure
that I should even be using them for these purposes. Any suggestions
or recommendations about how to access this information would be much
appreciated. Is it possible that the GtkEntry widget could generate
a "move-cursor" signal when the cursor is moved by a mouse click?
Thanks much!
Brian
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]