./vdo_toggle_color.lua

  1. ---------------------------------------------------------------------------  
  2. -- Vdo_button_toggle 
  3. -- 
  4. -- A button toggle that ise designed for use in the Vdo_pause_mega_list  
  5. -- This item has 2 text strings label and a value. 
  6. --------------------------------------------------------------------------- 
  7.  
  8. function vdo_toggle_color_init() 
  9. end 
  10. function vdo_toggle_color_cleanup() 
  11. end 
  12.  
  13. -- Inherited from Vdo_base_object 
  14. Vdo_toggle_color = Vdo_base_object:new_base() 
  15.  
  16. function Vdo_toggle_color:init() 
  17. 	self.color_value_h = vint_object_find("toggle_color_value", self.handle, self.doc_handle) 
  18. end 
  19.  
  20. ------------------------------------------------------------------------------- 
  21. -- Sets on the color part of the VDO 
  22. -- @param	color		Table example  { red = 0, green = 1, blue = 0} 
  23. ------------------------------------------------------------------------------- 
  24. function Vdo_toggle_color:set_color_value(color) 
  25. 	vint_set_property(self.color_value_h, "tint", color.red, color.green, color.blue) 
  26. end 
  27.  
  28. -- Sets the width of the button toggle object 
  29. function Vdo_toggle_color:set_width(width) 
  30. 	--this does nothing!?... should be removed? 
  31. end 
  32.  
  33. -- Sets the highlighted state of the button to on or off (will eventually have grayed out here too) 
  34. function Vdo_toggle_color:set_highlight(is_highlighted) 
  35. end 
  36.  
  37. -- Sets the enabled state of the button to on or off 
  38. function Vdo_toggle_color:set_enabled(enabled) 
  39. end 
  40.  
  41. ------------------------------------------------------------------------------- 
  42. -- Returns size of color toggle... 
  43. ------------------------------------------------------------------------------- 
  44. function Vdo_toggle_color:get_width() 
  45. 	return 130 
  46. end