From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: To: 9fans@cse.psu.edu From: "Sascha Retzki" Date: Wed, 30 Aug 2006 22:20:35 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [9fans] control(2), createmenu and event(2)-style menues Topicbox-Message-UUID: ab7ac6b6-ead1-11e9-9d60-3106f5b1d025 Hi, I want to write a GUI which displays audiodata - I would like the user to be able to select commands based on an 'event-style' rightclick-menue - basicly gview.c for foo.wav. As some of those commands require selections which could be easily done via radio-buttons for example, I came to the conclusion that control(2) is the way to go. Unfortunetly, I cannot make createmenu() work - and I cannot include event.h alongside control(2) :) So, I'd like to start with this one: Is createmenu() like the right-click menue presented by event.h? I did not yet find any code in the distribution which actually uses that, but maybe I am blind. Here is a pseudo-like version of my test-code, maybe you can point me to the right direction: Control *menue; initdraw(0, 0, "DAE [main]"); initcontrols(); cs = newcontrolset(screen, nil, nil, nil); menue = createmenu(cs,"daemenue"); chanprint(cs->ctl,"daemenue add bl0b"); activate(menue); resizecontrolset(cs); // calls getwindow() with Refbackup for(;;) { read the channel tokenize print() the message because this is test-code } Anything obviously wrong? With best regards, Sascha