home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ool.zip / OOL / include / xchart.h < prev    next >
C/C++ Source or Header  |  1997-02-23  |  2KB  |  57 lines

  1. #ifndef __OOL_XCHART_H__
  2. #define __OOL_XCHART_H__
  3.  
  4. /*===========================================================================*/
  5. /* OOL ------------------- the Open Object Library ------------- OS/2 Beta 1 */
  6. /*===========================================================================*/
  7. /*                              class: XChart                                */
  8. /*                       derived from: XUserWindow                           */
  9. /*                        last update: 12/96                                 */
  10. /*                      programmed by: Stefan von Brauk (sbrauk@gwdg.de)     */
  11. /*===========================================================================*/
  12.  
  13.  
  14. #include "xuserwnd.h"
  15. #include "xgraphdv.h"
  16. #include "xstring.h"
  17. #include "xbox.h"
  18. #include "XText.h"
  19. #include "XFont.h"
  20.  
  21.  
  22. typedef struct chartItem
  23. {
  24.    double value;
  25.    //LONG color;
  26. } ChartItem;
  27.  
  28.  
  29. class _export_ XChart:public XUserWindow
  30. {
  31.    protected:
  32.       XGraphicDevice * graph;
  33.       chartItem ** item;
  34.       USHORT itemCount;
  35.       LONG style;
  36.       XBox * box;
  37.       XChart( const XWindow*, const XRect*, const LONG id, const LONG style, const char * t);
  38.       XFont * titleFont;
  39.       XText * title;
  40.    public:
  41.       virtual ~XChart();
  42.         virtual void Draw() {graph->Draw();}
  43.         void GetBackgroundColor( XColor * c);
  44.       virtual void GetItemColor( const USHORT index, XColor * ) { ;}
  45.       double GetItemValue( const USHORT index );
  46.       XGraphicDevice * GetGraphicDevice( void) const { return graph; }
  47.       XText * GetTitleObject( void ) const { return title; }
  48.       virtual void SetBackgroundColor( const XColor * rgbColor) const;
  49.       virtual void SetItemColor( const USHORT index, const XColor *) { ;}
  50.       virtual void SetItemCount( const USHORT count );
  51.       void SetItemValue( const USHORT index, const double value);
  52.       void SetSize( const XRect*) const;
  53.       virtual void SetText(const char * text);
  54. };
  55.  
  56. #endif
  57.