minor bug fix
[openemr.git] / library / openflashchart / php-ofc-library / ofc_menu.php
blob0750a09c2b3a624a10ac7b3ce52d5f563e3621a0
1 <?php
3 class ofc_menu_item
5 /**
6 * @param $text as string. The menu item text.
7 * @param $javascript_function_name as string. The javascript function name, the
8 * js function takes one parameter, the chart ID. See ofc_menu_item_camera for
9 * some example code.
11 function ofc_menu_item($text, $javascript_function_name)
13 $this->type = "text";
14 $this->text = $text;
15 $tmp = 'javascript-function';
16 $this->$tmp = $javascript_function_name;
20 class ofc_menu_item_camera
22 /**
23 * @param $text as string. The menu item text.
24 * @param $javascript_function_name as string. The javascript function name, the
25 * js function takes one parameter, the chart ID. So for example, our js function
26 * could look like this:
28 * function save_image( chart_id )
29 * {
30 * alert( chart_id );
31 * }
33 * to make a menu item call this: ofc_menu_item_camera('Save chart', 'save_image');
35 function ofc_menu_item_camera($text, $javascript_function_name)
37 $this->type = "camera-icon";
38 $this->text = $text;
39 $tmp = 'javascript-function';
40 $this->$tmp = $javascript_function_name;
44 class ofc_menu
46 function ofc_menu($colour, $outline_colour)
48 $this->colour = $colour;
49 $this->outline_colour = $outline_colour;
52 function values($values)
54 $this->values = $values;