Re: GtkClist signals and double click
- From: Vlad Harchev <hvv hippo ru>
- To: Salvador Ramirez <sram profc udec CL>
- Cc: gtk-list gnome org
- Subject: Re: GtkClist signals and double click
- Date: Sat, 5 Aug 2000 12:16:13 +0500 (SAMST)
On Fri, 4 Aug 2000, Salvador Ramirez wrote:
Hi,
> Hi,
>
> I would like to know why the double click event is not implemented
> as a signal in some GTK+ widgets? I tried to make a GtkClist in which
> the user could select a row either with a simple selection and then
> pressing a button and with a double click over the row. It would be
> far simpler to connect a supposed "double_click" signal with the same
> callback (for example) connected to the button. But as this is not
> so you have to connect the "button_press_event" with a more complex
> callback where you have to ask for some other low level events (as
> explained on the GTK+ FAQ).
As for non-existance of "double-clicked": it's obvious that double click
consists of two clicks, so in case of supporting "double-clicked" signal all
mouse clicks would have to be handled with a doubleclick delay (in order gtk
was able to determine what click it was - single click or double click). As I
understand, gtk developers decided that this was not the right thing to do (I
think they were right too).
As for CList - in most selection modes (except GTK_SELECTION_SINGLE) it seems
to me that double click will have the same effect as single click - so you
shouldn't worry about handling it separately.
> Well, I am still trying to get this working. I know GtkClist elements
> have a member structure called selection of type GList. When there is
> nothing selected, selection is NULL? selection have a pointer called
> data, this data is the data available on the selected row? what is
> its format? I tried to print out this data pointer casted to (char *)
> but I got a segmentation fault.
> Any help will be very appreciated,
See FAQs. As I remember, 'selection' is NULL if nothing is selected, if it's
not NULL, then if selection mode is SINGLE or BROWSE, then selection->data is
the index of selected row, otherwise it or the very 'selection' is a GList* of
selected row indices. See documentation.
> thanks in advance!
>
> ---sram
>
> _______________________________________________
> gtk-list mailing list
> gtk-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-list
>
Best regards,
-Vlad
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]