<?php
Goweb::loadClass("Goweb_Chart_Styles_Application");
Goweb::loadClass("Goweb_Chart_Styles_Definition");

class Goweb_Chart_Styles {
    
    // ------------------------------------------------ //
    // PROPERTIES -------------------------- PROPERTIES //
    // ------------------------------------------------ //
    protected $_charObjects = array();
    
    public $definition  = null;
    public $application = null;
    
    // ------------------------------------------------ //
    // METHODS -------------------------------- METHODS //
    // ------------------------------------------------ //
    public function __construct() {
        $this->_charObjects = array('BACKGROUND', 'CANVAS', 'CAPTION',
                                    'DATALABELS', 'DATAPLOT', 'DATAVALUES',
                                    'DIVLINES', 'SUBCAPTION', 'TOOLTIP',
                                    'TRENDLINES', 'TRENDVALUES', 'VLINES',
                                    'XAXISNAME', 'YAXISNAME', 'YAXISVALUES');
                                    
        $this->definition  = new Goweb_Chart_Styles_Definition();
        $this->application = new Goweb_Chart_Styles_Application();
    }

    public function render() {
        $definitionElement = $this->definition->render();
        $applicationElement = $this->application->render();
        if (($definitionElement) && ($applicationElement)) {
            $stylesElement = '';
            $stylesElement .= '<styles>';
            $stylesElement .= $definitionElement;
            $stylesElement .= $applicationElement;
            $stylesElement .= '</styles>';
            return $stylesElement;
        }
        return '';
    }
    
}

?>
