Subversion Repositories HomeAutomation

Rev

Rev 1185 | Blame | Compare with Previous | Last modification | View Log | SVN | RSS feed

  1.  
  2. function MenuItem(parentDisplay)
  3. {
  4.     this.parentDisplay = parentDisplay;
  5.     this.displayData = new Array();
  6. }
  7.  
  8. /* the display object who created the menu item */
  9. MenuItem.prototype.parentDisplay = null;
  10.  
  11. /* the data to display for this item, may be updated before sent to display via the doUpdate function */
  12. MenuItem.prototype.displayData = null;
  13. /* function to call when this menu item is active and left is choosen */
  14. MenuItem.prototype.doLeft = null;
  15. /* function to call when this menu item is active and right is choosen */
  16. MenuItem.prototype.doRight = null;
  17. /* function to call when this menu item is active and button is pressed */
  18. MenuItem.prototype.doPress = null;
  19. /* function to call before this menu item is displayed */
  20. MenuItem.prototype.doUpdate = null;
  21. /* what MenuItem is previous item, if used */
  22. MenuItem.prototype.nextItem = null;
  23. /* what MenuItem is next item, if used */
  24. MenuItem.prototype.prevItem = null;
  25. /* what MenuItem to descend to, if used */
  26. MenuItem.prototype.descItem = null;
  27.  
  28. MenuItem.prototype.setNextItem = function (nextItem)
  29. {
  30.     this.nextItem = nextItem;
  31. }
  32. MenuItem.prototype.setPrevItem = function (prevItem)
  33. {
  34.     this.prevItem = prevItem;
  35. }
  36. MenuItem.prototype.setDescItem = function (descItem)
  37. {
  38.     this.descItem = descItem;
  39. }
  40.  
  41.