~ubuntu-branches/ubuntu/hardy/codeblocks/hardy-backports

« back to all changes in this revision

Viewing changes to src/plugins/contrib/wxSmithContribItems/wxchart/wxchart-1.0/include/wx/pie3dchartpoints.h

  • Committer: Bazaar Package Importer
  • Author(s): Michael Casadevall
  • Date: 2008-07-17 04:39:23 UTC
  • Revision ID: james.westby@ubuntu.com-20080717043923-gmsy5cwkdjswghkm
Tags: upstream-8.02
ImportĀ upstreamĀ versionĀ 8.02

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/////////////////////////////////////////////////////////////////////////////
 
2
// Name:        pie3dcharpoints.h
 
3
// Purpose:     wxChart
 
4
// Author:      Paolo Gava
 
5
// Modified by:
 
6
// Created:
 
7
// Copyright:   (C) 2006, Paolo Gava
 
8
// RCS-ID:      $Id: pie3dchartpoints.h 4669 2007-11-24 14:54:50Z killerbot $
 
9
// Licence:     wxWindows licence
 
10
/////////////////////////////////////////////////////////////////////////////
 
11
 
 
12
#if !defined( __PIE3DCHARTPOINTS_H__ )
 
13
#define __PIE3DCHARTPOINTS_H__
 
14
 
 
15
//----------------------------------------------------------------------------
 
16
// Headers
 
17
//----------------------------------------------------------------------------
 
18
 
 
19
#include "wx/points.h"
 
20
#include "wx/chartcolors.h"
 
21
#include "wx/chartpoints.h"
 
22
 
 
23
//+++-S-cd-------------------------------------------------------------------
 
24
//      NAME:           wxPie3DChartPoints
 
25
//      DESC:           Definition of pie chart
 
26
//      INTERFACE:
 
27
//
 
28
//----------------------------------------------------------------------E-+++
 
29
class WXDLLIMPEXP_CHART wxPie3DChartPoints : public wxChartPoints
 
30
{
 
31
public:
 
32
 
 
33
    // Create object. This class has to be created on the heap
 
34
    // because CChart needs its base pointer to create a list
 
35
    // example:
 
36
    // {
 
37
    //   CPieChartPoints bcp;
 
38
    //   CChart c;
 
39
    //   c.Add( &bcp );
 
40
    // }
 
41
    // If this is allow after the bcp is out of scope the list has
 
42
    // a pointer which has been deallocated!
 
43
    //------------------------------------------------------------
 
44
    static wxPie3DChartPoints* CreateWxPie3DChartPoints(wxString name,
 
45
            ChartColor c = wxCHART_NOCOLOR, bool showlabel = false);
 
46
 
 
47
        virtual ~wxPie3DChartPoints() {};
 
48
 
 
49
        // Draw the series of points
 
50
        //--------------------------
 
51
        void Draw(CHART_HPAINT hp, CHART_HRECT hr);
 
52
 
 
53
        // Get n-th point information
 
54
        //---------------------------
 
55
        ChartValue GetXVal(int n) const;
 
56
        ChartValue GetYVal(int n) const;
 
57
    wxString GetName(int n) const;
 
58
        ChartColor GetColor(int n) const;
 
59
 
 
60
        // Get stat values
 
61
        //----------------
 
62
        int GetCount() const;
 
63
        ChartValue GetMaxX() const;
 
64
        ChartValue GetMaxY() const;
 
65
        ChartValue GetMinX() const;
 
66
        ChartValue GetMinY() const;
 
67
 
 
68
        // Get/Set zoom
 
69
        //-------------
 
70
        void SetZoom(double z);
 
71
        double GetZoom();
 
72
 
 
73
        // Set sizes for drawing
 
74
        //----------------------
 
75
        void SetSizes(ChartSizes sizes);
 
76
        const ChartSizes& GetSizes() const;
 
77
 
 
78
        // Get/Set Color
 
79
        //--------------
 
80
        ChartColor GetColor() const;
 
81
        void SetColor(ChartColor c);
 
82
 
 
83
        // Get/Set Name
 
84
        //--------------
 
85
        wxString GetName() const;
 
86
        void SetName(wxString name);
 
87
 
 
88
        // Add point
 
89
        //----------
 
90
        void Add(wxString name, ChartValue x, ChartValue y);
 
91
        void Add(wxString name, ChartValue x, ChartValue y,
 
92
                         ChartColor c);
 
93
 
 
94
        // Set/Get Display option
 
95
        //-----------------------
 
96
        void SetDisplayTag(wxDISPLAY_LABEL d);
 
97
        wxDISPLAY_LABEL GetDisplayTag() const;
 
98
 
 
99
private:
 
100
        wxPoints m_Points;
 
101
        wxString m_Name;
 
102
        ChartColor m_Color;
 
103
        double m_Zoom;
 
104
        wxDISPLAY_LABEL m_PieTag;
 
105
    bool m_ShowLabel;
 
106
        ChartSizes m_Sizes;
 
107
 
 
108
    // ctor
 
109
    // has to be created on the heap!
 
110
    //-------------------------------
 
111
    wxPie3DChartPoints(wxString name, ChartColor c, bool showlabel);
 
112
 
 
113
        // copy ctor & op= NOT allow
 
114
        //--------------------------
 
115
        wxPie3DChartPoints(const wxPie3DChartPoints&);
 
116
        wxPie3DChartPoints& operator=(const wxPie3DChartPoints&);
 
117
};
 
118
 
 
119
 
 
120
#endif // __PIE3DCHARTPOINTS_H__