/* Network-Integrated Multimedia Middleware (NMM)
 * http://www.motama.com/nmm.html
 *  
 * Copyright (C) 2006-2007
 * Motama GmbH, Saarbruecken, Germany
 * http://www.motama.com
 *  
 * This file is part of NMM. 
 * 
 * NMM is free software; you can redistribute it and/or modify it    
 * under the terms of the GNU General Public License as published by 
 * the Free Software Foundation; only version 2 of the License.      
 * 
 * NMM is distributed in the hope that it will be useful, but WITHOUT 
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public 
 * License for more details.  
 * 
 * You should have received a copy of the GNU General Public License 
 * along with NMM; if not, write to the Free Software Foundation,    
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 */

#ifndef _NMM_COLORBARUNIT_HPP_
#define _NMM_COLORBARUNIT_HPP_ _NMM_COLORBARUNIT_HPP_

#include "nmm/nmm_prefix.hpp"

#include "OSDElement.hpp"

#include "nmm/plugins/video/osd/manager/interfaces/IPlaneDecorator.hpp"

namespace NMM {
  class ColorBarUnit : public OSDElement {
  public:
    ColorBarUnit(IOSDManager* manager, IWidgetFactory* factory, string font);
    ~ColorBarUnit();

    /**
     * Sets the text of all four color fields.
     */
    void setText(const string& red, const string& green, const string& yellow, const string& blue);

    /**
     * Sets the text of the red color field.
     */
    void setRedText(const string& text);

    /**
     * Sets the text of the green color field.
     */
    void setGreenText(const string& text);

    /**
     * Sets the text of the yellow color field.
     */
    void setYellowText(const string& text);

    /**
     * Sets the text of the blue color field.
     */
    void setBlueText(const string& text);

    /**
     * Returns the text of the red color field.
     */
    string getRedText();

    /**
     * Returns the text of the green color field.
     */
    string getGreenText();

    /**
     * Returns the text of the yellow color field.
     */
    string getYellowText();

    /**
     * Returns the text of the blue color field.
     */
    string getBlueText();

  protected:
    void setText(int i, const string& t);

    string   font;
    
    IWidgetComposite_var  composite;
    ITextView_var         text[4];
    IPlaneDecorator_var   plane[4];
  };
  
}

#include "nmm/nmm_suffix.hpp"

#endif //_NMM_COLORBARUNIT_HPP_
