bug-ncurses
[Top][All Lists]
Advanced

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

Focus Callback in CDK


From: Fu Steve X
Subject: Focus Callback in CDK
Date: Fri, 4 Mar 2005 12:12:38 -0500


Hi,

It seems there is nothing like the Motif type Focus Callback for CDK. Is that right? Because the regular Callbacks via key bindings or pre/post processing all require invoking a key.

My scenarios is that there are two widgets on a cdkscreen, one ItemList and one Scroll. Once the user selects a parameter from the ItemList and hit KEY_TAB to traverse to the Scroll, the Scroll will refresh its data using the newly selected parameter.

The only way I can get it to work is to hack the CDK traverseCDKScreen() function. Moving the following line from the default case to right before the big switch. I then bind the key TAB to the ItemList to refresh the Scroll. That also achieves another purpose. That is, now I can register callback for KEY_ESC for both widgets on the cdkscreen to handle the regular exit/quit. I'm not using the Menu widget anyway.

                InjectObj (curobj, key);


Any graceful way to do that from the user code with hacking the system CDK code? It not, any side effect from the hack other than the behavior of the Menu widget being shadowed?

Another abnormal for the traversal is that the first TAB I hit right after starting an application is always ignored. I had to hit TAB twice before the traversal to behave. I've seen this in both my own code and the sample traverse_ex.c.

Thanks!

Steve Fu




reply via email to

[Prev in Thread] Current Thread [Next in Thread]