[lcdproc] menus for clients
Joris Robijn
joris@robijn.net
Tue, 27 Mar 2001 15:30:57 +0200
OK here's the promised thread. It's about the (long existing) idea of
giving the clients their own menu.
Something like: from the main menu you choose "clients", and then a
list of clients that have registered a menu shows up. For example
"memsizes". You select "memsizes". Then the menu defined by memsizes
shows up, with things like column order, sort order etc.
We could make menu's by using the widget language like:
--> CREATEMENUITEM SCREEN=s1 TYPE=action NAME="play"
<-- OK
--> CREATEMENUITEM SCREEN=s1 TYPE=action NAME="stop"
<-- OK
--> CREATEMENUITEM SCREEN=s1 TYPE=action NAME="stop"
<-- ERROR CODE=exists TEXT="This item already exists"
--> CREATEMENUITEM SCREEN=s1 TYPE=action NAME="sort/name"
<-- OK
--> CREATEMENUITEM SCREEN=s1 TYPE=action NAME="sort/size"
<-- OK
--> CREATEMENUITEM SCREEN=s1 TYPE=action NAME="sort/time"
<-- OK
--> CREATEMENUITEM SCREEN=s1 TYPE=slider NAME="volume"
<-- OK
Notice the submenu being created for "sort".
When an item is selected the client receives messages like:
<-- EVENT TYPE=menuaction SCREEN=s1 NAME="play"
<-- EVENT TYPE=menuslider SCREEN=s1 NAME="volume" VALUE=34
Removal of items with
--> DELETEMENUITEM SCREEN=s1 TYPE=action NAME="sort/name"
<-- OK
--> DELETEMENUITEM SCREEN=s1 TYPE=action NAME="sort/size"
<-- OK
--> DELETEMENUITEM SCREEN=s1 TYPE=action NAME="sort/time"
<-- OK
And the submenu is removed as well.
or:
--> ERASEMENU SCREEN=s1
<-- OK
And all items are gone.
--> ERASEMENU SCREEN=s1 NAME="sort"
<-- OK
to erase the sort submenu only.
Joris
--
Joris Robijn <joris@robijn.net>
Home: 053 4311 553
Mobile: 06 288 41 964
// To understand recursion, we must first understand recursion
-----------------------------------------------------------
To unsubscribe from this list send a blank message to
lcdproc-unsubscribe@lists.omnipotent.net