From: "Jeffrey R. Carter" <spam.not.jrcarter@acm.not.spam.org>
Subject: Re: Event mechanisms for GUI's
Date: Thu, 19 Oct 2006 20:18:30 GMT
Date: 2006-10-19T20:18:30+00:00 [thread overview]
Message-ID: <q4RZg.110621$aJ.103391@attbi_s21> (raw)
In-Reply-To: <1161267729.431982.31510@f16g2000cwb.googlegroups.com>
Lucretia wrote:
>
> The only way I can see of doing this (unless you want to supply some
> code to illustrate) is by providing the listener idiom and separating
> each listener "handler" into a separate interfaces (Ada 2005) and then
> providing a Set_Events_Mask on the component which goes through the bit
> mask and checks if there are interfaces set for the particular events:
That seems overly complicated. Something like
type Window_ID is ...;
type Widget_ID is ...;
type Event_ID is
(Close, Left_Click, Middle_Click, Right_Click, Double_Click, ...);
type Event_List is array (Positive range <>) of Event_ID;
type Event_Set is private;
function Make (List : Event_List) return Event_Set;
procedure Add (To : in Window_ID; Event : in Event_ID);
procedure Remove (From : in Window_ID; Event : in Event_ID);
procedure Add (To : in Window_ID; Set : in Event_Set);
procedure Remove (From : in Window_ID; Set : in Event_Set);
function Event_Pending (Window : Window_ID) return Boolean;
procedure Get (Event : out Event_ID; Widget : out Widget_ID);
--
Jeff Carter
"I fart in your general direction."
Monty Python & the Holy Grail
05
next prev parent reply other threads:[~2006-10-19 20:18 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-26 17:28 Event mechanisms for GUI's Lucretia
2006-09-26 20:39 ` Jeffrey R. Carter
2006-09-26 23:18 ` tmoran
2006-09-27 3:02 ` Jeffrey R. Carter
2006-09-27 4:26 ` tmoran
2006-09-27 5:39 ` Jeffrey R. Carter
2006-09-27 6:21 ` Lucretia
2006-09-27 21:29 ` Jeffrey R. Carter
2006-09-27 23:05 ` Randy Brukardt
2006-09-28 3:47 ` Jeffrey R. Carter
2006-09-28 4:15 ` tmoran
2006-09-29 3:16 ` Randy Brukardt
2006-10-14 19:25 ` Lucretia
2006-10-15 1:22 ` Jeffrey R. Carter
2006-10-15 2:29 ` Lucretia
2006-10-16 4:11 ` Jeffrey R. Carter
2006-10-19 14:22 ` Lucretia
2006-10-19 15:04 ` Dmitry A. Kazakov
2006-10-19 20:18 ` Jeffrey R. Carter [this message]
2006-10-19 21:51 ` Lucretia
2006-10-19 22:01 ` Lucretia
2006-10-20 4:48 ` Jeffrey R. Carter
2006-10-15 13:53 ` Ed Falis
2006-10-16 4:19 ` Jeffrey R. Carter
2006-10-14 19:44 ` Lucretia
2006-09-27 8:10 ` Dmitry A. Kazakov
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox