Changes

Jump to: navigation, search

CMenu pseudo code - OOP344 20113

1,395 bytes added, 23:53, 29 November 2011
no edit summary
{{OOP344 Index | 20113}}
 
<big><pre>
LOOP UNTIL editing is done
set the browsing loop to end
END IF
/* IF the key is DOWN THEN Set current to be continued */the next item in the list IF this can not be done THEN IF Menu is a dropdown THEN set the first and current item on menu to be the first item in the list draw the Menu ELSE set the borwsing loop to end END IF END IF IF current index is passed the last one in the mneu THEN make the first to point to the next one in the list draw the menu END IF END IF IF the key is UP THEN Set current to be the previous item in the list IF this can not be done THEN IF Menu is a dropdown THEN set the current item in menu to be the last the list set the first item in menu to be NUM items before last in the list, (where NUM is the number rows in the menu) draw the Menu ELSE set the borwsing loop to end END IF END IF IF current index is passed the first index in the menu THEN set the first index to point to previous one in the list draw the menu END IF END IF IF the Key is ESCAPE THEN set the menu not to drop, set browsing loop to end set the edting loop NOT to end END IF IF the key is right, left, tab or any of the printable characters THEN set the browsing loop to end END IF
End menu browsing loop
End Editing loop
</pre></big>

Navigation menu