#ifndef __OOL_XCHART_H__
#define __OOL_XCHART_H__

/*===========================================================================*/
/* OOL ------------------- the Open Object Library ------------- OS/2 Beta 1 */
/*===========================================================================*/
/*                              class: XChart                                */
/*                       derived from: XUserWindow                           */
/*                        last update: 12/96                                 */
/*                      programmed by: Stefan von Brauk (sbrauk@gwdg.de)     */
/*===========================================================================*/


#include "xuserwnd.h"
#include "xgraphdv.h"
#include "xstring.h"
#include "xbox.h"
#include "XText.h"
#include "XFont.h"


typedef struct chartItem
{
   double value;
   //LONG color;
} ChartItem;


class _export_ XChart:public XUserWindow
{
   protected:
      XGraphicDevice * graph;
      chartItem ** item;
      USHORT itemCount;
      LONG style;
      XBox * box;
      XChart( const XWindow*, const XRect*, const LONG id, const LONG style, const char * t);
      XFont * titleFont;
      XText * title;
   public:
      virtual ~XChart();
		virtual void Draw() {graph->Draw();}
		void GetBackgroundColor( XColor * c);
      virtual void GetItemColor( const USHORT index, XColor * ) { ;}
      double GetItemValue( const USHORT index );
      XGraphicDevice * GetGraphicDevice( void) const { return graph; }
      XText * GetTitleObject( void ) const { return title; }
      virtual void SetBackgroundColor( const XColor * rgbColor) const;
      virtual void SetItemColor( const USHORT index, const XColor *) { ;}
      virtual void SetItemCount( const USHORT count );
      void SetItemValue( const USHORT index, const double value);
      void SetSize( const XRect*) const;
      virtual void SetText(const char * text);
};

#endif
