[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: exit activateCDKSelection from a callback
From: |
TheLonelyStar |
Subject: |
Re: exit activateCDKSelection from a callback |
Date: |
Fri, 3 Apr 2009 09:36:48 -0700 (PDT) |
Bump.
Anybody an Idea of how to make this work?
Thanks!
Nathan
TheLonelyStar wrote:
>
>
>
> Thomas Dickey-2 wrote:
>>
>> Perhaps you can send a short demo program - then we can discuss...
>>
>
> Here it is:
>
> bool Quit=false;
>
> static int OnChar(EObjectType cdktype,void *object,void
> *clientData,chtype key)
> {
> Quit=true;
> }
>
> static char* choices[]={
> " ",
> "*"
> };
>
> int main()
> {
> CDKSCREEN* cdkscreen=initCDKScreen(initscr());
> CDKSELECTION* sel1 =
> newCDKSelection(cdkscreen,20,2,RIGHT,-4,-21,"</U>Sel1<!U>",0,0,choices,2,A_REVERSE,true,false);
> CDKSELECTION* sel2 =
> newCDKSelection(cdkscreen,1,2,RIGHT,-4,19,"</U>Sel2<!U>",0,0,choices,2,A_REVERSE,true,false);
>
> bindCDKObject(vSELECTION, sel1, 'q', OnChar, 0);
> bindCDKObject(vSELECTION, sel2, 'q', OnChar, 0);
>
> drawCDKSelection(sel2,true);
> while(!Quit)
> {
> while(activateCDKSelection(sel1,0)!=1);
> if(Quit)
> break;
> while(activateCDKSelection(sel2,0)!=1);
> }
>
>
> destroyCDKSelection(sel2);
> destroyCDKSelection(sel1);
> destroyCDKScreen(cdkscreen);
> endCDK();
>
> return 0;
> }
>
>
--
View this message in context:
http://www.nabble.com/exit-activateCDKSelection-from-a-callback-tp22769731p22872132.html
Sent from the Gnu - Ncurses mailing list archive at Nabble.com.
- Re: exit activateCDKSelection from a callback,
TheLonelyStar <=