1
/////////////////////////////////////////////////////////////////////////////
7
// Copyright: (C) 2006, Paolo Gava
9
// Licence: wxWindows licence
10
/////////////////////////////////////////////////////////////////////////////
12
#if !defined( __POINTS_H__ )
15
//----------------------------------------------------------------------------
17
//----------------------------------------------------------------------------
19
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
20
#pragma implementation "points.h"
23
// For compilers that support precompilation, includes "wx.h".
24
#include <wx/wxprec.h>
31
#include <wx/dynarray.h>
34
#include "wx/charttypes.h"
36
//----------------------------------------------------------------------------
38
//----------------------------------------------------------------------------
48
Point(wxString name=wxEmptyString, ChartValue x=0, ChartValue y=0,
52
//----------------------------------------------------------------------------
53
// Declare Array/List of Points
54
//----------------------------------------------------------------------------
55
WX_DECLARE_OBJARRAY(Point, ListPoints);
57
//+++-S-cd-------------------------------------------------------------------
59
// DESC: points implementation with list
62
//----------------------------------------------------------------------E-+++
63
class WXDLLIMPEXP_CHART wxPoints
69
// Add Point to vector (sort by xval)
70
//-----------------------------------
71
void Add(const Point &p);
72
void Add(const wxString s, const ChartValue x, const ChartValue y,
73
const ChartColor c = 0);
75
// remove points from vector
76
//--------------------------
79
// Get points (vals) from vector
80
//------------------------------
81
Point GetPoint(size_t n) const;
82
wxString GetName(size_t n) const;
83
ChartValue GetXVal(size_t n) const;
84
ChartValue GetYVal(size_t n) const;
85
ChartColor GetColor(size_t n) const;
88
//------------------------------
89
size_t GetCount() const;
90
ChartValue GetMaxX() const;
91
ChartValue GetMaxY() const;
92
ChartValue GetMinX() const;
93
ChartValue GetMinY() const;
101
ListPoints m_vPoints;
103
// Utility list manipolation
104
//--------------------------
105
size_t GetInsertPosition(const Point& p);
106
//size_t GetPosition(int n);
108
// copy ctor & op= NOT allow
109
//--------------------------
110
wxPoints(const wxPoints&);
111
wxPoints& operator=(const wxPoints&);
115
#endif // __POINTS_H__