[Iup-users] Matrix -- responding to key presses?
Jeremy Cowgar
jeremy at cowgar.com
Tue Oct 30 15:15:32 GMT+3 2007
Ah... I see now. Changing it to ACTION_CB made everything work.
Jeremy
Antonio Scuri wrote:
> In IupMatrix the callback is called "ACTION_CB", notice the "_CB".
>
> Best,
> scuri
>
>
>> -----Original Message-----
>> From: iup-users-bounces at lists.luaforge.net
>> [mailto:iup-users-bounces at lists.luaforge.net] On Behalf Of
>> Jeremy Cowgar
>> Sent: terça-feira, 30 de outubro de 2007 14:22
>> To: IUP discussion list.
>> Subject: [Iup-users] Matrix -- responding to key presses?
>>
>> Hello.
>>
>> I am wondering how can I respond to certian key presses? for
>> instance, when not in an edit field, I want to be able
>> respond to some simple key presses to take action on, such as
>> when the user presses D or K or L. I want to do something. I
>> am having problems getting those key presses. I figured I would just:
>>
>> int myActionCallback (Ihandle *self, int ch, int lin, int
>> col, int active, char *after) {
>> printf ("Ch=%i lin=%i col=%i\n", ch, lin, col);
>> switch (ch)
>> {
>> case 'D':
>> do something
>> return IUP_IGNORE;
>> case 'K':
>> do something else
>> return IUP_IGNORE;
>> }
>> return IUP_DEFAULT;
>> }
>>
>> IupSetCallback (myMatrix, "ACTION", (Icallback) myActionCallback);
>>
>> But w/the above, it never seems as though my action callback
>> function is called. Any thoughts?
>>
>> Jeremy
>>
>>
>> _______________________________________________
>> iup-users mailing list
>> iup-users at lists.luaforge.net
>> http://lists.luaforge.net/cgi-bin/mailman/listinfo/iup-users
>>
>>
>
>
> _______________________________________________
> iup-users mailing list
> iup-users at lists.luaforge.net
> http://lists.luaforge.net/cgi-bin/mailman/listinfo/iup-users
>
More information about the iup-users
mailing list