ofc_bar_glass.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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. }
  45. class bar extends bar_base
  46. {
  47. function bar()
  48. {
  49. $this->type = "bar";
  50. parent::bar_base();
  51. }
  52. }
  53. class bar_glass extends bar_base
  54. {
  55. function bar_glass()
  56. {
  57. $this->type = "bar_glass";
  58. parent::bar_base();
  59. }
  60. }
  61. class bar_cylinder extends bar_base
  62. {
  63. function bar_cylinder()
  64. {
  65. $this->type = "bar_cylinder";
  66. parent::bar_base();
  67. }
  68. }
  69. class bar_cylinder_outline extends bar_base
  70. {
  71. function bar_cylinder_outline()
  72. {
  73. $this->type = "bar_cylinder_outline";
  74. parent::bar_base();
  75. }
  76. }
  77. class bar_rounded_glass extends bar_base
  78. {
  79. function bar_rounded_glass()
  80. {
  81. $this->type = "bar_round_glass";
  82. parent::bar_base();
  83. }
  84. }
  85. class bar_round extends bar_base
  86. {
  87. function bar_round()
  88. {
  89. $this->type = "bar_round";
  90. parent::bar_base();
  91. }
  92. }
  93. class bar_dome extends bar_base
  94. {
  95. function bar_dome()
  96. {
  97. $this->type = "bar_dome";
  98. parent::bar_base();
  99. }
  100. }
  101. class bar_round3d extends bar_base
  102. {
  103. function bar_round3d()
  104. {
  105. $this->type = "bar_round3d";
  106. parent::bar_base();
  107. }
  108. }
  109. class bar_3d extends bar_base
  110. {
  111. function bar_3d()
  112. {
  113. $this->type = "bar_3d";
  114. parent::bar_base();
  115. }
  116. }