ofc_bar_glass.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <?php
  2. include_once 'ofc_bar_base.php';
  3. class bar_on_show
  4. {
  5. /**
  6. *@param $type as string. Can be any one of:
  7. * - 'pop-up'
  8. * - 'drop'
  9. * - 'fade-in'
  10. * - 'grow-up'
  11. * - 'grow-down'
  12. * - 'pop'
  13. *
  14. * @param $cascade as float. Cascade in seconds
  15. * @param $delay as float. Delay before animation starts in seconds.
  16. */
  17. function __construct($type, $cascade, $delay)
  18. {
  19. $this->type = $type;
  20. $this->cascade = (float)$cascade;
  21. $this->delay = (float)$delay;
  22. }
  23. }
  24. class bar_value
  25. {
  26. /**
  27. * @param $top as integer. The Y value of the top of the bar
  28. * @param OPTIONAL $bottom as integer. The Y value of the bottom of the bar, defaults to Y min.
  29. */
  30. function bar_value( $top, $bottom=null )
  31. {
  32. $this->top = $top;
  33. if( isset( $bottom ) )
  34. $this->bottom = $bottom;
  35. }
  36. function set_colour( $colour )
  37. {
  38. $this->colour = $colour;
  39. }
  40. function set_tooltip( $tip )
  41. {
  42. $this->tip = $tip;
  43. }
  44. function on_click( $event )
  45. {
  46. $tmp = 'on-click';
  47. $this->$tmp = $event;
  48. }
  49. }
  50. class bar extends bar_base
  51. {
  52. function bar()
  53. {
  54. $this->type = "bar";
  55. parent::bar_base();
  56. }
  57. }
  58. class bar_glass extends bar_base
  59. {
  60. function bar_glass()
  61. {
  62. $this->type = "bar_glass";
  63. parent::bar_base();
  64. }
  65. }
  66. class bar_cylinder extends bar_base
  67. {
  68. function bar_cylinder()
  69. {
  70. $this->type = "bar_cylinder";
  71. parent::bar_base();
  72. }
  73. }
  74. class bar_cylinder_outline extends bar_base
  75. {
  76. function bar_cylinder_outline()
  77. {
  78. $this->type = "bar_cylinder_outline";
  79. parent::bar_base();
  80. }
  81. }
  82. class bar_rounded_glass extends bar_base
  83. {
  84. function bar_rounded_glass()
  85. {
  86. $this->type = "bar_round_glass";
  87. parent::bar_base();
  88. }
  89. }
  90. class bar_round extends bar_base
  91. {
  92. function bar_round()
  93. {
  94. $this->type = "bar_round";
  95. parent::bar_base();
  96. }
  97. }
  98. class bar_dome extends bar_base
  99. {
  100. function bar_dome()
  101. {
  102. $this->type = "bar_dome";
  103. parent::bar_base();
  104. }
  105. }
  106. class bar_round3d extends bar_base
  107. {
  108. function bar_round3d()
  109. {
  110. $this->type = "bar_round3d";
  111. parent::bar_base();
  112. }
  113. }
  114. class bar_3d extends bar_base
  115. {
  116. function bar_3d()
  117. {
  118. $this->type = "bar_3d";
  119. parent::bar_base();
  120. }
  121. }