9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] control(2), createmenu and event(2)-style menues
@ 2006-08-30 20:20 Sascha Retzki
  2006-08-30 22:56 ` Martin Neubauer
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Sascha Retzki @ 2006-08-30 20:20 UTC (permalink / raw)
  To: 9fans


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



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-09-07 12:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-30 20:20 [9fans] control(2), createmenu and event(2)-style menues Sascha Retzki
2006-08-30 22:56 ` Martin Neubauer
2006-09-01  5:25 ` Federico Benavento
2006-09-01  9:49   ` Sascha Retzki
2006-09-01 11:11 ` cej
2006-09-05 19:58   ` Sascha Retzki
2006-09-07 12:00     ` Russ Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).