[Pharo-project] The event handling mechanism implemented in Gaucho

Stéphane Ducasse stephane.ducasse at inria.fr
Tue Mar 6 06:40:47 EST 2012


Thanks.

Stef!
On Mar 6, 2012, at 12:37 PM, Fernando Olivero wrote:

> Here is the code, the categories which include the mentioned classes.
> 
> I'm preparing a one-click image of Gaucho for the Mac, so you can play
> with it also.
> And as the official release of the tool also!
> 
> 
> 
> On Tue, Mar 6, 2012 at 12:33 PM, fernando.olivero at usi.ch
> <fernando.olivero at usi.ch> wrote:
>> Hi, Stef and Esteban, i'm sending an overview of the event handling
>> mechanism of Gaucho. So we can discuss the additions of multitouch
>> events and the design as well.
>> 
>> 
>> Key classes: GUserInterface, GPeripheralDevice, GDisplay, GView and
>> the new event model.
>> 
>> GUserInterface: Collaborates with a sensor, and double dispatches the
>> event to the proper peripheral device.
>> 
>> GMouse,GKeyboard: a peripheral device that distinguishes the system
>> event, and sends the user interface  specific reactions: such as
>> 
>> #mouse: aGMouse entered: aGShape
>> #keystroke: aGKeystroke from: aGKeyboard
>> 
>> No reification of the events, just message passing amongst the user
>> interface, the peripherals, the display, the views, and the shapes.
>> 
>> EXAMPLE
>> --------------------------------------------------------
>> EVENTS: from the user to the shape
>> --------------------------------------------------------
>> 1)the user clicks on the mouse
>> 2) a system event is announced
>> 3) the user interface dispatches it to the attached mouse
>> 4) the mouse detects that its a click to a particular shape on a view
>> of the display and informs the user interface
>> 5) the user interface informs the display of the click
>> 
>> ------------------------------------------------------------------------
>> VIEW: shape reacting to events and redrawing
>> --------------------------------------------------------------------------
>> 6) the display informs the active view
>> 7) the active view informs the shape
>> 8) the shape reacts to the click.
>> 9)the display asks the shape wether it should redraw, and informs the
>> damage recorder. Gaucho implements a visual garbage collector scheme,
>> so the code is not polluted with #changed ,similar to eliminating the
>> need to send #alloc and #dealloc on memory garbage collector. But this
>> is surely for another thread.
>> 
> <GauchoUI-Core.st><GauchoUI-Peripherals-Mouse.st><GauchoUI-Peripherals.st>





More information about the Pharo-dev mailing list