Re: Actions for GailButton



Marc,

I have examined the proposed actions and my findings are below; comments 
requested.

I think we need three actions:

GtkButton.press
GtkButton.release
GtkButton.activate

Pressed
=======
I assume that this action should simulate a button press. I am calling this 
action GtkButton.press.

I have implemented this as follows:

      button->in_button = TRUE;
      gtk_button_enter (button);
      gtk_button_pressed (button);

That is, it simulates the mouse moving into the button followed by 
pressing the left mouse button.


Released
========
I am calling this action GtkButton.release.

There are two cases to consider here, the mouse being released inside and
outside the button.

The mouse button being released outside the button can be implemented as

      button->in_button = FALSE;
      gtk_button_leave (button);
      gtk_button_released (button);

The mouse button being released inside the button can be implemented
as part of the click action.


Clicked
=======
Initially the click action was simple, just call gtk_button_clicked (button);
now this action could be called after GtkButton.press action. I now have
the following implementation:

      if (button->button_down)
      {
        button->in_button = TRUE;
        gtk_button_enter (button);
        gtk_button_released (button);
      }
      else
        gtk_button_clicked (button);


Activate
========
I call this GtkButton.activate and it is implemented as 

      gtk_widget_activate (GTK_WIDGET (widget));

This action seems to have the same effect as GtkButton.click and should,
I think, be used instead of it.

  
toggle
======
This proposed action is on GailToggleButton.

This action seems to be the same as the activate action described above. 


Padraig


> X-Sender: mm128299 bes central sun com
> To: "Padraig O'Briain" <Padraig Obriain sun com>, 
gnome-accessibility-list gnome org
> Subject: Re: Actions for GailButton
> Mime-Version: 1.0
> 
> My thinking about this was the following hypothetical scenario.  Let's say 
> we have an audio recorder with standard cassette-recorder style buttons 
> "play, fast forward, rewind, and stop".  What if the programmer wanted the 
> rewind and fast forward buttons to rewind or fast forward the current 
> recording/playing possition only while they were depressed.  A simple 
> button "click" action for these two buttons would not be sufficient.
> 
> The only reason for having these additional actions is to afford an 
> accessible means by which to simulate press and release events, in the 
> event that they have some additional meaning in the application.
> 
> Marc
> 
> At 04:48 PM 7/11/2001 +0100, Padraig O'Briain wrote:
> >According to
> >http://developer.gnome.org/projects/gap/tech-docs/GTK-impl.html#GtkButton
> >
> >There should be four actions for GailButton: Pressed, released, Clicked,
> >activate, with an additional action toggle for GailToggleButton.
> >
> >I had thought that we have decided that there would be one action for both
> >GailButton and GailToggleButton, i.e. click the button. I cannot find any 
> >record
> >of discussions on this topic.
> >
> >If you think that the four actions should be implemented, please explain why.
> >
> >Padraig
> >
> >
> >_______________________________________________
> >gnome-accessibility-list mailing list
> >gnome-accessibility-list gnome org
> >http://mail.gnome.org/mailman/listinfo/gnome-accessibility-list
> 





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